/* ===== Theme tokens that must live above #soft-app ===== */
  /* --on-live: text sitting on the accent. --pill-ink: text sitting on a
     category colour, which is a different question and needs its own answer.
     --warn: reserved for "something is wrong", never the accent. */
  :root { --on-live: #2C2932; --pill-ink: #2C2932; --warn: #E5A87E; --warn-soft: #413229; }

/* ===== Page reset (was inline in <head>) ===== */
  html, body { margin: 0; padding: 0; background: #26232C; min-height: 100%; }
  body { padding: 12px; }
  /* Respect notches and the home indicator when installed to a home screen. */
  @supports (padding: max(0px)) {
    body {
      padding-top: max(12px, env(safe-area-inset-top));
      padding-right: max(12px, env(safe-area-inset-right));
      padding-bottom: max(12px, env(safe-area-inset-bottom));
      padding-left: max(12px, env(safe-area-inset-left));
    }
  }
  @media (min-width: 900px) { body { padding: 28px 20px; } }
  * { -webkit-tap-highlight-color: transparent; }

/* ===== App styles (was the #soft-app <style> block) ===== */
  #soft-app {
    --bg: #2C2932;
    --raise: #383441;
    --line: #474250;
    --text: #EFEAE5;
    --dim: #A9A1A8;
    --ghost: #6E6774;
    --live: #E5A87E;
    /* Meetings are drawn in their own colour, deliberately not one of
       yours: a booked hour is not a category, it is somebody else. */
    --meet: #8FA3C4;
    --meet-wash: #8FA3C412;
    --live-soft: #413229;

    --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

    background: linear-gradient(178deg, #35313D 0%, #2C2932 300px);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
    padding: 22px 18px 52px;
    border-radius: 18px;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
  }
  #soft-app *, #soft-app *::before, #soft-app *::after { box-sizing: border-box; }
  #soft-app .boot { color: var(--dim); text-align: center; padding: 40px 0; }

  #soft-app .greet {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 18px; padding-bottom: 16px;
  }
  #soft-app .greet .gtxt { flex: 1; min-width: 0; }
  #soft-app .motif {
    flex: 0 0 auto; width: 62px; height: 62px;
    opacity: .17; margin-top: -3px; pointer-events: none;
  }
  #soft-app .motif svg { width: 100%; height: 100%; display: block; }
  /* The daily drawing, inline with the greeting: decoration, not a control. */
  #soft-app .namemotif {
    display: inline-block; width: 26px; height: 26px; vertical-align: -5px;
    margin-left: 9px; opacity: .3; color: var(--live); pointer-events: none;
  }
  #soft-app .namemotif svg { width: 100%; height: 100%; display: block; }
  #soft-app .cog {
    flex: 0 0 auto; width: 26px; height: 26px; margin-top: 4px; padding: 0;
    background: none; border: 0; color: var(--dim); cursor: pointer;
    opacity: .75; transition: opacity .15s, transform .25s;
  }
  #soft-app .cog:hover { opacity: 1; transform: rotate(35deg); }
  #soft-app .cog svg { width: 100%; height: 100%; display: block; }
  #soft-app .greet h1 {
    font-family: var(--serif); font-size: 25px; font-weight: 400;
    margin: 0; letter-spacing: -0.01em; line-height: 1.2;
  }
  #soft-app .greet p {
    margin: 6px 0 0; font-size: 13px; color: var(--dim);
    font-variant-numeric: tabular-nums;
  }
  #soft-app .quote {
    background: rgba(229,168,126,.08);
    border-radius: 16px; padding: 20px 22px; margin-bottom: 24px;
  }
  #soft-app .quote p {
    font-family: var(--serif); font-size: 18px; line-height: 1.45;
    margin: 0; color: var(--text);
  }
  #soft-app .quote p::before { content: '\201C'; color: var(--live); margin-right: 1px; }
  #soft-app .quote p::after { content: '\201D'; color: var(--live); }
  #soft-app .slack { font-size: 13.5px; color: var(--dim); padding: 2px 0 14px; line-height: 1.55; }
  #soft-app .slack b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }

  /* balance strip */
  #soft-app .balbar { display: flex; height: 7px; border-radius: 4px; overflow: hidden; background: var(--line); gap: 2px; }
  #soft-app .balbar i { display: block; height: 100%; }
  #soft-app .balkey { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 0 20px; font-size: 12.5px; color: var(--dim); }
  #soft-app .balkey span { display: flex; align-items: center; gap: 6px; }
  #soft-app .balkey b { width: 8px; height: 8px; border-radius: 2px; display: block; }

  /* rail
     --ih is set per item from its length, so a four hour block stands taller
     than a ten minute one and the shape of the day is visible down the page. */
  #soft-app .item { display: flex; min-height: var(--ih, 56px); }
  #soft-app .clock {
    flex: 0 0 58px; text-align: right; padding: 13px 13px 0 0;
    font-size: 13px; color: var(--ghost); font-variant-numeric: tabular-nums;
  }
  #soft-app .item.future .clock { color: var(--dim); }
  #soft-app .item.live .clock { color: var(--live); }
  #soft-app .item.live .clock em {
    display: block; font-style: normal; font-size: 10px; letter-spacing: .09em;
    text-transform: uppercase; margin-top: 3px; opacity: .85;
  }

  /* Hour marks and the now line, drawn inside a gap where minutes really do map
     linearly to pixels. Everywhere else on the rail they would be a lie. */
  #soft-app .item.gap { position: relative; }
  #soft-app .gapmarks { position: absolute; inset: 0; pointer-events: none; }
  #soft-app .gapmarks u {
    position: absolute; left: 0; right: 0; text-decoration: none;
    font-size: 10.5px; color: var(--ghost); opacity: .55;
    font-variant-numeric: tabular-nums; transform: translateY(-50%);
    /* The label sits in the same 58px gutter as every block's start time. */
    padding-right: 13px; width: 58px; text-align: right; box-sizing: border-box;
  }
  #soft-app .gapmarks u::after {
    content: ''; position: absolute; left: 71px; right: 0; top: 50%;
    border-top: 1px dashed var(--line); opacity: .8;
  }
  #soft-app .gapmarks .nowline {
    position: absolute; left: 0; right: 0; transform: translateY(-50%);
    font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--live);
    width: 58px; text-align: right; padding-right: 13px; box-sizing: border-box;
  }
  #soft-app .gapmarks .nowline i {
    position: absolute; left: 71px; right: 0; top: 50%; height: 1px;
    background: var(--live); opacity: .5;
  }

  #soft-app .track { flex: 0 0 22px; position: relative; }
  #soft-app .track::before {
    content: ''; position: absolute; left: 10px; top: 0; bottom: 0;
    width: 1.5px; background: var(--line); opacity: .7;
  }
  #soft-app .item:first-child .track::before { top: 19px; }
  #soft-app .item:last-child .track::before { bottom: calc(100% - 19px); }
  #soft-app .item.gap .track::before { opacity: .35; }
  #soft-app .dot {
    position: absolute; left: 4px; top: 13px;
    width: 14px; height: 14px; border-radius: 50%;
    border: 1.5px solid var(--ghost); background: var(--bg);
    display: grid; place-items: center;
    padding: 0; font: inherit; cursor: pointer; -webkit-appearance: none;
  }
  /* The dot looks like a checkbox, so it is one. Invisible padding gives it a
     real touch target without changing how big it looks. */
  #soft-app .dot::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; }
  #soft-app .dot:focus-visible { outline: 2px solid var(--live); outline-offset: 3px; }
  #soft-app .dot svg { width: 8px; height: 8px; opacity: 0; }
  #soft-app .item.done .dot svg { opacity: 1; }

  #soft-app .card {
    flex: 1; min-width: 0; padding: 10px 0 16px 6px;
    background: none; border: 0; font: inherit; color: inherit;
    text-align: left; cursor: pointer; border-radius: 12px;
  }
  #soft-app .card .t { font-size: 15.5px; line-height: 1.35; }
  #soft-app .card .n { font-size: 13px; color: var(--dim); margin-top: 4px; max-width: 42ch; line-height: 1.5; }
  #soft-app .item.past .card .t, #soft-app .item.done .card .t { color: var(--ghost); }

  #soft-app .item.live .card {
    background: var(--live-soft); border-radius: 14px;
    padding: 15px 16px; margin: 0 0 14px 4px;
  }
  #soft-app .item.live .card .t {
    font-family: var(--serif); font-size: 23px; font-weight: 400; line-height: 1.22;
  }
  #soft-app .item.live.done .card .t { color: var(--text); }
  #soft-app .meter { height: 3px; background: rgba(255,255,255,.12); border-radius: 3px; margin-top: 14px; overflow: hidden; }
  #soft-app .meter i { display: block; height: 100%; background: var(--live); border-radius: 3px; }
  #soft-app .left { font-size: 12.5px; color: var(--live); margin-top: 8px; font-variant-numeric: tabular-nums; }

  #soft-app .item.gap .card { padding: 12px 0 16px 6px; cursor: default; }
  #soft-app .item.gap .card .t { font-size: 13.5px; color: var(--ghost); font-variant-numeric: tabular-nums; }
  #soft-app .item.gap.live .card { background: none; padding: 12px 0 16px 6px; margin: 0; }
  #soft-app .item.gap.live .card .t { color: var(--live); font-size: 15px; }
  #soft-app .item.gap .dot { display: none; }

  /* park */
  .park { margin: 26px 0 8px; }
  .park-row { display: flex; gap: 9px; }
  .park input {
    flex: 1; min-width: 0; font: inherit; font-size: 15px;
    background: var(--raise); color: var(--text);
    border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px;
  }
  .park input::placeholder { color: var(--dim); }
  .park input:focus { outline: 2px solid var(--live); outline-offset: 1px; }
  .park-row > button {
    font: inherit; font-size: 15px; background: var(--raise); color: var(--text);
    border: 1px solid var(--line); border-radius: 12px; padding: 13px 17px; cursor: pointer;
  }
  .parked { list-style: none; margin: 12px 0 0; padding: 0; }
  .parked li {
    display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px;
    padding: 10px 2px; border-bottom: 1px solid var(--line);
  }
  .parked li:last-child { border-bottom: 0; }
  .parked li span { flex: 1; }
  .parked li button { background: none; border: 0; color: var(--dim); font-size: 19px; line-height: 1; padding: 0 6px; cursor: pointer; }
  .park-empty { font-size: 13.5px; color: var(--dim); padding-top: 12px; line-height: 1.55; max-width: 44ch; }
  /* what a parked thought can turn into */
  .parked li { flex-wrap: wrap; }
  .parked li.open { background: rgba(255,255,255,.03); border-radius: 10px; padding: 10px 8px; }
  html[data-theme="light"] .parked li.open { background: rgba(0,0,0,.03); }
  .parkinto { flex: 1 1 100%; display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
  .parked li .parkinto button {
    flex: 0 0 auto; background: var(--raise); border: 1px solid var(--line); color: var(--text);
    border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 12.5px; cursor: pointer;
  }
  .parked li .parkinto button:hover { border-color: var(--live); color: var(--live); }
  .parked .parkdo.on { color: var(--live); }

  /* chips */
  #soft-app .chips { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 8px 0 4px; }
  #soft-app .chip {
    display: flex; align-items: center; gap: 9px;
    background: var(--raise); border: 1px solid var(--line); border-radius: 13px;
    padding: 13px; font: inherit; font-size: 14px; color: var(--text);
    text-align: left; cursor: pointer; min-height: 50px;
  }
  #soft-app .chip.on .cl { color: var(--dim); }
  #soft-app .chip .cl { flex: 1; line-height: 1.25; }
  #soft-app .chip .mark { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--dim); flex: 0 0 auto; }
  #soft-app .chip .pips { display: flex; gap: 4px; }
  #soft-app .chip .pip { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--dim); }

  /* folders */
  #soft-app h2 {
    font-size: 11.5px; font-weight: 600; color: var(--ghost);
    letter-spacing: .1em; text-transform: uppercase; margin: 32px 0 12px;
  }
  #soft-app .folder {
    width: 100%; display: flex; align-items: center; gap: 13px;
    background: var(--raise); border: 1px solid var(--line); border-radius: 14px;
    padding: 15px 16px; margin-bottom: 9px;
    font: inherit; color: var(--text); text-align: left; cursor: pointer;
  }
  #soft-app .folder .swatch { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
  #soft-app .folder .fl { flex: 1; font-size: 15.5px; }
  #soft-app .folder .fl small { display: block; font-size: 12.5px; color: var(--dim); margin-top: 2px; }
  #soft-app .folder .bar { flex: 0 0 54px; height: 4px; background: var(--line); border-radius: 3px; overflow: hidden; }
  #soft-app .folder .bar i { display: block; height: 100%; border-radius: 3px; }
  #soft-app .folder .val { font-size: 12.5px; color: var(--dim); font-variant-numeric: tabular-nums; min-width: 46px; text-align: right; }
  #soft-app .drawer { padding: 2px 4px 18px; }
  #soft-app .drawer[hidden] { display: none; }
  #soft-app .drawer h3 { font-size: 12.5px; font-weight: 500; color: var(--ghost); margin: 14px 0 4px; }
  #soft-app .mini {
    display: flex; gap: 11px; align-items: center; width: 100%;
    background: none; border: 0; padding: 11px 2px; font: inherit;
    color: var(--text); font-size: 14px; text-align: left; cursor: pointer;
    border-bottom: 1px solid var(--line);
  }
  #soft-app .mini:last-child { border-bottom: 0; }
  #soft-app .mini .mark { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--dim); flex: 0 0 auto; }
  #soft-app .mini.on span { color: var(--ghost); }
  #soft-app .mini span { flex: 1; }
  #soft-app .mini .day { flex: 0 0 auto; color: var(--ghost); font-size: 12px; }
  #soft-app .mini .day.due { color: var(--live); }


  /* view toggle */
  #soft-app .seg {
    display: inline-flex; background: var(--raise); border: 1px solid var(--line);
    border-radius: 11px; padding: 3px; gap: 3px; margin: 8px 0 18px;
  }
  #soft-app .seg button {
    font: inherit; font-size: 13.5px; padding: 7px 18px; border: 0;
    border-radius: 8px; background: none; color: var(--dim); cursor: pointer;
  }
  #soft-app .seg button.on { background: var(--bg); color: var(--text); }

  #soft-app.wide { max-width: 1180px; }
  #soft-app .segrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
  #soft-app .habhead { display: flex; justify-content: flex-end; padding-bottom: 8px; }
  #soft-app .hdow, #soft-app .hgrid { display: grid; grid-template-columns: repeat(7, 11px); gap: 3px; }
  #soft-app .hdow span { font-size: 9px; color: var(--ghost); text-align: center; line-height: 1; }
  #soft-app .hab {
    display: flex; gap: 16px; align-items: flex-start;
    padding: 14px 2px; border-bottom: 1px solid var(--line);
  }
  #soft-app .hab:last-child { border-bottom: 0; }
  #soft-app .hab .hl { flex: 1; min-width: 0; }
  #soft-app .hab .hl b { display: block; font-size: 15px; font-weight: 500; }
  #soft-app .hab .hl small { display: block; font-size: 12.5px; color: var(--dim); margin-top: 4px; }
  #soft-app .hab .hl em { font-style: normal; color: var(--live); }
  #soft-app .hgrid i {
    width: 11px; height: 11px; border-radius: 3px;
    border: 1px solid var(--line); display: block;
  }
  #soft-app .hgrid i.fut { opacity: .3; }
  #soft-app .hgrid i.td { box-shadow: 0 0 0 1.5px var(--live); }
  #soft-app .seg button { padding: 7px 13px; }
  #soft-app .grow2 { display: flex; align-items: center; gap: 6px; }
  #soft-app .grow2 .mini { flex: 1; }
  #soft-app .del {
    background: none; border: 0; color: var(--ghost); font: inherit;
    font-size: 19px; line-height: 1; padding: 4px 8px; cursor: pointer;
  }
  #soft-app .del.wide {
    display: block; width: 100%; font-size: 13px; text-align: left;
    padding: 12px 2px 0; color: var(--dim); text-decoration: underline; text-underline-offset: 3px;
  }
  #soft-app .gform {
    background: var(--raise); border: 1px solid var(--line);
    border-radius: 14px; padding: 13px; margin-top: 12px;
  }
  #soft-app .gform input, #soft-app .gform select {
    font: inherit; font-size: 14.5px; color: var(--text); background: var(--bg);
    border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
    width: 100%; margin-bottom: 8px;
  }
  #soft-app .gform select { -webkit-appearance: none; appearance: none; }
  #soft-app .gform input:focus, #soft-app .gform select:focus {
    outline: 2px solid var(--live); outline-offset: 1px;
  }
  #soft-app .gform input::placeholder { color: var(--dim); }
  #soft-app .frow { display: flex; gap: 8px; }
  #soft-app .frow > * { flex: 1; min-width: 0; }
  #soft-app .gform .go {
    font: inherit; font-size: 14.5px; background: var(--live); color: var(--on-live);
    border: 0; border-radius: 10px; padding: 12px; width: 100%;
    margin-bottom: 0; cursor: pointer; font-weight: 500;
  }
  #soft-app .reset {
    font: inherit; font-size: 13px; background: none; border: 0;
    color: var(--live); cursor: pointer; text-decoration: underline;
    text-underline-offset: 3px; padding: 0;
  }
  #soft-app .expand {
    font: inherit; font-size: 13px; background: none; border: 0;
    color: var(--dim); cursor: pointer; text-decoration: underline;
    text-underline-offset: 3px; padding: 0;
  }

  /* expanded calendar grid */
  #soft-app .calhead { display: flex; padding-bottom: 7px; }
  #soft-app .calhead .sp { flex: 0 0 46px; }
  #soft-app .calhead .hs { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
  #soft-app .calhead .hs span { text-align: center; font-size: 12.5px; color: var(--dim); }
  #soft-app .calhead .hs span.td { color: var(--live); font-weight: 600; }
  #soft-app .cal { display: flex; }
  #soft-app .calhrs { flex: 0 0 46px; position: relative; }
  #soft-app .calhrs u {
    position: absolute; right: 9px; font-style: normal; font-size: 11px;
    color: var(--ghost); transform: translateY(-50%); font-variant-numeric: tabular-nums;
  }
  #soft-app .calcols { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
  #soft-app .calcol { position: relative; background: var(--raise); border-radius: 9px; }
  #soft-app .calcol.td { background: var(--live-soft); }
  #soft-app .gl { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); opacity: .45; }
  #soft-app .cb {
    position: absolute; left: 3px; right: 3px; border: 0; border-left: 3px solid;
    border-radius: 6px; padding: 5px 6px; font: inherit; font-size: 11.5px;
    line-height: 1.25; color: var(--text); text-align: left; overflow: hidden; cursor: pointer;
  }
  #soft-app .cb.done { opacity: .42; }
  #soft-app .cb b { display: block; font-weight: 500; }
  #soft-app .cb em { display: block; font-style: normal; font-size: 10.5px; opacity: .7; font-variant-numeric: tabular-nums; }
  #soft-app .cb { touch-action: pan-y; }
  #soft-app .cb.dragging { z-index: 20; box-shadow: 0 8px 22px rgba(0,0,0,.45); opacity: .95; }
  #soft-app .rz { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
  #soft-app .cbnow { position: absolute; left: 0; right: 0; height: 2px; background: var(--live); z-index: 3; }

  /* ---------- what is already in your calendar ----------
     A meeting sits in a lane of its own down the right of the day rather than
     among the blocks, because it is not one. You cannot move it, tick it or
     shorten it, and drawing it like a block would invite all three. The lane
     also does the arithmetic for you: how much of the column it takes is how
     much of the day somebody else decided.

     Hatched and outlined rather than filled, so at a glance a booked hour
     never reads as an hour you chose. */
  #soft-app .clane { position: absolute; inset: 0; }
  /* How much room the meetings take depends on how stacked they are. One
     at a time and your blocks keep most of the day; three deep and the day
     really is mostly other people, so it looks like it. */
  #soft-app .calcol.hasmeet .clane,
  #soft-app .dcol.hasmeet .clane { right: 42%; }
  #soft-app .calcol.lanes-2 .clane, #soft-app .dcol.lanes-2 .clane { right: 52%; }
  #soft-app .calcol.lanes-3 .clane, #soft-app .dcol.lanes-3 .clane { right: 60%; }
  #soft-app .calcol.lanes-2 .cmlane, #soft-app .dcol.lanes-2 .cmlane { width: 52%; }
  #soft-app .calcol.lanes-3 .cmlane, #soft-app .dcol.lanes-3 .cmlane { width: 60%; }

  /* Deeper than three and the rest are counted rather than drawn as slivers. */
  #soft-app .cmore {
    position: absolute; right: 3px; font-size: 10.5px; font-weight: 600;
    color: var(--meet); background: var(--bg); border: 1px solid var(--meet);
    border-radius: 999px; padding: 1px 6px; z-index: 2;
  }
  #soft-app .cmlane { position: absolute; top: 0; bottom: 0; right: 0; width: 42%; }
  #soft-app .cmeet {
    position: absolute; left: 3px; right: 3px; border-radius: 6px;
    padding: 5px 6px; font-size: 11.5px; line-height: 1.25;
    color: var(--text); overflow: hidden;
    border: 1px solid var(--meet); border-left-width: 3px;
    background: repeating-linear-gradient(135deg,
      transparent 0 5px, var(--meet-wash) 5px 10px);
  }
  #soft-app .cmeet b { display: block; font-weight: 500; }
  #soft-app .cmeet em {
    display: block; font-style: normal; font-size: 10.5px;
    opacity: .85; font-variant-numeric: tabular-nums;
  }

  /* All day entries have no place on a timed grid, so they sit above it. */
  #soft-app .cmeet-all { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
  #soft-app .cmeet-all span {
    display: inline-flex; align-items: baseline; gap: 7px;
    font-size: 12px; padding: 4px 11px; border-radius: 999px;
    color: var(--text); border: 1px solid var(--meet);
  }
  #soft-app .cmeet-all span i {
    font-style: normal; font-size: 11px; color: var(--meet);
    font-variant-numeric: tabular-nums;
  }

  /* On the week strips a meeting is the same idea at one tenth the size. */
  #soft-app .wbar i.seg-meet {
    top: 3px; bottom: 3px; background: transparent;
    border: 1px solid var(--meet); border-radius: 3px;
  }

  /* connected calendars, in Settings */
  #soft-app .callist { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px; }
  #soft-app .calrow {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    border-radius: 10px; background: var(--raise); border: 1px solid var(--line);
  }
  #soft-app .calwho {
    flex: 1; min-width: 0; font-size: 13.5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }

  /* A gap is an offer, not a thing you own yet, so it is drawn as an outline
     in the meeting colour that made it. */
  #soft-app .rkpick.gapoff { border-style: dashed; border-color: var(--meet); }
  #soft-app .rkpick.gapoff:hover { border-color: var(--meet); border-style: solid; }

  /* a long unbroken run, mentioned before it happens */
  #soft-app .breakhint {
    font-size: 12.5px; color: var(--dim); margin: 10px 0 0;
    padding: 9px 12px; border-radius: 10px; background: var(--raise);
    border: 1px solid var(--line);
  }
  #soft-app .breakhint .linkish { font-size: 12.5px; }

  /* how the day went */
  #soft-app .review {
    margin-top: 18px; padding: 16px 18px 18px; border-radius: 14px;
    background: var(--live-soft); border: 1px solid var(--line);
  }
  #soft-app .review-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
  #soft-app .review-h b { flex: 1; font-family: var(--serif); font-weight: 400; font-size: 19px; }
  #soft-app .rvrow { display: flex; align-items: baseline; gap: 9px; padding: 3px 0; }
  #soft-app .rvn {
    font-family: var(--serif); font-size: 24px; line-height: 1;
    min-width: 34px; text-align: right; font-variant-numeric: tabular-nums;
  }
  #soft-app .rvl { font-size: 13.5px; color: var(--dim); }
  #soft-app .rvbar-h {
    font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
    color: var(--ghost); margin: 16px 0 8px;
  }
  #soft-app .rvlist { list-style: none; margin: 0; padding: 0; }
  #soft-app .rvlist li {
    display: flex; gap: 10px; align-items: baseline; font-size: 13.5px;
    padding: 4px 0; color: var(--dim);
  }
  #soft-app .rvlist li em {
    font-style: normal; font-size: 11.5px; color: var(--ghost);
    font-variant-numeric: tabular-nums; margin-left: auto;
  }
  #soft-app .rvlist li.more { color: var(--ghost); font-size: 12px; }

  /* ===== the day as a grid ===== */
  #soft-app .daygrid { display: flex; margin-top: 6px; }
  #soft-app .dcol {
    flex: 1; position: relative; background: var(--raise); border-radius: 12px;
  }
  #soft-app .dblk {
    position: absolute; border-left: 3px solid; border-radius: 7px;
    overflow: hidden; display: flex; align-items: flex-start; gap: 7px; padding: 5px 7px;
  }
  #soft-app .dblk { touch-action: pan-y; cursor: grab; }
  #soft-app .dblk.dragging { z-index: 20; cursor: grabbing; box-shadow: 0 8px 22px rgba(0,0,0,.45); opacity: .95; }
  html[data-theme="light"] #soft-app .dblk.dragging { box-shadow: 0 8px 22px rgba(70,66,58,.28); }
  #soft-app .drz { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; cursor: ns-resize; }
  #soft-app .dblk.done { opacity: .45; }
  #soft-app .dblk.live { box-shadow: 0 0 0 1px var(--live); }
  #soft-app .dblk.just { animation: pop .45s ease; }
  #soft-app .dtick {
    flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; margin-top: 1px;
    border: 1.5px solid var(--ghost); background: var(--bg);
    display: grid; place-items: center; padding: 0; cursor: pointer; position: relative;
  }
  #soft-app .dtick::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; }
  #soft-app .dtick svg { width: 8px; height: 8px; opacity: 0; }
  #soft-app .dblk.done .dtick svg { opacity: 1; }
  #soft-app .dmain {
    flex: 1; min-width: 0; background: none; border: 0; padding: 0; margin: 0;
    font: inherit; color: var(--text); text-align: left; cursor: pointer; overflow: hidden;
  }
  #soft-app .dmain b {
    display: block; font-weight: 500; font-size: 13px; line-height: 1.25;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  #soft-app .dmain em {
    display: block; font-style: normal; font-size: 10.5px; opacity: .75;
    font-variant-numeric: tabular-nums; margin-top: 2px;
  }
  #soft-app .dmain .dcount { display: inline; margin-left: 6px; opacity: .8; }
  #soft-app .dmain .dtasks { opacity: 1; color: var(--live); }
  #soft-app .dblk.done .dmain b { text-decoration: line-through; }

  /* the detail that will not fit inside a block */
  :is(#soft-app, .ath-side) .ddet {
    margin-top: 14px; border: 1px solid var(--line); border-left: 3px solid var(--dc);
    border-radius: 12px; padding: 13px 15px 15px; background: var(--raise);
  }
  :is(#soft-app, .ath-side) .ddet-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
  :is(#soft-app, .ath-side) .ddet-h b { font-size: 15.5px; font-weight: 500; flex: 0 1 auto; }
  :is(#soft-app, .ath-side) .ddet-h span { flex: 1; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
  :is(#soft-app, .ath-side) .ddet-x {
    flex: 0 0 auto; background: none; border: 0; color: var(--ghost);
    font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px;
  }
  :is(#soft-app, .ath-side) .ddet-x:hover { color: var(--text); }
  :is(#soft-app, .ath-side) .ddet-act { margin-top: 10px; }
  :is(#soft-app, .ath-side) .ddet-act .linkish { font-size: 12.5px; }
  :is(#soft-app, .ath-side) .ddet .rsteps { margin: 0; }

  /* week grid */
  #soft-app .axis { display: flex; padding-left: 54px; font-size: 11px; color: var(--ghost); margin-bottom: 7px; }
  #soft-app .axis span { flex: 1; }
  #soft-app .axis span:last-child { flex: 0 0 auto; }
  #soft-app .wrow { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
  #soft-app .wday { flex: 0 0 46px; font-size: 12.5px; color: var(--dim); }
  #soft-app .wrow.today .wday { color: var(--live); font-weight: 600; }
  #soft-app .wbar {
    flex: 1; position: relative; height: 28px; background: var(--raise);
    border: 0; border-radius: 7px; overflow: hidden; cursor: pointer; padding: 0;
  }
  #soft-app .wrow.today .wbar { background: var(--live-soft); }
  #soft-app .wbar i { position: absolute; top: 4px; bottom: 4px; border-radius: 3px; }
  #soft-app .wnow { position: absolute; top: 0; bottom: 0; width: 1.5px; background: var(--live); }
  #soft-app .wlist { padding: 4px 0 14px 54px; }
  #soft-app .wlist .wl {
    display: flex; gap: 10px; align-items: center; width: 100%;
    background: none; border: 0; border-bottom: 1px solid var(--line);
    padding: 10px 2px; font: inherit; font-size: 14px; color: var(--text);
    text-align: left; cursor: pointer;
  }
  #soft-app .wlist .wl:last-child { border-bottom: 0; }
  #soft-app .wlist .wl .sw { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
  #soft-app .wlist .wl span { flex: 1; }
  #soft-app .wlist .wl.on span { color: var(--ghost); }
  #soft-app .wlist .wl em {
    flex: 0 0 auto; font-style: normal; font-size: 12px; color: var(--ghost);
    font-variant-numeric: tabular-nums;
  }
  #soft-app .wtot { margin-top: 22px; }

  #soft-app footer { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--dim); line-height: 1.55; }

/* ===== Athena additions: editing, event-editor modal, settings, all-day ===== */

  /* greeting motif is now a Settings button */
  #soft-app .motif { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; pointer-events: auto; transition: opacity .15s; }
  #soft-app .motif:hover { opacity: .4; }

  /* day-rail card with an edit affordance */
  #soft-app .card.cardrow { display: flex; align-items: flex-start; gap: 8px; }
  #soft-app .cardmain { flex: 1; min-width: 0; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 0; }
  #soft-app .editdot { flex: 0 0 auto; background: none; border: 0; color: var(--ghost); font-size: 18px; line-height: 1; padding: 2px 7px; cursor: pointer; border-radius: 8px; opacity: .55; }
  #soft-app .editdot:hover { opacity: 1; background: rgba(255,255,255,.06); }
  #soft-app .item.live .editdot { color: var(--live); opacity: .8; }

  /* all-day chips */
  #soft-app .allday { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 16px; }
  #soft-app .adchip { display: inline-flex; align-items: center; gap: 7px; background: var(--raise); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13.5px; cursor: pointer; }
  #soft-app .adchip .sw { width: 8px; height: 8px; border-radius: 50%; }

  /* inline "add" affordances */
  #soft-app .dayadd { margin-top: 18px; display: flex; gap: 8px; }
  #soft-app .dayadd button, #soft-app .wl-add { width: 100%; background: var(--raise); border: 1px dashed var(--line); color: var(--dim); border-radius: 12px; padding: 11px; font: inherit; cursor: pointer; }
  #soft-app .dayadd button { flex: 1; }
  #soft-app .dayadd button:hover, #soft-app .wl-add:hover { color: var(--text); border-color: var(--ghost); }
  #soft-app .ai-btn { border-style: solid !important; border-color: var(--live-soft) !important; color: var(--live) !important; }
  #soft-app .ai-btn:hover { border-color: var(--live) !important; }
  :is(#soft-app, .ath-side) .linkish { background: none; border: 0; color: var(--live); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

  /* modal */
  #soft-app .modal-back { position: fixed; inset: 0; background: rgba(20,18,24,.55); z-index: 40; }
  #soft-app .modal {
    position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%,-50%);
    width: min(420px, calc(100vw - 28px)); max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px); overflow: auto;
    background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 20px;
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
    -webkit-overflow-scrolling: touch;
  }
  /* Comfortable tap targets on touch devices; 16px inputs stop iOS zoom-on-focus */
  @media (pointer: coarse) {
    #soft-app input, #soft-app select, #soft-app textarea { font-size: 16px; }
    #soft-app .fld input, #soft-app .fld select { padding: 12px 12px; }
    #soft-app .wdbtn { padding: 12px 0; }
    #soft-app .modal .go, #soft-app .modal .ghost, #soft-app .modal .del { padding: 12px 16px; }
    #soft-app .editdot { padding: 6px 10px; }
  }
  #soft-app .modal-h { font-family: var(--serif); font-size: 20px; margin-bottom: 14px; }
  #soft-app .fld { display: block; margin-bottom: 12px; }
  #soft-app .fld > span { display: block; font-size: 12.5px; color: var(--dim); margin-bottom: 5px; }
  #soft-app .fld input, #soft-app .fld select {
    width: 100%; background: var(--raise); border: 1px solid var(--line); color: var(--text);
    border-radius: 10px; padding: 10px 12px; font: inherit; -webkit-appearance: none; appearance: none;
  }
  #soft-app .fld input:focus, #soft-app .fld select:focus { outline: none; border-color: var(--ghost); }
  #soft-app .fld.two { display: flex; gap: 10px; }
  #soft-app .fld.two label { flex: 1; display: block; }
  #soft-app .fld.chk { display: flex; align-items: center; gap: 9px; }
  #soft-app .fld.chk input { width: auto; }
  #soft-app .fld.chk span { margin: 0; font-size: 14px; color: var(--text); }

  /* weekday picker */
  #soft-app .wdrow { display: flex; gap: 6px; }
  #soft-app .wdbtn { flex: 1; background: var(--raise); border: 1px solid var(--line); color: var(--dim); border-radius: 9px; padding: 9px 0; font: inherit; font-size: 13px; cursor: pointer; }
  #soft-app .wdbtn.on { background: var(--live-soft); border-color: var(--live); color: var(--live); }

  /* modal actions */
  #soft-app .modal-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
  #soft-app .modal .go { background: var(--live); color: var(--on-live); border: 0; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; }
  #soft-app .modal .ghost { background: none; border: 1px solid var(--line); color: var(--dim); border-radius: 10px; padding: 10px 14px; font: inherit; cursor: pointer; }
  #soft-app .modal .del { align-self: center; }

  /* settings categories */
  #soft-app .catlist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
  #soft-app .catrow { display: flex; align-items: center; gap: 8px; }
  #soft-app .catrow input[type="color"] { flex: 0 0 40px; width: 40px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--raise); cursor: pointer; }
  #soft-app .catrow input[type="text"] { flex: 1; min-width: 0; background: var(--raise); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 8px 10px; font: inherit; }

  /* settings: account */
  #soft-app .acctrow { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
  #soft-app .acctmail { flex: 1; min-width: 0; color: var(--dim); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* ===== Login screen ===== */
  #soft-app .login { text-align: center; padding: 40px 8px 28px; max-width: 400px; margin: 0 auto; }
  #soft-app .login-mark { width: 60px; height: 60px; margin: 0 auto 12px; opacity: .55; color: var(--live); }
  #soft-app .login-mark svg { width: 100%; height: 100%; display: block; }
  #soft-app .login h1 { font-family: var(--serif); font-size: 34px; font-weight: 400; margin: 0 0 8px; letter-spacing: -0.01em; }
  #soft-app .login-sub { color: var(--dim); font-size: 15px; line-height: 1.55; margin: 0 auto 22px; max-width: 34ch; }
  #soft-app .login-box { display: flex; flex-direction: column; gap: 10px; text-align: left; }
  #soft-app .login-box input { width: 100%; background: var(--raise); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 13px 14px; font: inherit; font-size: 16px; }
  #soft-app .login-box input:focus { outline: none; border-color: var(--ghost); }
  #soft-app .login-box .go { background: var(--live); color: var(--on-live); border: 0; border-radius: 12px; padding: 13px 16px; font: inherit; font-weight: 600; cursor: pointer; }
  #soft-app .login-box .go[disabled] { opacity: .6; cursor: default; }
  #soft-app .login-msg { color: var(--text); font-size: 14px; line-height: 1.5; margin: 16px auto 0; max-width: 36ch; background: var(--live-soft); padding: 12px 14px; border-radius: 12px; }
  #soft-app .login-fine { color: var(--ghost); font-size: 12.5px; margin-top: 18px; }
  /* The code is the thing being typed, so let it be the biggest thing on screen.
     Wide letter spacing makes six digits readable as six digits. */
  /* The code box. The greyed digits behind it show the shape of what is
     coming, which is friendlier than an empty slab and tells you at a glance
     how long the thing you are waiting for is. */
  #soft-app .login-box input.codebox {
    text-align: center; font-size: 27px; letter-spacing: .34em; text-indent: .34em;
    font-variant-numeric: tabular-nums; font-weight: 600;
    padding: 17px 10px; border-radius: 14px;
    transition: border-color .15s, background .15s;
  }
  #soft-app .login-box input.codebox::placeholder {
    color: var(--ghost); opacity: .38; font-weight: 400;
  }
  #soft-app .login-box input.codebox:focus {
    border-color: var(--live); background: var(--bg);
  }
  /* While it is being checked, the box goes quiet rather than staying live
     and inviting you to keep typing into something that is already gone. */
  #soft-app .login-box input.codebox:disabled { opacity: .55; }
  #soft-app .login-alt { display: flex; justify-content: center; gap: 18px; margin-top: 18px; flex-wrap: wrap; }
  #soft-app .login-alt .linkish { font-size: 13.5px; }

  /* ===== Guided setup ===== */
  #soft-app .ob { max-width: 460px; margin: 0 auto; padding: 34px 6px 44px; }
  #soft-app .ob-mark { width: 52px; height: 52px; margin: 0 auto 14px; color: var(--live); opacity: .6; }
  #soft-app .ob-mark svg { width: 100%; height: 100%; display: block; }
  #soft-app .ob h1 { font-family: var(--serif); font-weight: 400; font-size: 29px; text-align: center; margin: 0 0 8px; letter-spacing: -.01em; text-wrap: balance; }
  #soft-app .ob-sub { color: var(--dim); font-size: 14.5px; text-align: center; line-height: 1.55; margin: 0 auto 24px; max-width: 40ch; }
  #soft-app .ob-chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
  #soft-app .ob-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--raise); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 10px 16px; font: inherit; font-size: 14px; cursor: pointer; }
  #soft-app .ob-chip .cd { width: 10px; height: 10px; border-radius: 50%; }
  #soft-app .ob-chip.on { border-color: var(--live); background: var(--live-soft); }
  #soft-app .ob-actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
  #soft-app .ob .go { background: var(--live); color: var(--on-live); border: 0; border-radius: 11px; padding: 12px 20px; font: inherit; font-weight: 600; cursor: pointer; }
  #soft-app .ob .ghost { background: none; border: 1px solid var(--line); color: var(--dim); border-radius: 11px; padding: 12px 16px; font: inherit; cursor: pointer; }
  #soft-app .ob-skip { display: block; margin: 20px auto 0; }

  /* ===== Day / week navigation ===== */
  #soft-app .datenav { display: flex; align-items: center; gap: 8px; margin: 2px 0 18px; }
  #soft-app .dnav {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px;
    background: var(--raise); border: 1px solid var(--line); color: var(--dim);
    font: inherit; font-size: 18px; line-height: 1; cursor: pointer;
  }
  #soft-app .dnav:hover { color: var(--text); border-color: var(--ghost); }
  #soft-app .dnlabel { flex: 1; min-width: 0; text-align: center; }
  #soft-app .dnlabel b { display: block; font-family: var(--serif); font-weight: 400; font-size: 16.5px; }
  #soft-app .dnlabel small { display: block; color: var(--ghost); font-size: 11.5px; margin-top: 1px; }
  #soft-app .dntoday {
    flex: 0 0 auto; background: var(--live-soft); border: 1px solid var(--live); color: var(--live);
    border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 12.5px; cursor: pointer;
  }

  /* ===== Tasks ===== */
  #soft-app .tcount { color: var(--ghost); font-size: 12px; font-weight: 400; margin-left: 4px; }
  :is(#soft-app, .ath-side) .tlist { display: flex; flex-direction: column; }
  :is(#soft-app, .ath-side) .trow { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
  :is(#soft-app, .ath-side) .trow:last-child { border-bottom: 0; }
  :is(#soft-app, .ath-side) .tcheck { flex: 0 0 auto; background: none; border: 0; padding: 2px 0 0; cursor: pointer; }
  :is(#soft-app, .ath-side) .tcheck .mark {
    display: block; width: 16px; height: 16px; border-radius: 50%;
    border: 1.5px solid var(--dim); position: relative;
  }
  :is(#soft-app, .ath-side) .tcheck .mark svg { position: absolute; inset: 3px; opacity: 0; }
  :is(#soft-app, .ath-side) .trow.done .tcheck .mark svg { opacity: 1; }
  :is(#soft-app, .ath-side) .tmain { flex: 1; min-width: 0; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 0; }
  :is(#soft-app, .ath-side) .tmain .tt { display: block; font-size: 15px; line-height: 1.35; }
  :is(#soft-app, .ath-side) .trow.done .tmain .tt { color: var(--ghost); text-decoration: line-through; }
  :is(#soft-app, .ath-side) .tmeta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
  :is(#soft-app, .ath-side) .tmeta i { font-style: normal; font-size: 11.5px; color: var(--ghost); display: inline-flex; align-items: center; gap: 5px; }
  :is(#soft-app, .ath-side) .tmeta .tcat b { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
  :is(#soft-app, .ath-side) .tmeta .prio-high { color: var(--live); }
  :is(#soft-app, .ath-side) .tmeta .due-late { color: #E8A487; }
  :is(#soft-app, .ath-side) .tmeta .due-soon { color: var(--text); }
  #soft-app .taskadd { margin-top: 4px; }

  /* tasks waiting inside a block */
  #soft-app .btasks { margin: 2px 0 4px 6px; }
  #soft-app .item.live .btasks { margin-left: 0; }
  :is(#soft-app, .ath-side) .taskchip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--raise); border: 1px solid var(--line); color: var(--dim);
    border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 12px; cursor: pointer;
  }
  :is(#soft-app, .ath-side) .taskchip em { font-style: normal; font-size: 10px; }
  :is(#soft-app, .ath-side) .taskchip:hover, :is(#soft-app, .ath-side) .taskchip.on { color: var(--text); border-color: var(--ghost); }
  /* the folded-away pile: present, but plainly not the point */
  :is(#soft-app, .ath-side) .taskchip.later {
    background: none; border-style: dashed; color: var(--ghost); margin-left: 6px;
  }
  :is(#soft-app, .ath-side) .taskchip.later:hover, :is(#soft-app, .ath-side) .taskchip.later.on { color: var(--dim); }
  :is(#soft-app, .ath-side) .tlist.inblock { margin-top: 6px; padding-left: 2px; }
  :is(#soft-app, .ath-side) .tlist.inblock .trow { padding: 6px 0; }
  :is(#soft-app, .ath-side) .tlist.inblock .tmain .tt { font-size: 14px; }

  /* five tabs need a little more room */
  #soft-app .seg button { padding-left: 11px; padding-right: 11px; }

  /* ===== Undo bar ===== */
  #soft-app .undobar {
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 45;
    display: flex; align-items: center; gap: 12px;
    background: var(--raise); color: var(--text); border: 1px solid var(--line);
    border-radius: 999px; padding: 9px 10px 9px 16px; font-size: 13.5px;
    box-shadow: 0 12px 32px rgba(0,0,0,.45);
  }
  @supports (padding: max(0px)) { #soft-app .undobar { bottom: max(16px, env(safe-area-inset-bottom)); } }
  #soft-app .undobar button {
    background: var(--live); color: var(--on-live); border: 0; border-radius: 999px;
    padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer;
  }

  /* parked thought -> schedule it */
  .parked .parkdo {
    background: none; border: 0; color: var(--ghost); cursor: pointer;
    font-size: 15px; line-height: 1; padding: 2px 6px; border-radius: 7px;
  }
  .parked .parkdo:hover { color: var(--live); background: rgba(255,255,255,.06); }

  /* ===== Scheduled goal steps on the calendar ===== */
  #soft-app .cb.cbstep { border-left-style: dashed; }
  #soft-app .cb.cbstep em { font-style: italic; }
  #soft-app .item.step .card .t { font-style: italic; }
  #soft-app .wbar i.seg-step { opacity: .5; }
  #soft-app .wl .steptag { color: var(--ghost); font-size: 11px; }
  #soft-app .gform-hint { display: block; color: var(--ghost); font-size: 11.5px; margin-top: 8px; line-height: 1.4; }

  /* ===== "Just updated" refresh pill (lives outside #soft-app) ===== */
  #ath-update {
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60;
    display: flex; align-items: center; gap: 12px;
    background: #383441; color: #EFEAE5; border: 1px solid #474250;
    border-radius: 999px; padding: 9px 10px 9px 16px;
    box-shadow: 0 12px 32px rgba(0,0,0,.45);
    font: 14px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  }
  @supports (padding: max(0px)) {
    #ath-update { bottom: max(16px, env(safe-area-inset-bottom)); }
  }
  #ath-update button {
    background: #E5A87E; color: var(--on-live); border: 0; border-radius: 999px;
    padding: 7px 15px; font: inherit; font-weight: 600; cursor: pointer;
  }
  #ath-update button:hover { opacity: .9; }

  /* ===== Ask your AI ===== */
  #soft-app .ai-intro { color: var(--dim); font-size: 13.5px; line-height: 1.5; margin: 0 0 14px; }
  #soft-app .ai-prompt { background: var(--raise); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
  #soft-app .ai-prompt pre { margin: 0 0 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; line-height: 1.55; color: #D9D2DC; white-space: pre-wrap; word-break: break-word; max-height: 156px; overflow: auto; }
  #soft-app .copybtn { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--live); color: var(--on-live); border: 0; border-radius: 9px; padding: 8px 14px; }
  #soft-app .copybtn:hover { opacity: .9; }
  #soft-app .fld textarea { width: 100%; background: var(--raise); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 14px; line-height: 1.5; resize: vertical; }
  #soft-app .fld textarea:focus { outline: none; border-color: var(--ghost); }
  #soft-app .ai-error { color: #E8A487; font-size: 13px; line-height: 1.45; margin: 10px 0 0; }
  #soft-app .ai-group { padding: 11px 0; border-bottom: 1px solid var(--line); }
  #soft-app .ai-group:last-of-type { border-bottom: 0; }
  #soft-app .ai-glabel { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ghost); margin-bottom: 8px; }
  #soft-app .ai-row { display: flex; align-items: baseline; gap: 9px; padding: 4px 0; }
  #soft-app .ai-row .cd { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; position: relative; top: 3px; }
  #soft-app .ai-row .pt { flex: 1; min-width: 0; font-size: 14px; }
  #soft-app .ai-row .pt small { display: block; color: var(--dim); font-size: 12px; margin-top: 1px; }
  #soft-app .ai-row .when { color: var(--dim); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }

  /* the assistant's tasks: a category you can change before anything lands */
  #soft-app .ai-glabel { display: flex; align-items: center; gap: 8px; }
  #soft-app .ai-glabel > span { flex: 1; }
  #soft-app .ai-setall {
    display: flex; align-items: center; gap: 6px; text-transform: none;
    letter-spacing: 0; font-size: 12px; color: var(--dim);
  }
  #soft-app .ai-setall select, #soft-app .ai-cat {
    background: var(--raise); border: 1px solid var(--line); color: var(--text);
    border-radius: 8px; padding: 4px 6px; font: inherit; font-size: 12px; max-width: 132px;
  }
  #soft-app .ai-trow { align-items: center; }
  #soft-app .ai-trow .cd { top: 0; }
  #soft-app .ai-cat { flex: 0 0 auto; }
  #soft-app .ai-trow.guessed .ai-cat { border-color: var(--warn); color: var(--warn); }
  #soft-app .ai-guess { font-size: 12.5px; line-height: 1.45; color: var(--warn); margin: 0 0 8px; }
  #soft-app .ai-howto { font-size: 12.5px; line-height: 1.5; color: var(--dim); margin: 14px 0 0; }
  #soft-app .ai-howto b { color: var(--text); font-weight: 600; }

  /* offering to fix an overfull block, and tasks held back in the list */
  :is(#soft-app, .ath-side) .spreadbtn { display: inline-block; text-align: left; font-size: 12.5px; margin: 2px 0 8px; }
  #soft-app .heldnote {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--raise); border: 1px solid var(--line); border-radius: 13px;
    padding: 12px 14px; margin-bottom: 16px; font-size: 13px; color: var(--dim);
  }
  #soft-app .heldnote span { flex: 1 1 200px; }
  #soft-app .heldnote b { color: var(--text); font-weight: 600; }
  #soft-app .heldnote .go {
    flex: 0 0 auto; background: var(--live); color: var(--on-live); border: 0;
    border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer;
  }
  @media (pointer: coarse) { #soft-app .fld textarea { font-size: 16px; } }

  /* ===== Onboarding explainer ===== */
  #soft-app .ob-explain { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 13px; text-align: left; }
  #soft-app .ob-explain li { display: flex; align-items: flex-start; gap: 11px; }
  #soft-app .ob-explain li > b { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; }
  #soft-app .ob-explain li > span { flex: 1; font-size: 14px; line-height: 1.5; color: var(--dim); }
  #soft-app .ob-explain li > span b { color: var(--text); font-weight: 600; }
  #soft-app .ob-callout { background: var(--live-soft); border-radius: 14px; padding: 15px 16px; text-align: left; }
  #soft-app .ob-callout b { display: block; font-family: var(--serif); font-weight: 400; font-size: 16px; color: var(--live); margin-bottom: 5px; }
  #soft-app .ob-callout span { font-size: 13.5px; line-height: 1.55; color: var(--dim); }
  #soft-app .ob-callout i { font-style: normal; color: var(--text); }

  /* ===== Light theme =====
     JS resolves the choice (dark / light / match device) and stamps the result
     on <html>, so this one block covers every case. */
  html[data-theme="light"], html[data-theme="light"] body { background: #E4E2DD; }
  /* Stone paper, charcoal accent. Warmth without the yellow, and an accent quiet
     enough that the category colours are the only real colour on the screen. */
  html[data-theme="light"] { --on-live: #FFFFFF; --pill-ink: #1E1D1A; --warn: #9A5B1E; --warn-soft: #F7EBDC; }
  html[data-theme="light"] #soft-app {
    --bg: #FAF9F7;
    --raise: #EFEDE9;
    --line: #DAD6D0;
    --text: #21201D;
    --dim: #5A5751;
    --ghost: #8A867F;
    --live: #3A3833;
    --meet: #5E7495;
    --meet-wash: #5E74951A;
    /* Deeper than --raise on purpose. With a charcoal accent the block you are
       in can no longer stand out by hue, so it stands out by weight instead. */
    --live-soft: #E6E2D9;
    background: linear-gradient(178deg, #FFFEFC 0%, #FAF9F7 300px);
  }
  html[data-theme="light"] #soft-app .quote { background: rgba(58,56,51,.06); }
  /* Soft fills: the category colours stay close to their pastel selves, so the
     wash across a block card carries more of the colour than it does in dark. */
  html[data-theme="light"] #soft-app .bcard::before { opacity: .2; }
  html[data-theme="light"] #soft-app .meter { background: rgba(0,0,0,.10); }
  html[data-theme="light"] #soft-app .editdot:hover,
  html[data-theme="light"] .parked .parkdo:hover,
  html[data-theme="light"] :is(#soft-app, .ath-side) .taskchip:hover { background: rgba(0,0,0,.05); }
  html[data-theme="light"] #soft-app .modal-back { background: rgba(45,43,38,.32); }
  html[data-theme="light"] #soft-app .modal { box-shadow: 0 24px 60px rgba(70,66,58,.20); }
  html[data-theme="light"] #soft-app .undobar { box-shadow: 0 12px 32px rgba(70,66,58,.20); }
  html[data-theme="light"] #soft-app .cb.dragging { box-shadow: 0 8px 22px rgba(70,66,58,.25); }
  html[data-theme="light"] #ath-update { background: #FFFFFF; color: #21201D; border-color: #DAD6D0; box-shadow: 0 12px 32px rgba(70,66,58,.20); }
  html[data-theme="light"] #ath-update button { background: #3A3833; color: #FFFFFF; }

  /* theme picker in settings */
  #soft-app .themerow { display: flex; gap: 8px; margin-bottom: 12px; }
  #soft-app .themebtn {
    flex: 1; background: var(--raise); border: 1px solid var(--line); color: var(--dim);
    border-radius: 10px; padding: 10px 6px; font: inherit; font-size: 13px; cursor: pointer;
  }
  #soft-app .themebtn.on { border-color: var(--live); color: var(--live); background: var(--live-soft); }

  /* ===== Ask your AI: launch row ===== */
  #soft-app .ai-launch { display: flex; gap: 8px; margin-bottom: 8px; }
  #soft-app .ai-launch button { flex: 1; border-radius: 10px; padding: 11px 10px; font: inherit; font-size: 13.5px; cursor: pointer; }
  #soft-app .ai-launch .go { background: var(--live); color: var(--on-live); border: 0; font-weight: 600; }
  #soft-app .ai-launch .ghost { background: none; border: 1px solid var(--line); color: var(--dim); }
  #soft-app .ai-alt { display: block; margin: 0 0 16px; font-size: 12.5px; }
  #soft-app .ai-clip { display: block; width: 100%; background: none; border: 1px dashed var(--line); color: var(--dim); border-radius: 10px; padding: 10px; font: inherit; font-size: 13px; cursor: pointer; margin-bottom: 4px; }
  #soft-app .ai-clip:hover { color: var(--text); border-color: var(--ghost); }

  /* built-in assistant */
  #soft-app .ai-primary { display: block; width: 100%; background: var(--live); color: var(--on-live); border: 0; border-radius: 11px; padding: 13px; font: inherit; font-weight: 600; cursor: pointer; }
  #soft-app .ai-primary[disabled] { opacity: .6; cursor: default; }
  #soft-app .ai-manual { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }

  /* ===== Blocks manager (the whole rhythm) ===== */
  #soft-app .blist { display: flex; flex-direction: column; }
  #soft-app .brow { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
  #soft-app .brow:last-child { border-bottom: 0; }
  #soft-app .brow .cd { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
  #soft-app .bmain { flex: 1; min-width: 0; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 0; }
  #soft-app .bmain .bt { display: block; font-size: 15px; line-height: 1.35; }
  #soft-app .bmain .bw { display: block; color: var(--dim); font-size: 12.5px; margin-top: 2px; font-variant-numeric: tabular-nums; }

  /* ===== Day progress ===== */
  #soft-app .dayprog { display: flex; align-items: center; gap: 14px; margin: 2px 0 20px; }
  #soft-app .pring { flex: 0 0 auto; width: 52px; height: 52px; }
  #soft-app .pring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
  #soft-app .pring circle { fill: none; stroke-width: 4; }
  #soft-app .pring .rbg { stroke: var(--line); }
  #soft-app .pring .rfg { stroke: var(--live); stroke-linecap: round; transition: stroke-dashoffset .55s cubic-bezier(.22,1,.36,1); }
  #soft-app .dptxt { min-width: 0; }
  #soft-app .dptxt b { display: block; font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
  #soft-app .dptxt small { display: block; color: var(--dim); font-size: 12.5px; margin-top: 4px; }
  #soft-app .dayprog.full .dptxt b { color: var(--live); }

  /* ===== The tick ===== */
  @keyframes athPop { 0% { transform: scale(1); } 38% { transform: scale(1.28); } 100% { transform: scale(1); } }
  @keyframes athDraw { from { stroke-dashoffset: 14; } to { stroke-dashoffset: 0; } }
  @keyframes athGlow { 0% { box-shadow: 0 0 0 0 var(--live); opacity: .55; } 100% { box-shadow: 0 0 0 14px transparent; opacity: 0; } }
  #soft-app .item.just .dot,
  #soft-app .chip.just .mark,
  :is(#soft-app, .ath-side) .trow.just .tcheck .mark { animation: athPop .42s cubic-bezier(.34,1.56,.64,1); }
  #soft-app .item.just .dot::after,
  :is(#soft-app, .ath-side) .trow.just .tcheck .mark::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%; animation: athGlow .55s ease-out forwards;
  }
  #soft-app .item.just .dot svg path,
  :is(#soft-app, .ath-side) .trow.just .tcheck .mark svg path {
    stroke-dasharray: 14; animation: athDraw .34s .06s ease-out backwards;
  }
  :is(#soft-app, .ath-side) .trow.just .tt { text-decoration: line-through; color: var(--ghost); transition: color .3s; }
  #soft-app .chip.just { animation: athPop .38s cubic-bezier(.34,1.56,.64,1); }

  /* ===== Earned moment ===== */
  @keyframes athRise { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
  #soft-app .celebrate {
    position: fixed; left: 50%; bottom: 74px; transform: translateX(-50%); z-index: 50;
    background: var(--live-soft); border: 1px solid var(--live); color: var(--live);
    border-radius: 999px; padding: 12px 22px; font-family: var(--serif); font-size: 17px;
    box-shadow: 0 14px 40px rgba(0,0,0,.35); animation: athRise .5s cubic-bezier(.22,1,.36,1);
    pointer-events: none; white-space: nowrap;
  }

  @media (prefers-reduced-motion: reduce) {
    #soft-app .item.just .dot, #soft-app .chip.just, #soft-app .chip.just .mark,
    :is(#soft-app, .ath-side) .trow.just .tcheck .mark, #soft-app .item.just .dot::after,
    :is(#soft-app, .ath-side) .trow.just .tcheck .mark::after, #soft-app .item.just .dot svg path,
    :is(#soft-app, .ath-side) .trow.just .tcheck .mark svg path, #soft-app .celebrate { animation: none; }
    #soft-app .pring .rfg { transition: none; }
  }

  /* ===== Narrow phones (about 320px) =====
     Three controls in a row squeeze to ~69px each, which truncates select
     labels and makes the time picker unusable. Let them wrap instead. */
  @media (max-width: 380px) {
    #soft-app .frow { flex-wrap: wrap; }
    #soft-app .frow > * { flex: 1 1 46%; min-width: 0; }
    #soft-app .seg button { padding-left: 9px; padding-right: 9px; }
    #soft-app .fld.two { flex-wrap: wrap; }
    #soft-app .fld.two label { flex: 1 1 46%; min-width: 0; }
  }

  /* task duration and block fit */
  :is(#soft-app, .ath-side) .tmeta .tmins { color: var(--dim); }
  /* a task that has been given a time of its own */
  :is(#soft-app, .ath-side) .tmeta .tat { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
  /* what it actually took, against what was planned */
  :is(#soft-app, .ath-side) .tmeta .tspent { color: var(--dim); font-variant-numeric: tabular-nums; }
  :is(#soft-app, .ath-side) .tmeta .tspent.over { color: var(--warn); }
  :is(#soft-app, .ath-side) .dspent { font-weight: 500; color: var(--dim); }
  :is(#soft-app, .ath-side) .dspent.over { color: var(--warn); }
  #soft-app .item .tasktag { font-style: normal; color: var(--ghost); font-size: 11.5px; margin-left: 7px; }
  :is(#soft-app, .ath-side) .tfit { font-size: 11.5px; color: var(--ghost); margin: 7px 0 2px; }
  :is(#soft-app, .ath-side) .tfit.over { color: var(--warn); }
  :is(#soft-app, .ath-side) .tfit.quiet { max-width: 44ch; line-height: 1.5; }

  /* grid column counts: seven on desktop, three on a phone */
  #soft-app .calcols.cols-7 { grid-template-columns: repeat(7, 1fr); }
  #soft-app .calcols.cols-3 { grid-template-columns: repeat(3, 1fr); }
  #soft-app .calhead .hs.cols-3 { grid-template-columns: repeat(3, 1fr); }
  #soft-app .calhead .hs.cols-7 { grid-template-columns: repeat(7, 1fr); }

  /* An unmissable warning when writes are not reaching the account. It has its
     own colour rather than borrowing the accent, because the accent is a matter
     of taste and a warning is not: a theme with a quiet accent must not quietly
     turn "your data is not saving" into a grey box. */
  #soft-app .savewarn {
    background: var(--warn-soft); border: 1px solid var(--warn); color: var(--warn);
    border-radius: 12px; padding: 11px 14px; font-size: 13px; line-height: 1.45; margin: 18px 0 4px;
  }
  #soft-app .modal .savewarn { margin: 0 0 12px; }

  /* tasks with nowhere to land today */
  #soft-app .homeless {
    margin-top: 20px; padding: 14px 15px; border-radius: 13px;
    border: 1px dashed var(--line); background: var(--raise);
  }
  #soft-app .homeless-h b { display: block; font-size: 14px; margin-bottom: 3px; }
  #soft-app .homeless-h span { display: block; color: var(--dim); font-size: 12.5px; line-height: 1.5; margin-bottom: 10px; }
  #soft-app .homeless .linkish { margin-top: 10px; font-size: 13px; }

  /* the Day tab's own Today / Whole week switch */
  #soft-app .seg.sub { flex: 0 0 auto; }
  #soft-app .seg.sub button { font-size: 12.5px; padding: 7px 11px; }

  /* ===== Notes =====
     A board of cards, laid out in columns so a short note does not leave a hole
     under a long one. Pinned and unpinned get their own container, because a
     single column flow cannot keep pinned things at the top. */
  #soft-app .notenew { display: flex; gap: 8px; margin-bottom: 12px; }
  #soft-app .notenew input {
    flex: 1; min-width: 0; background: var(--raise); border: 1px solid var(--line);
    color: var(--text); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 15px;
  }
  #soft-app .notenew input:focus { outline: none; border-color: var(--ghost); }
  #soft-app .notenew button {
    flex: 0 0 auto; background: var(--live); color: var(--on-live); border: 0;
    border-radius: 12px; padding: 12px 16px; font: inherit; font-weight: 600; cursor: pointer;
  }
  #soft-app .notenew button.ghost { background: var(--raise); border: 1px solid var(--line); color: var(--dim); font-weight: 400; }
  #soft-app .notenew { flex-wrap: wrap; }
  #soft-app .notenew input { flex: 1 1 100%; }
  @media (min-width: 480px) { #soft-app .notenew input { flex: 1 1 auto; } }
  #soft-app .notesearch { margin-bottom: 14px; }
  #soft-app .notesearch input {
    width: 100%; background: var(--raise); border: 1px solid var(--line); color: var(--text);
    border-radius: 12px; padding: 10px 13px; font: inherit; font-size: 14px;
  }
  #soft-app .notesearch input:focus { outline: none; border-color: var(--ghost); }

  #soft-app .noteboard { column-count: 1; column-gap: 10px; margin-bottom: 6px; }
  @media (min-width: 460px) { #soft-app .noteboard { column-count: 2; } }
  @media (min-width: 760px) { #soft-app .noteboard { column-count: 3; } }
  #soft-app .note {
    break-inside: avoid; position: relative; display: block; width: 100%;
    background: var(--note-bg, var(--raise)); border: 1px solid var(--note-line, var(--line));
    border-radius: 13px; padding: 13px 14px; margin: 0 0 10px; cursor: pointer;
    text-align: left; color: var(--text);
  }
  #soft-app .note:hover { border-color: var(--ghost); }
  #soft-app .note-t { font-size: 15px; font-weight: 600; line-height: 1.35; margin-bottom: 5px; padding-right: 22px; }
  #soft-app .note-b { font-size: 13.5px; line-height: 1.55; color: var(--dim); white-space: pre-wrap; word-break: break-word; }
  #soft-app .note-b.empty { font-style: italic; opacity: .6; }
  #soft-app .note-pin {
    position: absolute; top: 9px; right: 9px; width: 24px; height: 24px; padding: 4px;
    background: none; border: 0; color: var(--ghost); cursor: pointer; opacity: .55; border-radius: 7px;
  }
  #soft-app .note-pin svg { width: 100%; height: 100%; display: block; }
  #soft-app .note-pin.on { opacity: 1; color: var(--live); }
  #soft-app .note-pin:hover { opacity: 1; }
  #soft-app .note-list { list-style: none; margin: 2px 0 0; padding: 0; }
  #soft-app .note-list li { display: flex; align-items: flex-start; gap: 8px; padding: 3px 0; font-size: 13.5px; line-height: 1.45; }
  #soft-app .note-list li.done span { text-decoration: line-through; color: var(--ghost); }
  #soft-app .note-list button {
    flex: 0 0 auto; margin-top: 2px; padding: 0; background: none; border: 0; cursor: pointer;
  }
  #soft-app .note-list .mark {
    width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--ghost);
    display: grid; place-items: center;
  }
  #soft-app .note-list .mark svg { width: 8px; height: 8px; opacity: 0; }
  #soft-app .note-list li.done .mark { background: var(--live); border-color: var(--live); }
  #soft-app .note-list li.done .mark svg { opacity: 1; }
  /* photos: one leads the card, the rest are counted */
  #soft-app .note-imgwrap { position: relative; margin: -3px -4px 9px; border-radius: 9px; overflow: hidden; }
  #soft-app .note-img {
    display: block; width: 100%; height: auto; background: rgba(128,128,128,.12);
    min-height: 60px; object-fit: cover;
  }
  #soft-app .note-img.missing {
    display: flex; align-items: center; justify-content: center; height: 70px;
    font-size: 11.5px; color: var(--ghost);
  }
  #soft-app .note-imgn {
    position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.55); color: #fff;
    border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600;
  }
  /* editor: a strip of thumbnails and the add control */
  #soft-app .ne-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
  #soft-app .ne-img { position: relative; width: 74px; height: 74px; border-radius: 10px; overflow: hidden; }
  #soft-app .ne-img img { width: 100%; height: 100%; object-fit: cover; display: block; background: rgba(128,128,128,.12); }
  #soft-app .ne-img .del {
    position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 7px;
    background: rgba(0,0,0,.55); color: #fff; border: 0; font-size: 15px; line-height: 1; cursor: pointer; padding: 0;
  }
  #soft-app .ne-imgadd {
    width: 74px; height: 74px; border-radius: 10px; border: 1px dashed var(--line);
    display: flex; align-items: center; justify-content: center; text-align: center;
    font-size: 12px; color: var(--dim); cursor: pointer; padding: 6px; line-height: 1.3;
  }
  #soft-app .ne-imgadd:hover { border-color: var(--ghost); color: var(--text); }
  #soft-app .ne-imgadd.busy { cursor: progress; color: var(--ghost); border-style: solid; }

  /* dragging a picture over the board or an open note */
  #soft-app.dropping .noteboard,
  #soft-app.dropping .notenew {
    outline: 2px dashed var(--live); outline-offset: 6px; border-radius: 12px;
  }
  #soft-app.dropping .note-modal { outline: 2px dashed var(--live); outline-offset: -6px; }
  #soft-app.dropping .noteboard .note { pointer-events: none; }

  #soft-app .note-more, #soft-app .note-meta { font-size: 11.5px; color: var(--ghost); margin-top: 6px; }
  #soft-app .note-cat { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 11.5px; color: var(--ghost); }
  #soft-app .note-cat b { width: 8px; height: 8px; border-radius: 50%; display: block; }

  /* Note colours are named, so each theme can answer for itself rather than
     storing two hexes or blending one at runtime. */
  #soft-app .c-none  { --note-bg: var(--raise);  --note-line: var(--line); }
  #soft-app .c-rose  { --note-bg: #4A3038; --note-line: #63414B; }
  #soft-app .c-amber { --note-bg: #4A3B28; --note-line: #654F35; }
  #soft-app .c-sage  { --note-bg: #2F4235; --note-line: #415A48; }
  #soft-app .c-sky   { --note-bg: #2C3D4C; --note-line: #3D5468; }
  #soft-app .c-lilac { --note-bg: #3B3350; --note-line: #52476C; }
  #soft-app .c-stone { --note-bg: #3D3B36; --note-line: #55524B; }
  html[data-theme="light"] #soft-app .c-rose  { --note-bg: #F7E7E7; --note-line: #E4CBCB; }
  html[data-theme="light"] #soft-app .c-amber { --note-bg: #F8EEDC; --note-line: #E6D5B8; }
  html[data-theme="light"] #soft-app .c-sage  { --note-bg: #E7F0E7; --note-line: #CBDBCC; }
  html[data-theme="light"] #soft-app .c-sky   { --note-bg: #E4EDF4; --note-line: #C7D8E4; }
  html[data-theme="light"] #soft-app .c-lilac { --note-bg: #EDE8F5; --note-line: #D8CFE6; }
  html[data-theme="light"] #soft-app .c-stone { --note-bg: #EEEBE4; --note-line: #DBD6CB; }

  /* note editor */
  #soft-app .note-modal { background: var(--note-bg, var(--bg)); }
  #soft-app .ne-items { display: flex; flex-direction: column; gap: 6px; }
  #soft-app .ne-item { display: flex; align-items: center; gap: 8px; }
  #soft-app .ne-item input {
    flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line); color: var(--text);
    border-radius: 9px; padding: 9px 11px; font: inherit; font-size: 14.5px;
  }
  #soft-app .ne-tick {
    flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--ghost);
    background: none; cursor: pointer; display: grid; place-items: center; padding: 0;
  }
  #soft-app .ne-tick svg { width: 10px; height: 10px; opacity: 0; }
  #soft-app .ne-tick.on { background: var(--live); border-color: var(--live); }
  #soft-app .ne-tick.on svg { opacity: 1; }
  #soft-app .ne-add { display: flex; gap: 8px; margin-top: 9px; }
  #soft-app .ne-add input {
    flex: 1; min-width: 0; background: var(--bg); border: 1px dashed var(--line); color: var(--text);
    border-radius: 9px; padding: 9px 11px; font: inherit; font-size: 14.5px;
  }
  #soft-app .ne-add .ghost { flex: 0 0 auto; }
  #soft-app .ne-colors { display: flex; gap: 7px; flex-wrap: wrap; }
  #soft-app .ne-color {
    width: 30px; height: 30px; border-radius: 9px; cursor: pointer; padding: 0;
    background: var(--note-bg); border: 1px solid var(--note-line);
  }
  #soft-app .ne-color.on { box-shadow: 0 0 0 2px var(--live); }
  #soft-app .ne-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
  #soft-app .ne-row .ghost { flex: 1 1 auto; font-size: 13px; padding: 9px 12px; }
  /* the bridge to the day, marked out from the housekeeping above it */
  #soft-app .ne-row.make { margin-top: -6px; padding-top: 12px; border-top: 1px solid var(--line); }
  #soft-app .ne-row.make .ghost { color: var(--live); border-color: var(--live); }
  #soft-app .note-modal textarea {
    width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text);
    border-radius: 11px; padding: 11px 13px; font: inherit; font-size: 15px; line-height: 1.55;
    resize: vertical; box-sizing: border-box;
  }
  #soft-app .note-modal textarea:focus { outline: none; border-color: var(--ghost); }

  /* ===== Desktop panels =====
     A phone sees none of this: the shell is a plain wrapper and #soft-app keeps
     its own centring. From 1000px a rail appears beside the day; from 1360px the
     timer moves to the other side so the main column really is in the middle. */
  #ath-shell { display: flex; justify-content: center; align-items: flex-start; gap: 16px; }
  /* The panels carry the same tokens as the app, because they share its parts:
     the scratchpad in a panel is the same scratchpad, drawn by the same rules. */
  .ath-side {
    display: none;
    --bg: #2C2932; --raise: #383441; --line: #474250; --text: #EFEAE5;
    --dim: #A9A1A8; --ghost: #6E6774; --live: #E5A87E; --live-soft: #413229;
    --meet: #8FA3C4; --meet-wash: #8FA3C412;
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px; line-height: 1.5;
  }
  html[data-theme="light"] .ath-side {
    --bg: #FAF9F7; --raise: #EFEDE9; --line: #DAD6D0; --text: #21201D;
    --dim: #5A5751; --ghost: #8A867F; --live: #3A3833; --live-soft: #E6E2D9;
  }
  .ath-side *, .ath-side *::before, .ath-side *::after { box-sizing: border-box; }
  @media (min-width: 1000px) {
    #ath-shell { gap: 18px; }
    /* The app centres itself with auto margins, which inside a flex row eat all
       the free space and push the panels to the edges. In the shell it is a
       plain flex item and the shell does the centring. */
    #ath-shell > #soft-app { margin: 0; flex: 0 1 600px; }
    /* A panel column stays put while the day scrolls, so it must never be
       taller than the screen: a long list to place would otherwise have a
       bottom nobody could reach. It scrolls on its own instead. */
    #ath-right:not([hidden]) {
      display: block; flex: 0 0 300px; position: sticky; top: 20px;
      max-height: calc(100vh - 40px); overflow-y: auto; overscroll-behavior: contain;
    }
  }
  /* Both panels the same width, or the middle column is not actually the middle. */
  @media (min-width: 1360px) {
    #ath-shell { gap: 22px; }
    #ath-left:not([hidden]) {
      display: block; flex: 0 0 300px; position: sticky; top: 20px;
      max-height: calc(100vh - 40px); overflow-y: auto; overscroll-behavior: contain;
    }
  }
  .ath-side .panel {
    background: var(--bg); border: 1px solid var(--line);
    border-radius: 16px; padding: 16px 16px 18px; margin-bottom: 16px;
    
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  }
  .ath-side .panel-h {
    font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--ghost); margin-bottom: 12px;
  }

  /* the focus timer */
  .ath-side .tmr-face {
    font-size: 42px; line-height: 1; text-align: center; margin: 6px 0 14px;
    font-variant-numeric: tabular-nums; letter-spacing: .01em;
  }
  /* Running gets its own colour rather than the accent, so it still reads on a
     theme whose accent is deliberately quiet. */
  .ath-side .tmr.going .tmr-face { color: #E5A87E; }
  html[data-theme="light"] .ath-side .tmr.going .tmr-face { color: #9A5B1E; }
  .ath-side .tmr.just .tmr-face { animation: pop .5s ease; }
  .ath-side .tmr-mins { display: flex; align-items: center; gap: 4px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
  .ath-side .tmr-mins button {
    width: 30px; height: 28px; border-radius: 8px; cursor: pointer; padding: 0;
    background: none; border: 1px solid var(--line); color: var(--ghost);
    font: inherit; font-size: 12px;
  }
  .ath-side .tmr-mins button.on { border-color: var(--live); color: var(--live); }
  .ath-side .tmr-mins span { font-size: 11px; color: var(--ghost); margin-left: 3px; }
  .ath-side .tmr-on {
    width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text);
    border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 12.5px; margin-bottom: 12px;
  }
  .ath-side .tmr-on:disabled { opacity: .7; }
  .ath-side .tmr-act { display: flex; gap: 8px; }
  .ath-side .tmr-act .go {
    flex: 1; background: var(--live); color: var(--on-live); border: 0; border-radius: 11px;
    padding: 10px; font: inherit; font-weight: 600; cursor: pointer;
  }
  .ath-side .tmr-act .ghost {
    flex: 0 0 auto; background: none; border: 1px solid var(--line);
    color: var(--ghost); border-radius: 11px; padding: 10px 14px; font: inherit; cursor: pointer;
  }
  .ath-side .tmr-done { font-size: 11.5px; color: var(--ghost); text-align: center; margin-top: 12px; }

  /* the pile still to be placed */
  .ath-side .panel-h b { float: right; font-weight: 600; color: var(--live); }
  .ath-side .plist { display: flex; flex-direction: column; gap: 6px; }
  .ath-side .ptask {
    display: flex; align-items: flex-start; gap: 8px; cursor: grab;
    background: var(--raise); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px;
  }
  .ath-side .ptask:active { cursor: grabbing; }
  .ath-side .ptask:hover { border-color: var(--ghost); }
  .ath-side .ptick { flex: 0 0 auto; background: none; border: 0; padding: 0; margin-top: 1px; cursor: pointer; }
  .ath-side .ptick .mark {
    display: grid; place-items: center; width: 16px; height: 16px;
    border-radius: 50%; border: 1.5px solid var(--ghost);
  }
  .ath-side .ptick .mark svg { width: 8px; height: 8px; opacity: 0; }
  .ath-side .ptask .pt { flex: 1; min-width: 0; }
  .ath-side .ptask b { display: block; font-size: 13.5px; font-weight: 500; line-height: 1.35; }
  .ath-side .ptask em { display: block; font-style: normal; font-size: 11.5px; color: var(--dim); margin-top: 2px; }
  .ath-side .place-hint { font-size: 11.5px; color: var(--ghost); line-height: 1.5; margin: 11px 0 0; }
  /* while something is in the air, show where it can land */
  body.dragging-task #soft-app .dcol { outline: 2px dashed var(--live); outline-offset: 3px; }
  body.dragging-task #soft-app .dblk { transition: box-shadow .12s; }
  #soft-app .dblk.dropping { box-shadow: 0 0 0 2px var(--live); }
  #soft-app .dcol.dropping { outline-style: solid; }
  /* Drawn inside the panel: the column now scrolls, and an outline outside its
     edge would be clipped away. */
  body.dragging-task .ath-side .place { outline: 2px dashed var(--live); outline-offset: -4px; border-radius: 16px; }
  :is(#soft-app, .ath-side) .tlist.inblock .trow[draggable="true"] { cursor: grab; }

  /* the scratchpad, reusing the app's own park styles inside a panel */
  .ath-side .park { margin: 0; }
  .ath-side .park.inpanel .park-row { flex-direction: column; gap: 8px; }
  .ath-side .park.inpanel .park-row button { width: 100%; }
  .ath-side .park-empty { font-size: 12.5px; padding-top: 10px; line-height: 1.5; max-width: none; }

  /* ===== Routines ===== */
  /* on the day rail: the routine's own steps, worked down in order */
  :is(#soft-app, .ath-side) .rsteps { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 6px 6px; }
  #soft-app .item.live .rsteps { margin-left: 0; }
  :is(#soft-app, .ath-side) .rstep {
    display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
    background: none; border: 0; padding: 6px 4px; font: inherit; font-size: 14px;
    color: var(--text); cursor: pointer; border-radius: 8px;
  }
  :is(#soft-app, .ath-side) .rstep:hover { background: rgba(255,255,255,.04); }
  html[data-theme="light"] :is(#soft-app, .ath-side) .rstep:hover { background: rgba(0,0,0,.04); }
  :is(#soft-app, .ath-side) .rstep .rmark {
    flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
    border: 1.5px solid var(--ghost); display: grid; place-items: center;
  }
  :is(#soft-app, .ath-side) .rstep .rmark svg { width: 8px; height: 8px; opacity: 0; }
  :is(#soft-app, .ath-side) .rstep.done .rmark svg { opacity: 1; }
  :is(#soft-app, .ath-side) .rstep .rl { flex: 1; min-width: 0; }
  :is(#soft-app, .ath-side) .rstep.done .rl { color: var(--ghost); text-decoration: line-through; }
  :is(#soft-app, .ath-side) .rstep .pips { display: flex; gap: 3px; flex: 0 0 auto; }
  #soft-app .item.asroutine .clock { color: var(--dim); }

  /* in Grow: building one */
  #soft-app .rcard {
    position: relative; background: var(--raise); border: 1px solid var(--line);
    border-radius: 14px; padding: 0 0 14px; margin-bottom: 12px; overflow: hidden;
  }
  #soft-app .rhead { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px 0; }
  #soft-app .rbar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--rc); }
  #soft-app .rname { flex: 1; min-width: 0; }
  #soft-app .rname input {
    width: 100%; background: none; border: 0; border-bottom: 1px solid transparent;
    color: var(--text); font: inherit; font-family: var(--serif); font-size: 19px; padding: 0 0 3px;
  }
  #soft-app .rname input:focus { outline: none; border-bottom-color: var(--ghost); }
  #soft-app .rname small { display: block; color: var(--dim); font-size: 12px; margin-top: 3px; }
  #soft-app .rwhen { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px 0; }
  #soft-app .rwhen label { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--dim); }
  #soft-app .rwhen input[type="time"] {
    background: var(--bg); border: 1px solid var(--line); color: var(--text);
    border-radius: 9px; padding: 7px 9px; font: inherit; font-size: 14px;
  }
  #soft-app .rdays { display: flex; gap: 3px; }
  #soft-app .rdays button {
    width: 27px; height: 27px; border-radius: 8px; border: 1px solid var(--line);
    background: var(--bg); color: var(--ghost); font: inherit; font-size: 11px; cursor: pointer; padding: 0;
  }
  #soft-app .rdays button.on { background: var(--rc); border-color: var(--rc); color: var(--on-live); font-weight: 700; }
  #soft-app .rlist { padding: 12px 14px 0; }
  #soft-app .rrow { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
  #soft-app .rrow:last-child { border-bottom: 0; }
  #soft-app .rrow .cd { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
  #soft-app .rrl { flex: 1; min-width: 0; font-size: 14.5px; }
  #soft-app .rmove {
    flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px; border: 0;
    background: none; color: var(--ghost); font-size: 13px; cursor: pointer; padding: 0;
  }
  #soft-app .rmove:hover:not([disabled]) { color: var(--text); background: rgba(255,255,255,.06); }
  #soft-app .rmove[disabled] { opacity: .25; cursor: default; }
  html[data-theme="light"] #soft-app .rmove:hover:not([disabled]) { background: rgba(0,0,0,.05); }
  #soft-app .radd { display: flex; gap: 8px; padding: 10px 14px 0; }
  #soft-app .radd input, #soft-app .radd select {
    flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line); color: var(--text);
    border-radius: 9px; padding: 9px 11px; font: inherit; font-size: 14px;
  }
  #soft-app .radd input:focus, #soft-app .radd select:focus { outline: none; border-color: var(--ghost); }
  #soft-app .radd .ghost { flex: 0 0 auto; }
  #soft-app .hl .inroutine { color: var(--live); font-style: normal; }

  /* setup: adding a category of your own */
  #soft-app .ob-newcat { display: flex; gap: 8px; margin-top: 12px; }
  #soft-app .ob-newcat input {
    flex: 1; min-width: 0; background: var(--raise); border: 1px solid var(--line);
    color: var(--text); border-radius: 11px; padding: 11px 12px; font: inherit; font-size: 15px;
  }
  #soft-app .ob-newcat input:focus { outline: none; border-color: var(--ghost); }
  #soft-app .ob-newcat .ghost { flex: 0 0 auto; padding: 11px 18px; }

  /* what a task actually does, said once at the top of the screen */
  #soft-app .tasknote {
    background: var(--live-soft); border: 1px solid rgba(229,168,126,.22);
    border-radius: 13px; padding: 13px 15px; margin-bottom: 16px;
  }
  #soft-app .tasknote b { display: block; font-size: 14px; margin-bottom: 4px; }
  #soft-app .tasknote span { display: block; color: var(--dim); font-size: 13px; line-height: 1.55; }

  /* the block manager: blocks drawn as pieces of time, not list items */
  #soft-app .bcard {
    position: relative; display: flex; align-items: stretch; min-height: var(--bh, 64px);
    background: var(--raise); border: 1px solid var(--line); border-radius: 13px;
    overflow: hidden; margin-bottom: 8px;
  }
  /* The category colour, laid over the surface rather than mixed into it, so it
     reads the same in both themes without computing a blend. */
  #soft-app .bcard::before {
    content: ''; position: absolute; inset: 0; background: var(--bc); opacity: .1; pointer-events: none;
  }
  #soft-app .bcard-edge { flex: 0 0 5px; background: var(--bc); position: relative; z-index: 1; }
  #soft-app .bcard-main {
    position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column;
    gap: 3px; justify-content: center; background: none; border: 0; font: inherit; color: inherit;
    text-align: left; cursor: pointer; padding: 10px 40px 10px 14px;
  }
  #soft-app .bcard-top { display: flex; align-items: baseline; gap: 10px; }
  #soft-app .bcard-title { flex: 1; min-width: 0; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #soft-app .bcard-len { flex: 0 0 auto; color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
  #soft-app .bcard-time { font-size: 13px; color: var(--text); opacity: .8; font-variant-numeric: tabular-nums; }
  #soft-app .bcard-once { font-size: 12px; color: var(--dim); }
  /* Seven days, so the rhythm of a repeating block is visible at a glance. */
  #soft-app .bcard-days { display: flex; align-items: center; gap: 3px; margin-top: 3px; flex-wrap: wrap; }
  #soft-app .bcard-days span {
    width: 17px; height: 17px; border-radius: 5px; display: flex; align-items: center; justify-content: center;
    font-size: 10px; line-height: 1; color: var(--ghost); background: rgba(255,255,255,.04);
  }
  #soft-app .bcard-days span.on { background: var(--bc); color: var(--pill-ink); font-weight: 600; }
  #soft-app .bcard-days em { font-style: normal; font-size: 11px; color: var(--dim); margin-left: 5px; }
  #soft-app .bcard-del {
    position: absolute; z-index: 2; top: 8px; right: 8px; width: 26px; height: 26px;
    background: none; border: 0; color: var(--ghost); font-size: 17px; line-height: 1;
    cursor: pointer; border-radius: 8px;
  }
  #soft-app .bcard-del:hover { color: var(--text); background: rgba(255,255,255,.06); }
  /* :not(.on) matters. Without it this beats the .on rule above on specificity
     and quietly greys out every selected day. */
  html[data-theme="light"] #soft-app .bcard-days span:not(.on) { background: rgba(0,0,0,.05); }
  html[data-theme="light"] #soft-app .bcard-del:hover { background: rgba(0,0,0,.05); }

  /* setup: hours a week and days, one row per category */
  #soft-app .obplan { display: flex; flex-direction: column; gap: 8px; text-align: left; }
  #soft-app .obplan-row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: var(--raise); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  }
  #soft-app .obplan-name { display: flex; align-items: center; gap: 8px; flex: 1 1 120px; min-width: 0; font-size: 14.5px; }
  #soft-app .obplan-name .cd { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
  #soft-app .obplan-nums { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
  #soft-app .obplan-nums label { display: flex; align-items: center; gap: 5px; }
  #soft-app .obplan-nums input {
    width: 58px; background: var(--bg); border: 1px solid var(--line); color: var(--text);
    border-radius: 9px; padding: 8px 6px; font: inherit; font-size: 15px; text-align: center;
    font-variant-numeric: tabular-nums;
  }
  #soft-app .obplan-nums input:focus { outline: none; border-color: var(--ghost); }
  #soft-app .obplan-nums span { color: var(--dim); font-size: 12px; white-space: nowrap; }
  #soft-app .obplan-tot { color: var(--dim); font-size: 13px; margin: 14px 0 0; }

  /* setup rerun: the proposed changes, each one refusable */
  #soft-app .obdiff { display: flex; flex-direction: column; gap: 7px; text-align: left; margin-top: 4px; }
  #soft-app .obdiff-row {
    display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left;
    background: var(--raise); border: 1px solid var(--line); border-radius: 12px;
    padding: 11px 12px; font: inherit; color: var(--text); cursor: pointer; opacity: .5;
  }
  #soft-app .obdiff-row.on { opacity: 1; border-color: var(--ghost); }
  #soft-app .obdiff-box {
    flex: 0 0 auto; width: 18px; height: 18px; border-radius: 6px; margin-top: 1px;
    border: 1px solid var(--ghost); display: flex; align-items: center; justify-content: center;
  }
  #soft-app .obdiff-row.on .obdiff-box { background: var(--live); border-color: var(--live); }
  #soft-app .obdiff-box svg { width: 11px; height: 11px; display: block; }
  #soft-app .obdiff-row .cd { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; margin-top: 5px; }
  #soft-app .obdiff-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  #soft-app .obdiff-txt b { font-weight: 600; font-size: 14px; }
  #soft-app .obdiff-txt span { color: var(--dim); font-size: 12.5px; }
  #soft-app .setnote { color: var(--dim); font-size: 12.5px; line-height: 1.5; margin: 8px 0 0; }

  /* the actual reason a load failed, so it can be reported rather than guessed */
  #soft-app .errdetail {
    background: var(--warn-soft); border: 1px solid var(--warn); border-radius: 12px;
    padding: 11px 14px; margin: 4px 0 16px; text-align: left;
  }
  #soft-app .errdetail b { display: block; color: var(--warn); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 5px; }
  #soft-app .errdetail span { display: block; color: var(--text); font-size: 13px; line-height: 1.5; word-break: break-word; }

  /* which build this device is actually running */
  #soft-app .buildline {
    margin-top: 12px; color: var(--dim); font-size: 11.5px; letter-spacing: .04em; opacity: .75;
  }

  /* ===== A block's contents, in the right-hand panel =====
     The panel is already the card, so the detail sheds its own and keeps only
     the category stripe down its side. */
  #ath-left .ddet, #ath-right .ddet {
    margin: 0; border: 0; border-left: 3px solid var(--dc); border-radius: 0;
    padding: 0 0 0 12px; background: none;
  }
  #ath-left .ddet-h, #ath-right .ddet-h { flex-wrap: wrap; row-gap: 2px; }
  #ath-left .ddet-h b, #ath-right .ddet-h b { flex: 1 1 auto; }
  #ath-left .ddet-h span, #ath-right .ddet-h span { flex: 1 1 100%; order: 3; }
  .ath-side .blk-empty { font-size: 12.5px; color: var(--ghost); line-height: 1.5; margin: 0; }
  /* the block whose contents are showing */
  #soft-app .dblk.sel:not(.dropping):not(.dragging) { box-shadow: 0 0 0 2px var(--dim); }
  #soft-app .dblk.sel.live:not(.dropping):not(.dragging) { box-shadow: 0 0 0 2px var(--live); }

  /* ===== Moving a block on a touch screen =====
     A finger on an ordinary block scrolls the day (pan-y above). A block you
     have tapped is picked: it takes the finger, so it can be moved. */
  #soft-app .dblk.picked { touch-action: none; }
  #soft-app .dblk.picked:not(.dropping):not(.dragging) { box-shadow: 0 0 0 2px var(--live); }
  @media (pointer: coarse) {
    /* a fingertip needs more than 9px to catch the bottom edge */
    #soft-app .dblk.picked .drz { height: 18px; }
    #soft-app .dblk.picked .drz::after {
      content: ""; position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
      width: 26px; height: 3px; border-radius: 2px; background: var(--dim);
    }
  }
  /* the bar a phone shows for the picked block */
  #soft-app .pickbar {
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 44;
    width: min(440px, calc(100vw - 24px));
    display: flex; align-items: center; gap: 10px;
    background: var(--raise); color: var(--text);
    border: 1px solid var(--line); border-left: 3px solid var(--dc);
    border-radius: 14px; padding: 9px 6px 9px 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    transition: opacity .2s, transform .2s;
  }
  html[data-theme="light"] #soft-app .pickbar { box-shadow: 0 8px 24px rgba(70,66,58,.18); }
  #soft-app .pickbar.away { opacity: 0; pointer-events: none; transform: translate(-50%, 12px); }
  #soft-app .pb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
  #soft-app .pb-t b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #soft-app .pb-t em { font-style: normal; font-size: 11.5px; color: var(--dim); }
  #soft-app .pb-go {
    flex: 0 0 auto; background: var(--live); color: var(--on-live); border: 0; border-radius: 10px;
    padding: 8px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  }
  #soft-app .pb-x { flex: 0 0 auto; background: none; border: 0; color: var(--ghost); font-size: 20px; line-height: 1; padding: 6px 9px; cursor: pointer; }
  @media (prefers-reduced-motion: reduce) { #soft-app .pickbar { transition: none; } }

  /* habits on the Day view, tucked under the ring they count toward */
  #soft-app .dayhab-h { margin-top: 0; }
  #soft-app .dayhab-h + .chips { margin-bottom: 20px; }

  /* ===== Goals: a card each in the list, a page each when opened ===== */
  #soft-app .gcard {
    background: var(--raise); border: 1px solid var(--line); border-left: 3px solid var(--gc);
    border-radius: 0; padding: 13px 15px 14px; margin-bottom: 10px;
  }
  #soft-app .gcard-h {
    width: 100%; display: flex; align-items: center; gap: 13px;
    background: none; border: 0; padding: 0; font: inherit; color: var(--text);
    text-align: left; cursor: pointer;
  }
  #soft-app .gring { flex: 0 0 auto; }
  #soft-app .gringt { fill: var(--text); font-size: 11.5px; font-family: var(--sans); }
  #soft-app .gcard-h .gc-l { flex: 1; min-width: 0; }
  #soft-app .gc-l b { display: block; font-size: 15.5px; font-weight: 500; line-height: 1.3; }
  #soft-app .gc-l small { display: block; font-size: 12.5px; color: var(--dim); margin-top: 3px; }
  #soft-app .gc-l small.late { color: var(--warn); }
  #soft-app .gc-go { flex: 0 0 auto; color: var(--ghost); font-size: 20px; line-height: 1; }
  #soft-app .gc-meas {
    display: flex; justify-content: space-between; gap: 10px;
    font-size: 12.5px; color: var(--dim); margin-top: 12px;
  }
  #soft-app .gc-meas b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
  #soft-app .gc-next { font-size: 12.5px; color: var(--dim); margin-top: 10px; line-height: 1.4; }
  #soft-app .gc-next em {
    font-style: normal; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase;
    color: var(--ghost); margin-right: 8px;
  }

  /* the milestone line. Dots are evenly spaced, so the labels stay readable */
  #soft-app .gtl { position: relative; height: 12px; margin: 14px 2px 0; }
  #soft-app .gtl-line {
    position: absolute; top: 5px; left: 0; right: 0; height: 2px;
    background: var(--line); border-radius: 1px;
  }
  #soft-app .gtl-line.on { right: auto; }
  #soft-app .gtl-dot {
    position: absolute; top: 0; width: 12px; height: 12px; border-radius: 50%;
    border: 2px solid var(--ghost); background: var(--raise); box-sizing: border-box;
  }
  #soft-app .gtl-lbl { display: flex; justify-content: space-between; gap: 12px; margin: 4px 2px 0; }
  #soft-app .gtl-lbl span {
    max-width: 46%; font-size: 10.5px; color: var(--ghost);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  #soft-app .gtl-lbl span:last-child { text-align: right; }

  /* the page for one goal */
  #soft-app .gp-back {
    background: none; border: 0; padding: 0; margin: 0 0 14px; font: inherit;
    font-size: 13px; color: var(--dim); cursor: pointer;
  }
  #soft-app .gp-back:hover { color: var(--text); }
  #soft-app .gp-h { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
  #soft-app .gp-ht { flex: 1; min-width: 0; }
  #soft-app .gp-ht h1 { font-size: 19px; font-weight: 500; line-height: 1.3; margin: 0; }
  #soft-app .gp-ht p { font-size: 12.5px; color: var(--dim); margin: 4px 0 0; }
  #soft-app .gp-ht p.late { color: var(--warn); }
  #soft-app .gp-why {
    font-family: var(--serif); font-size: 15px; line-height: 1.55; color: var(--dim);
    margin: 0 0 16px; padding-left: 12px; border-left: 2px solid var(--line);
  }
  #soft-app .gp-meas { background: var(--raise); border-radius: 12px; padding: 13px 14px 14px; }
  #soft-app .gp-mh {
    display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px;
    color: var(--dim); margin-bottom: 9px;
  }
  #soft-app .gp-mh b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
  #soft-app .gmeter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
  #soft-app .gmeter i { display: block; height: 100%; border-radius: 3px; }
  #soft-app .gp-log { display: flex; gap: 8px; margin-top: 12px; }
  #soft-app .gp-log input {
    flex: 1; min-width: 0; font: inherit; font-size: 14.5px; color: var(--text);
    background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  }
  #soft-app .gp-log input:focus { outline: 2px solid var(--live); outline-offset: 1px; }
  #soft-app .ghostbtn {
    flex: 0 0 auto; font: inherit; font-size: 14px; background: none; color: var(--text);
    border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; cursor: pointer;
  }
  #soft-app .ghostbtn:hover { border-color: var(--ghost); }
  #soft-app .gp-logged { font-size: 11.5px; color: var(--ghost); margin: 10px 0 0; }

  #soft-app .mslist { display: flex; flex-direction: column; }
  #soft-app .msrow {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 0; border-bottom: 1px solid var(--line);
  }
  #soft-app .msrow:last-child { border-bottom: 0; }
  #soft-app .mstick { flex: 0 0 auto; background: none; border: 0; padding: 0; cursor: pointer; }
  #soft-app .mstick .mark {
    display: grid; place-items: center; width: 19px; height: 19px;
    border-radius: 50%; border: 1.5px solid var(--ghost);
  }
  #soft-app .mstick .mark svg { width: 10px; height: 10px; opacity: 0; }
  #soft-app .msrow.done .mstick .mark svg { opacity: 1; }
  #soft-app .msl { flex: 1; min-width: 0; }
  #soft-app .msl b { display: block; font-size: 14.5px; font-weight: 400; line-height: 1.35; }
  #soft-app .msl em {
    font-style: normal; display: block; font-size: 11.5px; color: var(--ghost); margin-top: 2px;
  }
  #soft-app .msrow.done .msl b { color: var(--ghost); text-decoration: line-through; }
  #soft-app .msrow.late .msl em { color: var(--warn); }

  /* the goal Athena drafted, above the pieces you tick */
  #soft-app .gai-goal {
    background: var(--raise); border: 1px solid var(--line); border-radius: 12px;
    padding: 13px 14px; margin-bottom: 14px;
  }
  #soft-app .gai-goal b { display: block; font-size: 16px; font-weight: 500; line-height: 1.35; }
  #soft-app .gai-goal em {
    font-style: normal; display: block; font-size: 12px; color: var(--dim); margin-top: 5px;
  }
  #soft-app .gai-goal p {
    font-family: var(--serif); font-size: 14px; line-height: 1.5; color: var(--dim); margin: 9px 0 0;
  }
  #soft-app .gai-h {
    font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--ghost); margin: 16px 0 7px;
  }
  #soft-app .gpick {
    display: flex; align-items: flex-start; gap: 11px; cursor: pointer;
    padding: 9px 0; border-bottom: 1px solid var(--line);
  }
  #soft-app .gpick:last-of-type { border-bottom: 0; }
  #soft-app .gpick input { width: 17px; height: 17px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--live); }
  #soft-app .gpick .gpk { flex: 1; min-width: 0; }
  #soft-app .gpick .gpk b { display: block; font-size: 14.5px; font-weight: 400; line-height: 1.35; }
  #soft-app .gpick .gpk em {
    font-style: normal; display: block; font-size: 11.5px; color: var(--ghost); margin-top: 2px;
  }
  #soft-app .gpick input:not(:checked) ~ .gpk b { color: var(--ghost); }

  /* ---- finding things ------------------------------------------------------
     Wider and taller than the other overlays, because it is a list you scan
     rather than a form you fill. The field is sticky: scrolling a long set of
     results should never take away the thing you are typing into. */
  #soft-app .greetbtns { flex: 0 0 auto; display: flex; align-items: flex-start; gap: 10px; }
  #soft-app .cog.mag:hover { transform: none; }
  #soft-app .modal.find { width: min(520px, calc(100vw - 28px)); }
  #soft-app .findbar {
    position: sticky; top: -20px; z-index: 1;
    background: var(--bg); padding: 2px 0 10px; margin-bottom: 2px;
  }
  #soft-app .findbar input {
    width: 100%; background: var(--raise); border: 1px solid var(--line); color: var(--text);
    border-radius: 10px; padding: 11px 12px; font: inherit; -webkit-appearance: none; appearance: none;
  }
  #soft-app .findbar input:focus { outline: none; border-color: var(--ghost); }
  #soft-app h2.sgrp {
    font-family: var(--serif); font-size: 13px; font-weight: 400; color: var(--dim);
    text-transform: uppercase; letter-spacing: .08em; margin: 14px 0 6px;
  }
  #soft-app .sres {
    display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left;
    background: none; border: 0; border-radius: 10px; padding: 9px 10px;
    color: var(--text); font: inherit; cursor: pointer;
  }
  #soft-app .sres:hover { background: var(--raise); }
  #soft-app .sres .cd { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; position: relative; top: 6px; }
  #soft-app .sres .cd.none { background: var(--ghost); opacity: .45; }
  #soft-app .sres .st { flex: 1; min-width: 0; }
  #soft-app .sres .st small {
    display: block; color: var(--dim); font-size: 12.5px; margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  #soft-app .sres .sm { flex: 0 0 auto; color: var(--ghost); font-size: 12px; padding-top: 2px; }
  #soft-app .smore { color: var(--ghost); font-size: 12.5px; padding: 2px 10px 0; }
  #soft-app .fld.sold { margin: 16px 0 12px; padding-top: 12px; border-top: 1px solid var(--line); }

  /* ---- setting up tomorrow -------------------------------------------------
     A decision screen, so the choices are the loudest thing on each row and
     the one that is currently true is the one that looks pressed. */
  #soft-app .modal.tmrw { width: min(520px, calc(100vw - 28px)); }
  #soft-app h2.tmh {
    font-family: var(--serif); font-size: 13px; font-weight: 400; color: var(--dim);
    text-transform: uppercase; letter-spacing: .08em; margin: 18px 0 6px;
  }
  #soft-app .tmnote { font-size: 13px; color: var(--dim); margin: 0 0 8px; line-height: 1.5; }
  #soft-app .tmclean { font-size: 13.5px; color: var(--dim); margin: 0; line-height: 1.55; max-width: 46ch; }
  #soft-app .tmrow {
    display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
    padding: 10px 0; border-bottom: 1px solid var(--line);
  }
  #soft-app .tmrow .cd { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; margin-top: 5px; }
  #soft-app .tmrow .tmt { flex: 1 1 140px; min-width: 0; font-size: 14.5px; }
  #soft-app .tmrow .tmt small { display: block; color: var(--dim); font-size: 12.5px; margin-top: 2px; }
  #soft-app .tmchoice { display: flex; gap: 6px; flex: 0 0 auto; }
  #soft-app .tmbtn {
    background: none; border: 1px solid var(--line); color: var(--dim);
    border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer;
  }
  #soft-app .tmbtn:hover { color: var(--text); border-color: var(--ghost); }
  #soft-app .tmbtn.on { background: var(--live); border-color: var(--live); color: var(--on-live); }
  #soft-app .tmblocks { display: flex; flex-direction: column; gap: 2px; }
  #soft-app .tmb { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
  #soft-app .tmb .cd { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
  #soft-app .tmb .tmt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #soft-app .tmb em { flex: 0 0 auto; font-style: normal; color: var(--ghost); font-size: 12.5px; }
  #soft-app .tmplace { margin-top: 10px; }
  @media (pointer: coarse) {
    #soft-app .tmbtn { padding: 9px 14px; font-size: 13px; }
  }

  /* ---- one box ------------------------------------------------------------
     Sits above everything it can change, and looks like a thing you type into
     rather than a feature you have to find. */
  #soft-app .askbar { display: flex; gap: 8px; margin: 14px 0 6px; }
  #soft-app .askbar input {
    flex: 1; min-width: 0; background: var(--raise); border: 1px solid var(--line); color: var(--text);
    border-radius: 12px; padding: 11px 14px; font: inherit; -webkit-appearance: none; appearance: none;
  }
  #soft-app .askbar input:focus { outline: none; border-color: var(--live); }
  #soft-app .askbar input:disabled { opacity: .6; }
  #soft-app .askbar .go {
    flex: 0 0 auto; background: var(--live); color: var(--on-live); border: 0;
    border-radius: 12px; padding: 11px 18px; font: inherit; font-weight: 600; cursor: pointer;
  }
  #soft-app .askbar .go:disabled { opacity: .55; cursor: default; }
  #soft-app .askhint { font-size: 12.5px; color: var(--ghost); margin: 0 0 4px; line-height: 1.5; max-width: 52ch; }
  #soft-app .askreply {
    position: relative; background: var(--raise); border: 1px solid var(--line);
    border-radius: 12px; padding: 12px 34px 12px 14px; margin: 10px 0 4px;
  }
  #soft-app .askreply p { margin: 0; font-size: 14.5px; line-height: 1.55; }
  #soft-app .askreply .ddet-x { position: absolute; top: 6px; right: 8px; }
  #soft-app .askreply-in { font-size: 14px; color: var(--dim); line-height: 1.55; margin: 0 0 12px; }
  #soft-app .modal.ask { width: min(520px, calc(100vw - 28px)); }

  /* ---- checkboxes you can actually see -------------------------------------
     Every checkbox in Athena inherits appearance:none from the .fld input rule,
     which strips the native tick and leaves a grey slab that looks identical
     ticked or not. It was toggling all along, silently, which is worse than
     being broken: you tap it, nothing appears to happen, so you tap it back.
     Drawn here instead, so it looks the same on a phone, a Mac and a PC. */
  #soft-app .fld.chk { cursor: pointer; padding: 3px 0; }
  #soft-app .fld.chk input[type="checkbox"] {
    width: 20px; height: 20px; flex: 0 0 auto; margin: 0; padding: 0;
    border: 1.5px solid var(--ghost); border-radius: 6px;
    background: transparent; position: relative; cursor: pointer;
    transition: background .12s, border-color .12s;
  }
  #soft-app .fld.chk input[type="checkbox"]:hover { border-color: var(--live); }
  #soft-app .fld.chk input[type="checkbox"]:checked { background: var(--live); border-color: var(--live); }
  #soft-app .fld.chk input[type="checkbox"]:checked::after {
    content: ''; position: absolute; left: 6px; top: 2px;
    width: 5px; height: 10px; border: solid var(--on-live);
    border-width: 0 2px 2px 0; transform: rotate(45deg);
  }
  #soft-app .fld.chk input[type="checkbox"]:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; }
  @media (pointer: coarse) {
    #soft-app .fld.chk { padding: 6px 0; }
    #soft-app .fld.chk input[type="checkbox"] { width: 24px; height: 24px; }
    #soft-app .fld.chk input[type="checkbox"]:checked::after { left: 8px; top: 3px; width: 6px; height: 12px; }
  }

  /* ---- must not miss -------------------------------------------------------
     The one thing in Athena allowed to sit above everything else, so it uses
     --warn, which the palette reserves for "something is wrong" and nothing
     else. If this ever looks like ordinary furniture it has stopped working. */
  #soft-app .hardbar {
    border: 1px solid var(--warn); border-radius: 14px;
    background: var(--warn-soft); padding: 12px 14px; margin: 14px 0 4px;
  }
  #soft-app .hb-h {
    font-family: var(--serif); font-size: 12.5px; color: var(--warn);
    text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px;
  }
  #soft-app .hb-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
  #soft-app .hb-row + .hb-row { border-top: 1px solid var(--line); }
  #soft-app .hb-tick {
    flex: 0 0 auto; width: 26px; height: 26px; padding: 0; cursor: pointer;
    background: none; border: 1.5px solid var(--warn); border-radius: 8px; color: var(--warn);
  }
  #soft-app .hb-tick svg { width: 16px; height: 16px; display: block; margin: 0 auto; }
  #soft-app .hb-tick:hover { background: var(--warn); color: var(--on-live); }
  #soft-app .hb-t { flex: 1; min-width: 0; }
  #soft-app .hb-t b { display: block; font-weight: 600; font-size: 15px; }
  #soft-app .hb-t em { display: block; font-style: normal; font-size: 12.5px; color: var(--dim); margin-top: 1px; }
  #soft-app .hb-row.urgent .hb-t em { color: var(--warn); font-weight: 600; }
  #soft-app .hb-row.soon .hb-t b, #soft-app .hb-row.gone .hb-t b { font-weight: 400; }
  #soft-app .hb-row.gone { opacity: .72; }
  #soft-app .hb-drop {
    flex: 0 0 auto; background: none; border: 1px solid var(--line); color: var(--dim);
    border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer;
  }
  #soft-app .hb-drop:hover { color: var(--text); border-color: var(--ghost); }
  :is(#soft-app, .ath-side) .tmeta .thard { color: var(--warn); font-weight: 600; }
  #soft-app .fld.chk.taskhard { margin: 4px 0 10px; }
  @media (pointer: coarse) {
    #soft-app .hb-row { padding: 8px 0; }
    #soft-app .hb-tick { width: 30px; height: 30px; }
    #soft-app .hb-drop { padding: 8px 13px; }
  }

  /* ---- the receipt after adding a task -------------------------------------
     Sits directly under the box it was typed into, because that is where the
     eye already is. A confirmation further down the page is no confirmation. */
  #soft-app .added {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin: 10px 0 2px; padding: 10px 14px;
    background: var(--raise); border: 1px solid var(--line);
    border-left: 3px solid var(--live); border-radius: 12px;
    animation: athSlip .28s ease;
  }
  #soft-app .ad-t { flex: 1; min-width: 0; font-size: 14px; }
  #soft-app .ad-t b { font-weight: 600; }
  #soft-app .ad-t em { display: block; font-style: normal; font-size: 12.5px; color: var(--dim); margin-top: 2px; }
  #soft-app .added .linkish { flex: 0 0 auto; }
  @keyframes athSlip { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
  @media (prefers-reduced-motion: reduce) { #soft-app .added { animation: none; } }

  /* ---- saying which category, and what it attracts -------------------------
     A block's category decides what flows into it, which makes it the most
     important thing about the block. It used to be a coloured stripe and
     nothing else, so you had to remember which colour meant what. */
  #soft-app .bcard-cat {
    display: flex; align-items: center; gap: 6px; margin-top: 5px;
    font-size: 12px; color: var(--dim);
  }
  #soft-app .bcard-cat b { width: 8px; height: 8px; border-radius: 50%; background: var(--bc); flex: 0 0 auto; }

  /* Where a task is going to happen, in three words. Held and placed are the
     answers worth noticing, so they are the ones that are not grey. */
  :is(#soft-app, .ath-side) .tmeta .twhere.loose { color: var(--ghost); }
  :is(#soft-app, .ath-side) .tmeta .twhere.placed { color: var(--text); opacity: .85; }
  :is(#soft-app, .ath-side) .tmeta .twhere.held { color: var(--warn); }

  /* ---- the coach: the daily check and commitments --------------------------
     Quieter than must-not-miss on purpose. A deadline shouts because missing it
     costs money. A commitment asks, because being told off by an app is how an
     app stops being opened. */
  #soft-app .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  #soft-app .seg::-webkit-scrollbar { display: none; }
  #soft-app .seg button { flex: 0 0 auto; white-space: nowrap; }

  #soft-app .check {
    border: 1px solid var(--line); border-radius: 14px;
    background: var(--raise); padding: 12px 14px; margin: 14px 0 4px;
  }
  #soft-app .ck-h {
    font-family: var(--serif); font-size: 12.5px; color: var(--dim);
    text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px;
  }
  #soft-app .ck-quiet { margin: 0; font-size: 13.5px; color: var(--dim); line-height: 1.5; }
  #soft-app .ck-row { padding: 8px 0; }
  #soft-app .ck-row + .ck-row { border-top: 1px solid var(--line); }
  #soft-app .ck-t b { display: block; font-size: 15px; font-weight: 600; }
  #soft-app .ck-t em { display: block; font-style: normal; font-size: 12.5px; color: var(--dim); margin-top: 2px; }
  #soft-app .ck-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
  #soft-app .ck-acts button {
    background: none; border: 1px solid var(--line); color: var(--dim);
    border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 12.5px; cursor: pointer;
  }
  #soft-app .ck-acts button:hover { color: var(--text); border-color: var(--ghost); }
  #soft-app .ck-acts .ck-yes { background: var(--live); border-color: var(--live); color: var(--on-live); font-weight: 600; }
  #soft-app .ck-note { margin: 10px 0 0; font-size: 12px; color: var(--ghost); line-height: 1.5; }

  #soft-app .cmlist { display: flex; flex-direction: column; }
  #soft-app .cmrow { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  #soft-app .cm-tick {
    flex: 0 0 auto; width: 24px; height: 24px; padding: 0; cursor: pointer;
    background: none; border: 1.5px solid var(--ghost); border-radius: 8px; color: var(--live);
  }
  #soft-app .cm-tick:hover { border-color: var(--live); }
  #soft-app .cm-tick svg { width: 15px; height: 15px; display: block; margin: 0 auto; }
  #soft-app .cm-mark {
    flex: 0 0 auto; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
    color: var(--ghost); font-size: 15px;
  }
  #soft-app .cm-mark.did { color: var(--live); }
  #soft-app .cm-mark svg { width: 15px; height: 15px; display: block; }
  #soft-app .cm-t { flex: 1; min-width: 0; }
  #soft-app .cm-t b { display: block; font-weight: 500; font-size: 14.5px; }
  #soft-app .cm-t em { display: block; font-style: normal; font-size: 12.5px; color: var(--dim); margin-top: 2px; }
  #soft-app .cmrow.closed { opacity: .6; }
  #soft-app .cmrow.closed .cm-t b { text-decoration: line-through; }
  #soft-app .cm-go {
    flex: 0 0 auto; background: none; border: 1px solid var(--line); color: var(--ghost);
    border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12px; cursor: pointer;
  }
  #soft-app .cm-go:hover { color: var(--text); border-color: var(--ghost); }

  #soft-app .trackrow { display: flex; align-items: center; gap: 9px; padding: 6px 0; }
  #soft-app .trackrow .cd { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
  #soft-app .tr-l { flex: 1; min-width: 0; font-size: 14px; }
  #soft-app .tr-seg { display: flex; gap: 4px; flex: 0 0 auto; }
  #soft-app .tr-b {
    background: none; border: 1px solid var(--line); color: var(--dim);
    border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer;
  }
  #soft-app .tr-b.on { background: var(--live); border-color: var(--live); color: var(--on-live); font-weight: 600; }
  @media (pointer: coarse) {
    #soft-app .ck-acts button { padding: 9px 15px; }
    #soft-app .tr-b { padding: 8px 14px; }
    #soft-app .cm-tick { width: 28px; height: 28px; }
  }

  /* ---- the weekly sitting --------------------------------------------------
     A prompt, not an alarm: it appears on the day it is due and waits. */
  #soft-app .sitprompt { margin: 14px 0 4px; }
  #soft-app .sp-row {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    border: 1px solid var(--line); border-left: 3px solid var(--live);
    border-radius: 14px; background: var(--raise); padding: 12px 14px;
  }
  #soft-app .sp-row + .sp-row { margin-top: 8px; }
  #soft-app .sp-row span { flex: 1; min-width: 180px; font-size: 14px; line-height: 1.5; }
  #soft-app .sp-row .go {
    flex: 0 0 auto; background: var(--live); color: var(--on-live); border: 0;
    border-radius: 10px; padding: 9px 15px; font: inherit; font-weight: 600; cursor: pointer;
  }
  #soft-app .modal.sit { width: min(540px, calc(100vw - 28px)); }
  #soft-app .modal.sit .rvgrid { display: flex; flex-direction: column; gap: 2px; margin: 12px 0 14px; }

  /* The line that is meant to be uncomfortable. It gets the weight of a
     warning without the colour of an error, because nothing has gone wrong:
     the week simply does not fit, and that is a thing to decide about rather
     than a thing to fix. */
  #soft-app .ahead-hard {
    margin: 2px 0 14px; padding: 12px 14px; border-radius: 11px;
    font-size: 13.5px; line-height: 1.5; color: var(--text);
    background: var(--live-soft); border: 1px solid var(--live);
  }
  #soft-app .ahead-hard b { font-weight: 600; font-variant-numeric: tabular-nums; }

  /* A second miss in a row. Loud enough to be the next thing you do, quiet
     enough that it is clearly not a telling off: nothing has gone wrong, a
     pattern is just starting and this is the moment it is cheapest to stop. */
  #soft-app .sliplist { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 4px; }
  #soft-app .slip {
    padding: 12px 14px; border-radius: 12px;
    background: var(--live-soft); border: 1px solid var(--live);
  }
  #soft-app .slip p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.5; }
  /* .go has no base rule in this stylesheet, it is dressed per context, so a
     button in a new place arrives as a raw browser button. It has to be
     styled here or it turns up white and square in the middle of the day. */
  #soft-app .slip .go {
    margin: 0; background: var(--live); color: var(--on-live);
    border: 0; border-radius: 10px; padding: 10px 16px;
    font: inherit; font-weight: 600; cursor: pointer;
  }

  /* And a mark on the chip itself, so the state is still there once the
     words have been acted on or scrolled past. */
  #soft-app .chip.slipping { border-style: dashed; border-color: var(--live); }

  /* Who you are becoming, at the top of the sitting. It reads as a statement
     rather than a statistic, because that is what it is: the frame the rest
     of the numbers sit inside. */
  #soft-app .ident { margin: 2px 0 16px; }
  #soft-app .ident-who {
    margin: 0 0 6px; font-family: var(--serif); font-weight: 400;
    font-size: 18px; line-height: 1.35; color: var(--text);
  }
  #soft-app .ident-who b { font-weight: 400; font-style: italic; }
  #soft-app .ident-score {
    margin: 0; font-size: 13px; color: var(--dim);
    font-variant-numeric: tabular-nums;
  }
  #soft-app .ident-score b { color: var(--text); font-weight: 600; }
  #soft-app .modal.sit .ck-row:first-of-type { border-top: 1px solid var(--line); }
  #soft-app .modal.sit .gform { margin-top: 8px; }

  /* ---- the coach's own voice ----------------------------------------------
     Set apart from the counted half, because it is the one part of the sitting
     that is an opinion rather than a fact. */
  #soft-app .notice {
    border-left: 3px solid var(--live); background: var(--raise);
    border-radius: 0 12px 12px 0; padding: 12px 14px; margin: 4px 0 16px;
  }
  #soft-app .notice p { margin: 0; font-size: 14.5px; line-height: 1.6; }
  #soft-app .notelist { display: flex; flex-direction: column; }
  #soft-app .noterow { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
  #soft-app .nt-t { flex: 1; min-width: 0; font-size: 14px; line-height: 1.5; }
  #soft-app .nt-t em { display: block; font-style: normal; font-size: 12px; color: var(--ghost); margin-top: 2px; }
  #soft-app .noterow .del { flex: 0 0 auto; }
  #soft-app .parkwait { font-style: normal; font-size: 12px; color: var(--ghost); margin-right: 6px; }
  /* Twelve weeks instead of twenty eight days, so the cells breathe. */
  #soft-app .hgrid.wk { grid-template-columns: repeat(6, 11px); }
  /* Past six, the pips go into even rows rather than wrapping wherever they
     happen to land. Ten reads as five and five, which you can count at a
     glance, instead of seven and three, which you cannot. */
  #soft-app .chip .pips {
    display: grid; grid-template-columns: repeat(var(--pc, 6), 7px);
    gap: 5px 4px; justify-content: end; align-content: center;
  }

  /* ---- the three rocks ----------------------------------------------------
     What today is for, above what today merely contains. Numbered, because
     three is the point and a fourth would have nowhere to go. */
  #soft-app .rocks {
    display: flex; align-items: center; gap: 12px;
    border: 1px solid var(--line); border-left: 3px solid var(--live);
    border-radius: 14px; background: var(--raise); padding: 12px 14px; margin: 14px 0 4px;
  }
  #soft-app .rk-main { flex: 1; min-width: 0; }
  /* The jar. Stones fill from the bottom as they are ticked. */
  /* Width and height come from the markup, sized to the number of rocks. */
  #soft-app .jar { flex: 0 0 auto; display: block; }
  #soft-app .jar .jrim { fill: none; stroke: var(--ghost); stroke-width: 1.7; }
  #soft-app .jar .jbody { fill: var(--bg); fill-opacity: .5; stroke: var(--ghost); stroke-width: 1.7; }
  /* An empty stone is a ghosted stone, not a dotted outline. It has to read as
     a place waiting to be filled, or the jar just looks like empty glass. */
  #soft-app .jar .jst {
    fill: var(--ghost); fill-opacity: .18;
    stroke: var(--ghost); stroke-opacity: .55; stroke-width: 1.3;
    transition: fill-opacity .2s, stroke-opacity .2s;
  }
  #soft-app .jar .jst.on { fill: var(--live); fill-opacity: 1; stroke: var(--live); stroke-opacity: 1; }
  #soft-app .rk-h {
    font-family: var(--serif); font-size: 12.5px; color: var(--dim);
    text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px;
  }
  #soft-app .rkrow { display: flex; align-items: center; gap: 11px; padding: 6px 0; }
  #soft-app .rkrow + .rkrow { border-top: 1px solid var(--line); }
  #soft-app .rk-tick {
    flex: 0 0 auto; width: 26px; height: 26px; padding: 0; cursor: pointer;
    background: none; border: 1.5px solid var(--ghost); border-radius: 50%;
    color: var(--dim); font: inherit; font-size: 13px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
  }
  #soft-app .rk-tick:hover { border-color: var(--live); color: var(--live); }
  #soft-app .rk-tick svg { width: 15px; height: 15px; display: block; }
  #soft-app .rkrow.done .rk-tick { background: var(--live); border-color: var(--live); color: var(--on-live); }
  #soft-app .rkrow.done .rk-t b { text-decoration: line-through; opacity: .7; }
  #soft-app .rk-t { flex: 1; min-width: 0; }
  #soft-app .rk-t b { display: block; font-weight: 600; font-size: 15px; }
  #soft-app .rk-t em { display: block; font-style: normal; font-size: 12.5px; color: var(--dim); margin-top: 1px; }

  /* the check-in itself */
  #soft-app .mrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  #soft-app .mrow .cd { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
  #soft-app .mr-t { flex: 1; min-width: 0; font-size: 14.5px; }
  #soft-app .mr-t em { display: block; font-style: normal; font-size: 12.5px; color: var(--dim); margin-top: 1px; }
  #soft-app .mr-when {
    flex: 0 0 auto; background: var(--raise); border: 1px solid var(--line); color: var(--text);
    border-radius: 9px; padding: 7px 9px; font: inherit; font-size: 13px;
    -webkit-appearance: none; appearance: none; max-width: 42%;
  }
  #soft-app .mr-fixed { flex: 0 0 auto; font-style: normal; font-size: 12px; color: var(--ghost); }
  #soft-app .rk-n {
    flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
    background: var(--live); color: var(--on-live); font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
  }
  #soft-app .rkpick {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    background: none; border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 12px; margin-bottom: 6px; color: var(--text); font: inherit; cursor: pointer;
  }
  #soft-app .rkpick:hover { border-color: var(--live); }
  #soft-app .rkpick .rk-t b { font-weight: 500; font-size: 14.5px; }
  #soft-app .rk-plus { flex: 0 0 auto; color: var(--live); font-size: 18px; line-height: 1; }
  @media (pointer: coarse) {
    #soft-app .rk-tick { width: 30px; height: 30px; }
    #soft-app .mr-when { padding: 9px 10px; }
  }

  /* ---- things you can now change your mind about -------------------------- */
  #soft-app .habname {
    background: none; border: 0; padding: 0; font: inherit; font-weight: 600;
    color: var(--text); cursor: pointer; text-align: left;
  }
  #soft-app .habname:hover { color: var(--live); }
  /* The scratchpad and To place both live in the side panels, which sit
     outside #soft-app. Scoping these to #soft-app meant they never reached
     the panel, where .parked li button was left styling the words at 19px and
     dim, and a bare button kept its browser default box. The rest of the
     panel's own rules are written unscoped or against .ath-side, so these are
     too, and .parked li .parktext has to outrank .parked li button. */
  .parked li .parktext {
    flex: 1; min-width: 0; background: none; border: 0; padding: 0;
    font: inherit; color: var(--text); cursor: pointer; text-align: left;
    line-height: inherit;
  }
  .parked li .parktext:hover { color: var(--live); }
  .parked li.editing input {
    flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--live);
    color: var(--text); border-radius: 8px; padding: 6px 9px; font: inherit;
  }
  .ptask .pt {
    background: none; border: 0; padding: 0; font: inherit;
    color: inherit; cursor: pointer; text-align: left;
  }
  .ptask .pt:hover b { color: var(--live); }
  /* Category sits beside the time on a routine card and wraps under it when
     there is no room. */
  #soft-app .rwhen select {
    background: var(--raise); border: 1px solid var(--line); color: var(--text);
    border-radius: 9px; padding: 7px 9px; font: inherit; font-size: 13px;
    -webkit-appearance: none; appearance: none; max-width: 140px;
  }

  /* ---- the ask box as a conversation ---------------------------------------
     Yours on the right, Athena's on the left, so a thread reads as a thread
     rather than a stack of identical cards. */
  #soft-app .askthread { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
  #soft-app .asay { max-width: 86%; }
  #soft-app .asay p {
    margin: 0; padding: 10px 13px; font-size: 14.5px; line-height: 1.55;
    border: 1px solid var(--line); border-radius: 14px; background: var(--raise);
  }
  #soft-app .asay.me { align-self: flex-end; }
  #soft-app .asay.me p {
    background: var(--live); color: var(--on-live); border-color: var(--live);
    border-bottom-right-radius: 5px;
  }
  #soft-app .asay.her { align-self: flex-start; }
  #soft-app .asay.her p { border-bottom-left-radius: 5px; }
  #soft-app .asay.thinking p { color: var(--ghost); font-style: italic; }
  #soft-app .askclear { align-self: flex-start; font-size: 12.5px; padding-top: 2px; }

  /* ---- backup and restore -------------------------------------------------
     The comparison is the whole point: you should see what you are about to
     lose before you lose it, not after. */
  /* One column, one width. A button sizes itself to its words and a label
     fills the line, so without this the three came out ragged: a short
     "Download a backup", a full width "Restore from a file", and a medium
     "Restore to an earlier day". */
  #soft-app .datalist { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 12px; }
  #soft-app .datalist > .ghost { display: block; width: 100%; text-align: center; margin: 0; }
  /* And the lone buttons in the sections above, so the whole panel is one
     column rather than three sections that each choose their own width. The
     child selector matters: Cancel and Save live inside .modal-actions and
     must stay side by side. */
  #soft-app .modal > .ghost { display: block; width: 100%; text-align: center; margin: 2px 0 0; }
  #soft-app .filebtn { cursor: pointer; }
  #soft-app .filebtn input { display: none; }
  #soft-app .snaplist { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 4px; }
  #soft-app .snaprow {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--raise); border: 1px solid var(--line); border-radius: 10px;
    padding: 10px 13px; font: inherit; color: var(--text); cursor: pointer; text-align: left;
  }
  #soft-app .snaprow:hover { border-color: var(--live); }
  #soft-app .snaprow em { font-style: normal; font-size: 12.5px; color: var(--ghost); }
  #soft-app .rstab { margin: 12px 0 4px; }
  #soft-app .rsrow {
    display: grid; grid-template-columns: 1fr 64px 84px; gap: 8px;
    padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px;
  }
  #soft-app .rsrow span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
  #soft-app .rsrow.rshead { color: var(--ghost); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
  #soft-app .rsrow.diff span:last-child { color: var(--live); font-weight: 600; }
