/* Apple look with a tad of corkboard (2026-11-14). Loaded after app.css and only overrides it:
   remove the <link> in index.html to go back to the old look. The landing page does not load this file. */
:root {
  /* Corkdoor's own faces stay: Red Hat Text for reading, Red Hat Display for titles and the big numbers */
  --font-ui: var(--font-body);
  --font-round: var(--font-display);
  --app-sand: oklch(93.5% 0.03 76);          /* the page: a pale, warm cork instead of sand */
  --ios-sep: oklch(18% 0.006 60 / 0.12);
  --ios-2: oklch(18% 0.006 60 / 0.56);
  --tint: oklch(62% 0.19 40);
  --radius-card: 14px;
  --shadow-card: 0 1px 2px oklch(18% 0.006 60 / 0.05), 0 10px 26px -18px oklch(18% 0.006 60 / 0.3);
  /* a faint cork grain over the whole page */
  --cork-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.36 0 0 0 0 0.22 0 0 0 0 0.1 0 0 0 0.2 -0.067'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body { background: var(--cork-grain), var(--app-sand); }

/* top bar: frosted, thin line */
.top { background: oklch(93.5% 0.03 76 / 0.82); background: color-mix(in oklab, var(--app-sand) 74%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); border-bottom: 0.5px solid var(--ios-sep); }
/* the page title in the top bar: a real title, a size between a label and the old page heading */
.top-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
@media (max-width: 1023px), (hover: none), (pointer: coarse) { .top-title { font-size: 1.25rem; } }

/* cards: rounder, no outline, a soft shadow */
.card { border-color: transparent; border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.btn { border-radius: 12px; }
.chip { border-color: transparent; box-shadow: 0 0 0 0.5px var(--ios-sep); }
input, select, textarea { border-radius: 12px; border-color: transparent; box-shadow: 0 0 0 0.5px var(--ios-sep); }
/* tick boxes and radio buttons keep their own native shape: the rounded corner and hairline ring above drew a broken circle around them */
input[type="checkbox"], input[type="radio"] { border: 0; border-radius: 4px; box-shadow: none; background: none; flex: none; margin: 0; }
input[type="radio"] { border-radius: 50%; }
/* section labels become real titles: "Coming up", "Receipts", "Latest receipts" */
h2.sub { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; text-transform: none; letter-spacing: -0.015em; color: var(--color-ink); line-height: 1.2; }
.card h2.sub { font-size: 1.0625rem; }
.pile-name { font-size: 1.0625rem; }
.top-title { font-family: var(--font-display); }

/* lists become one rounded group with thin inset dividers, like Settings */
.list:not(.unit-papers) { gap: 0; background: var(--color-sheet); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; }
.list:not(.unit-papers) > li { position: relative; }
.list:not(.unit-papers) > li > .card { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.list:not(.unit-papers) > li + li::before { content: ""; position: absolute; left: 16px; right: 0; top: 0; height: 0.5px; background: var(--ios-sep); z-index: 1; }
.list.cols { grid-template-columns: 1fr !important; }

/* the Units page and this month's papers on the Overview: no wooden frame, straight Apple cards on the cork, one small pin each */
.board.units-board { border: 0; background: transparent; box-shadow: none; padding: 0; }
.unit-papers { gap: var(--space-md); }
.unit-papers > .unit { --tilt: 0deg !important; border-radius: 18px; box-shadow: 0 1px 2px oklch(18% 0.006 60 / 0.06), 0 14px 32px -20px oklch(18% 0.006 60 / 0.4); }
.unit-papers > .unit::before { width: 13px; height: 13px; margin-left: -6.5px; top: -6px; z-index: 2;
  background: radial-gradient(circle at 34% 30%, oklch(82% 0.13 45), var(--color-accent) 45%, oklch(48% 0.17 35)); box-shadow: 0 3px 4px -1px oklch(15% 0.03 40 / 0.6); }
.unit-papers > .unit .unit-name { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
/* a unit's receipt piles: no wooden frame; each pile is a white card, its receipts plain rows with thin dividers */
.board:not(.units-board) { border: 0; background: transparent; box-shadow: none; padding: 0; }
.board:not(.units-board) .pile { background: var(--color-sheet); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 14px 14px 8px; }
.board:not(.units-board) .pile-head { border-bottom-color: var(--ios-sep); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 10px; }
/* the category's little picture, on a soft tint of its own colour */
.cat-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: oklch(93% 0.045 var(--hue)); color: oklch(50% 0.13 var(--hue)); }
.cat-ico svg { width: 19px; height: 19px; }
.cat-ico.big { width: 52px; height: 52px; border-radius: 15px; }
.cat-ico.big svg { width: 28px; height: 28px; }
/* Your categories: the picture is a button that opens the picker */
.cat-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 10px; }
.cat-ico-btn { all: unset; cursor: pointer; border-radius: 10px; position: relative; }
.cat-ico-btn::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; background: var(--color-sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16z'/%3E%3C/svg%3E") center / 8px no-repeat; box-shadow: 0 0 0 0.5px var(--ios-sep), 0 1px 2px oklch(18% 0.006 60 / 0.2); }
.cat-ico-btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
/* Change photo: the whole picture, dimmed, with a clear box showing the part that will be visible */
.photo-sheet { display: grid; gap: 10px; }
.photo-sheet h2 { margin-bottom: 4px; }
.frame-stage { position: relative; overflow: hidden; border-radius: 14px; touch-action: none; user-select: none; cursor: grab; background: var(--app-sand-3); }
.frame-stage:active { cursor: grabbing; }
.frame-stage[hidden], .frame-empty[hidden] { display: none; }
.frame-img { display: block; width: 100%; height: auto; max-height: 52svh; object-fit: contain; pointer-events: none; }
.frame-box { position: absolute; left: 0; top: 0; border: 2px solid #fff; border-radius: 4px; outline: 600px solid rgba(20, 16, 12, 0.55); }
.frame-box:focus-visible { border-color: var(--color-accent); outline: 600px solid rgba(20, 16, 12, 0.55); }
.frame-box::before, .frame-box::after { content: ""; position: absolute; inset: 33.3% 0; border-block: 1px solid oklch(100% 0 0 / 0.35); pointer-events: none; }
.frame-box::after { inset: 0 33.3%; border-block: 0; border-inline: 1px solid oklch(100% 0 0 / 0.35); }
.frame-empty { height: 160px; border-radius: 14px; border: 1.5px dashed oklch(40% 0.06 60 / 0.25); display: grid; place-items: center; color: var(--ios-2); font-size: 14px; }
.photo-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.photo-acts .btn svg { width: 18px; height: 18px; }
/* the picker sheet */
.cat-pick h2 { margin-bottom: 10px; }
.pick-prev { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 1.0625rem; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; margin-bottom: 14px; }
.pick-ico { all: unset; cursor: pointer; display: grid; place-items: center; height: 48px; border-radius: 12px; }
.pick-ico[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--color-ink); }
.pick-ico:focus-visible, .pick-dot:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.pick-colors { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.pick-dot { all: unset; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; background: oklch(68% 0.14 var(--hue)); box-shadow: inset 0 0 0 3px oklch(93% 0.045 var(--hue)); }
.pick-dot[aria-pressed="true"] { box-shadow: inset 0 0 0 3px oklch(93% 0.045 var(--hue)), 0 0 0 2px var(--color-ink); }

/* the top bar: a unit's name, then its address in grey on the same line, and Details at the right end */
.top-title.has-sub { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.top-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-body); font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--ios-2); }
.top-title.has-sub { white-space: nowrap; }
.top-act { flex: none; display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--color-ink); text-decoration: none;
  background: oklch(99% 0 0 / 0.6); box-shadow: 0 0 0 0.5px var(--ios-sep); }
.top-act[hidden] { display: none; }
.top-act:hover { background: var(--color-sheet); }
.top-act:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
/* on a phone the brand steps aside on a page with a subtitle, so the name and address have room */
@media (max-width: 1023px), (hover: none), (pointer: coarse) { .top:has(.top-title.has-sub) .brand { display: none; } .top-title.has-sub { text-align: left; } }
.board:not(.units-board) .slips { gap: 0; }
.board:not(.units-board) .slip { transform: none; box-shadow: none; border-radius: 0; padding: 9px 2px; background: transparent; }
.board:not(.units-board) .slips > li + li .slip { border-top: 0.5px solid var(--ios-sep); }
.board:not(.units-board) .slip::before { display: none; }
.board:not(.units-board) .slip-bar { margin: -9px -2px 4px; padding-left: 8px; border-radius: 4px; }
.board:not(.units-board) .pile-more { border-style: solid; border-color: var(--ios-sep); }
/* a unit card with a photo: the photo runs across the top of the card */
.ucard.has-photo { padding-top: 0; overflow: visible; }
.ucard-photo { display: block; height: 150px; margin: 0 calc(-1 * var(--space-md)) var(--space-xs); border-radius: 18px 18px 0 0; background-size: cover; background-position: 50% 50%; }
.ucard-net { display: grid; gap: 2px; margin: 2px 0 6px; }
.ucard-k { font-size: 13px; font-weight: 600; color: var(--ios-2); text-decoration: none; }
.ucard-fig { font-family: var(--font-round); font-weight: 600; font-size: 2.2rem; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--color-ink); text-decoration: none; margin-bottom: 4px; }
.ucard-fig sup { font-size: 0.45em; vertical-align: 0.8em; margin-right: 1px; letter-spacing: 0; }
.ucard-fig .c { font-size: 0.45em; letter-spacing: 0; color: oklch(18% 0.006 60 / 0.3); }
.ucard-fig.neg { color: var(--color-error); }
@media (min-width: 700px) { .unit-papers:not(.this-month .unit-papers) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- phone and tablet: a floating glass tab bar, the + as its own round button beside it ---------- */
@media (max-width: 1023px), (hover: none), (pointer: coarse) {
  :root { --nav-h: 84px; }
  .nav { background: transparent; border-top: 0; padding: 0 12px calc(var(--safe-b) + 10px); pointer-events: none; }
  .nav-in { height: 64px; grid-template-columns: repeat(4, minmax(0, 1fr)) 62px; column-gap: 10px; border: 0 !important; pointer-events: auto; align-items: center; }
  .nav-in::before { content: ""; grid-column: 1 / 5; grid-row: 1; align-self: stretch; margin-block: 1px; border-radius: 999px;
    background: oklch(99% 0.004 85 / 0.74); -webkit-backdrop-filter: blur(22px) saturate(1.8); backdrop-filter: blur(22px) saturate(1.8);
    border: 1px solid oklch(100% 0 0 / 0.8); box-shadow: 0 8px 26px -10px oklch(18% 0.006 60 / 0.35), inset 0 1px 0 oklch(100% 0 0 / 0.9); }
  .nav-in > :nth-child(1) { grid-column: 1; } .nav-in > :nth-child(2) { grid-column: 2; } .nav-in > :nth-child(4) { grid-column: 3; } .nav-in > :nth-child(5) { grid-column: 4; }
  .nav-in > * { grid-row: 1; position: relative; z-index: 1; }
  .nav a { height: 52px; margin: 0 4px; border-radius: 999px; font-size: 10px; font-weight: 600; gap: 1px; color: oklch(18% 0.006 60 / 0.78); }
  .nav a[aria-current="page"] { color: var(--tint); background: oklch(18% 0.006 60 / 0.07); }
  .nav a[aria-current="page"] svg { color: var(--tint); }
  .snap { grid-column: 5; margin: 0; width: 62px; height: 62px; border: 1px solid oklch(100% 0 0 / 0.5);
    box-shadow: 0 8px 22px -8px oklch(50% 0.17 40 / 0.65), inset 0 1px 0 oklch(100% 0 0 / 0.45); }
  .snapmenu { justify-content: flex-end; }
}

/* ---------- the top of the Overview and of a unit page ---------- */
.hero { position: relative; margin: 0 0 18px; }
.hero:has(.hero-chip) { margin-bottom: 32px; }
.hero-back { position: relative; height: 176px; }
.hero-paper { position: relative; z-index: 2; margin: -46px 6px 0; background: var(--color-sheet); border-radius: 18px; padding: 18px 18px 18px; transform: rotate(-0.6deg);
  box-shadow: 0 1px 2px oklch(18% 0.006 60 / 0.06), 0 18px 40px -20px oklch(18% 0.006 60 / 0.45); }
.hero-paper.has-chip { padding-bottom: 30px; }
.hero-paper::before { content: ""; position: absolute; left: 50%; top: -7px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, oklch(82% 0.13 45), var(--color-accent) 45%, oklch(48% 0.17 35)); box-shadow: 0 3px 4px -1px oklch(15% 0.03 40 / 0.6); }
.hero-k { font-size: 13px; font-weight: 600; color: var(--ios-2); }
.hero-net { font-family: var(--font-round); font-weight: 600; font-size: clamp(2.6rem, 11vw, 3.5rem); line-height: 0.95; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 4px 0 10px; white-space: nowrap; }
.hero-net sup { font-size: 0.42em; vertical-align: 0.95em; letter-spacing: 0; margin-right: 2px; }
.hero-net .c { font-size: 0.42em; letter-spacing: 0; color: oklch(18% 0.006 60 / 0.3); }
.hero-net.neg { color: var(--color-error); }
.hero-net .minus { margin-right: 3px; }
.hero-tiny { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ios-2); }
.hero-tiny a, .hero-tiny span { color: inherit; text-decoration: none; min-height: 24px; display: inline-flex; align-items: center; gap: 4px; }
.hero-tiny b { color: var(--color-ink-2); font-weight: 600; }
.hero-tiny a:hover b, .hero-tiny a:focus-visible b { text-decoration: underline; text-underline-offset: 3px; }
.hero-chip { position: absolute; right: 18px; bottom: -17px; display: inline-flex; align-items: center; gap: 7px; min-height: 34px; max-width: calc(100% - 36px); padding: 7px 14px 7px 12px;
  border-radius: 999px; background: oklch(22% 0.006 60); color: oklch(99% 0.003 85); font-size: 13px; font-weight: 600; line-height: 1.2; text-decoration: none; transform: rotate(0.6deg);
  box-shadow: 0 2px 3px oklch(18% 0.006 60 / 0.2), 0 16px 24px -10px oklch(18% 0.006 60 / 0.6); }
.hero-chip i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); }
.hero-chip:active { transform: rotate(0.6deg) translateY(1px); }
/* the black pin as a stack: the same pin, in the page flow so opening "Show more" pushes everything below it down */
.hero-chips-wrap { max-width: 560px; margin: 0 6px; }
@media (min-width: 600px) { .hero-chips-wrap { margin-left: auto; margin-right: auto; } }
.hero-chips { position: relative; z-index: 3; width: fit-content; max-width: calc(100% - 36px); margin: -17px 18px 0 auto; padding: 3px 4px; display: grid; border-radius: 20px;
  background: oklch(22% 0.006 60); color: oklch(99% 0.003 85); transform: rotate(0.6deg);
  box-shadow: 0 2px 3px oklch(18% 0.006 60 / 0.2), 0 16px 24px -10px oklch(18% 0.006 60 / 0.6); }
.hero-chips > a, .hero-chips > .more { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 10px; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.25;
  color: inherit; text-decoration: none; text-align: left; background: none; border: 0; cursor: pointer; }
.hero-chips > * + * { border-top: 1px solid oklch(38% 0.006 60); }
.hero-chips > a i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); }
.hero-chips > .more { color: oklch(82% 0.01 85); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.hero-chips > a:focus-visible, .hero-chips > .more:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 14px; }
@media (prefers-reduced-motion: reduce) { .hero-chips { transform: none; } }
.hero-hint { margin: -6px 2px 12px; }

/* back layer: months */
.hb-months { padding: 26px 8px 0; }
.hb-bars { --bh: 78px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: var(--bh); border-bottom: 1px solid oklch(40% 0.06 60 / 0.18); }
.hb-bars i { display: block; height: calc(var(--v) * 1%); border-radius: 4px 4px 1px 1px; background: oklch(40% 0.06 60 / 0.11); }
.hb-bars i.neg { align-self: start; margin-top: var(--bh); height: calc(var(--v) * 0.3%); border-radius: 1px 1px 4px 4px; background: oklch(52% 0.19 27 / 0.28); }
.hb-bars i.now { background: oklch(70% 0.19 40 / 0.5); }
.hb-bars i.future { height: 5%; background: transparent; border: 1px dashed oklch(40% 0.06 60 / 0.22); }
.hb-labels { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; margin-top: 4px; font-size: 10px; font-weight: 600; color: oklch(40% 0.06 60 / 0.45); text-align: center; }
/* back layer: the year */
.hb-year { padding-top: 40px; text-align: center; font-family: var(--font-round); font-weight: 600; font-size: 124px; line-height: 0.8; letter-spacing: -0.05em; color: oklch(40% 0.06 60 / 0.13); white-space: nowrap; overflow: hidden; }
/* back layer: tax day */
.hb-tax { display: grid; justify-items: center; align-content: start; padding-top: 22px; }
.hb-num { font-family: var(--font-round); font-weight: 600; font-size: 100px; line-height: 0.85; letter-spacing: -0.05em; color: oklch(40% 0.06 60 / 0.14); }
.hb-lab { font-size: 12px; font-weight: 600; color: oklch(40% 0.06 60 / 0.55); margin-top: 4px; }
/* back layer: the photo of the place, a rounded picture inside the page */
.hb-photo { height: clamp(200px, 34vw, 300px); border-radius: 18px; overflow: hidden; background-size: cover; background-position: 50% 55%; box-shadow: 0 10px 26px -18px oklch(18% 0.006 60 / 0.5); }
.hero[data-back="photo"] .hero-paper { margin-top: -56px; }
/* the paper keeps a readable width on a wide screen and sits centred on what is behind it */
.hero-paper { max-width: 560px; }
@media (min-width: 600px) { .hero-paper { margin-left: auto; margin-right: auto; } .hero-chip { right: 22px; } }
/* unit page: address on the left and Details on the right, on one line under the picture */
.unit-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-sm); }
.unit-head > .unit-top { grid-column: 2; grid-row: 1; }
.unit-head > .muted { grid-column: 1; grid-row: 1; margin: 0 !important; }
.unit-head > :not(.unit-top):not(.muted) { grid-column: 1 / -1; }
.unit-notes { margin-top: var(--space-xs); }
.hb-empty { height: 150px; border-radius: 18px; border: 1.5px dashed oklch(40% 0.06 60 / 0.25); display: grid; place-items: center; padding-bottom: 40px; color: var(--ios-2); font-size: 13px; }
.hero-photo-btn { position: absolute; z-index: 3; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font: 600 13px/1 var(--font-ui);
  color: #fff; background: oklch(15% 0.01 60 / 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid oklch(100% 0 0 / 0.35); cursor: pointer; }
.hero-photo-btn svg { width: 16px; height: 16px; }
/* set to Photo with no photo yet: the months (or the name) behind, and a light "Add a photo" pill in the corner */
.hero[data-back="name"] .hero-photo-btn { color: var(--color-ink); background: var(--color-sheet); border-color: transparent; box-shadow: var(--shadow-card); white-space: nowrap; }
/* no photo: a colour poster the shape of a photo (its own soft colour per unit), the name in white, a faint house on the right */
.poster { position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, oklch(76% 0.08 var(--hue)), transparent 60%), linear-gradient(135deg, oklch(68% 0.1 var(--hue)), oklch(50% 0.12 var(--hue))); }
.poster::before { content: ""; position: absolute; inset: 0; background: var(--cork-grain); opacity: 0.9; mix-blend-mode: soft-light; pointer-events: none; }
.poster-art { position: absolute; right: -4%; bottom: -18%; width: 52%; max-width: 300px; aspect-ratio: 1; color: oklch(100% 0 0 / 0.22); pointer-events: none; }
.poster-art svg { width: 100%; height: 100%; }
.hb-poster { height: clamp(200px, 34vw, 300px); border-radius: 18px; box-shadow: 0 10px 26px -18px oklch(18% 0.006 60 / 0.5); }
.poster-name { position: absolute; left: 20px; right: 40%; bottom: 72px; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1; letter-spacing: -0.03em; text-wrap: balance; text-shadow: 0 1px 12px oklch(20% 0.05 var(--hue) / 0.35); }
.hero[data-back="name"] .hero-paper { margin-top: -56px; }
.hero[data-back="name"] .lk-pick { top: 12px; right: 12px; }
.hero[data-back="name"] .hero-photo-btn { left: 12px; top: 12px; }
a.ucard-photo-link { display: block; text-decoration: none; }
div.ucard-photo.poster { height: 150px; }

/* the small "Show in the back" menu */
.lk-pick { position: absolute; z-index: 4; right: 0; top: 0; }
.lk-btn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px 0 12px; border-radius: 999px; font: 600 12px/1 var(--font-ui); color: var(--color-ink-2); cursor: pointer;
  background: oklch(99% 0 0 / 0.62); -webkit-backdrop-filter: blur(12px) saturate(1.5); backdrop-filter: blur(12px) saturate(1.5); border: 1px solid oklch(100% 0 0 / 0.75); box-shadow: 0 2px 8px -3px oklch(18% 0.006 60 / 0.25); }
.lk-btn svg { width: 9px; height: 6px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7; }
.lk-menu { position: absolute; right: 0; top: 36px; width: 200px; padding: 6px 0; border-radius: 14px; display: grid; background: oklch(99% 0.003 85 / 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); box-shadow: 0 0 0 0.5px var(--ios-sep), 0 16px 36px -10px oklch(18% 0.006 60 / 0.45); }
.lk-menu[hidden] { display: none; }
.lk-h { font: 500 12px/1.3 var(--font-ui); color: var(--ios-2); padding: 6px 14px; }
.lk-menu button { all: unset; box-sizing: border-box; display: grid; align-items: center; min-height: 44px; padding: 0 14px; font: 400 16px/1 var(--font-ui); color: var(--color-ink); cursor: pointer; border-top: 0.5px solid var(--ios-sep); }
.lk-menu button:hover, .lk-menu button:focus-visible { background: oklch(18% 0.006 60 / 0.05); }
.lk-btn:focus-visible, .lk-menu button:focus-visible, .hero-chip:focus-visible, .hero-photo-btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.hero[data-back="photo"] .lk-pick { top: 12px; right: 12px; }

/* the one time tip, like Apple's TipKit */
.lk-tip { position: absolute; z-index: 5; right: 0; top: 42px; width: min(290px, 100%); padding: 14px 14px 12px; border-radius: 16px; background: oklch(99.5% 0.003 85 / 0.97);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: 0 0 0 0.5px var(--ios-sep), 0 18px 40px -12px oklch(18% 0.006 60 / 0.45); }
.lk-tip::before { content: ""; position: absolute; right: 30px; top: -7px; width: 14px; height: 14px; background: inherit; transform: rotate(45deg); border-radius: 3px 0 0 0; }
.hero[data-back="photo"] .lk-tip { top: 52px; }
.lk-tip-body b { display: block; font-size: 15px; font-weight: 600; padding-right: 24px; }
.lk-tip-body p { margin: 2px 0 8px; font-size: 13px; line-height: 1.35; color: var(--ios-2); }
.lk-tip-act { all: unset; cursor: pointer; font-size: 15px; font-weight: 500; color: var(--tint); }
.lk-tip-x { all: unset; cursor: pointer; position: absolute; right: 10px; top: 10px; width: 22px; height: 22px; border-radius: 50%; background: oklch(18% 0.006 60 / 0.07); }
.lk-tip-x::before, .lk-tip-x::after { content: ""; position: absolute; left: 7px; top: 10.25px; width: 8px; height: 1.5px; background: var(--ios-2); transform: rotate(45deg); }
.lk-tip-x::after { transform: rotate(-45deg); }
.lk-tip-act:focus-visible, .lk-tip-x:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* Profile: Top of the screen */
.look-row { display: grid; gap: 6px; padding-top: 10px; border-top: 0.5px solid var(--ios-sep); }

@media (prefers-reduced-motion: reduce) { .hero-paper, .hero-chip { transform: none; } }
/* an action under the choices in the "Show in the back" menu (Change photo…) */
.lk-menu .lk-extra { border-top: 6px solid oklch(18% 0.006 60 / 0.05); color: var(--tint); font-weight: 500; }

/* ---------- Rent: the year on a pinned paper, each unit's months as a row of pills in its own colour ---------- */
/* behind the paper: one bar per month, each unit's share stacked inside it in that unit's colour */
.hb-rent .hb-bars i.stack { display: flex; flex-direction: column-reverse; gap: 1px; overflow: hidden; background: transparent; }
.hb-rent .hb-bars i.stack b { display: block; min-height: 2px; background: oklch(78% 0.07 var(--hue) / 0.5); }
.hb-rent .hb-bars i.empty { height: 5%; background: transparent; border: 1px solid oklch(66% 0.17 40 / 0.45); }
.rent-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin: 4px 0 10px; }
.rent-bar select { width: auto; min-height: 36px; padding-block: 4px; }
/* a unit: its picture, name, a short line and the year's total, then twelve pills */
.rent-card { padding: 14px 14px 14px; margin-bottom: 12px; display: grid; gap: 12px; }
.rent-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.rent-thumb { width: 42px; height: 42px; border-radius: 50%; background-size: cover; background-position: 50% 50%; box-shadow: 0 0 0 2px var(--color-sheet), 0 0 0 3px oklch(78% 0.07 var(--hue, 60) / 0.6); display: grid; place-items: center; }
.rent-thumb.poster svg { width: 20px; height: 20px; color: #fff; position: relative; z-index: 1; }
.rent-who { display: grid; min-width: 0; }
.rent-name { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; color: var(--color-ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rent-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.rent-sub { font-size: 13px; color: var(--ios-2); }
.rent-total { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.rent-pills { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
.rent-pill { all: unset; box-sizing: border-box; position: relative; cursor: pointer; height: 36px; border-radius: 10px; display: grid; place-items: center;
  font: 600 12px/1 var(--font-body); transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro); }
.rent-pill.stterm { cursor: not-allowed; color: var(--color-error, #c0392b); background: color-mix(in oklab, var(--color-error, #c0392b) 12%, transparent); }
.rent-pill.paid { background: oklch(86% 0.07 var(--hue)); color: oklch(36% 0.08 var(--hue)); }
.rent-pill.short { background: linear-gradient(to top, oklch(86% 0.07 var(--hue)) 55%, oklch(95% 0.025 var(--hue)) 55%); color: oklch(36% 0.08 var(--hue)); }
.rent-pill.short i { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: oklch(76% 0.15 75); }
.rent-pill.missing { background: var(--color-sheet); color: oklch(56% 0.17 40); box-shadow: inset 0 0 0 1.5px oklch(70% 0.17 40); }
.rent-pill.future { color: oklch(18% 0.006 60 / 0.3); box-shadow: inset 0 0 0 1px oklch(18% 0.006 60 / 0.12); background: transparent; background-image: repeating-linear-gradient(135deg, transparent 0 5px, oklch(18% 0.006 60 / 0.04) 5px 6px); }
.rent-pill:hover:not([disabled]) { transform: translateY(-1px); }
.rent-pill[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--color-ink); }
.rent-pill.missing[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px oklch(70% 0.17 40), 0 0 0 2px var(--color-ink); }
.rent-pill:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.rent-pill[disabled] { cursor: default; opacity: 0.75; }
@media (min-width: 700px) { .rent-pill { height: 40px; font-size: 13px; } }
.rent-card .rent-edit { border-top: 0.5px solid var(--ios-sep); padding-top: 12px; margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .rent-pill { transition: none; } }
/* Record rent automatically: a switch at the foot of each unit card (coming soon; tried out on previews) */
.rent-auto { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 0.5px solid var(--ios-sep); }
.rent-auto-t { display: grid; gap: 1px; min-width: 0; }
.rent-auto-t span { font-size: 15px; font-weight: 500; }
.rent-auto-t small { font-size: 12.5px; color: var(--ios-2); }
.rent-auto .switch[aria-checked="true"] { background: oklch(66% 0.12 var(--hue)); }
.rent-auto .soon-tip { top: calc(100% + 10px); right: -4px; z-index: 6; }
.rent-auto .soon-tip::before { right: 22px; }
/* while it is on: months still to come show as waiting to be recorded, in the unit's colour */
.rent-pill.future.auto { background: oklch(95% 0.03 var(--hue)); color: oklch(45% 0.08 var(--hue)); box-shadow: inset 0 0 0 1.5px oklch(80% 0.07 var(--hue)); background-image: none; }
.rent-pill.future.auto::after { content: ""; position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: oklch(66% 0.12 var(--hue)); }
.rent-card.is-auto .rent-sub { color: oklch(45% 0.1 var(--hue)); font-weight: 500; }
/* the Coming soon tip, a little tighter */
.soon-tip { width: min(250px, 100%); padding: 12px 12px 10px; }
.soon-tip .lk-tip-body b { font-size: 14px; }
.soon-tip .lk-tip-body p { font-size: 12.5px; }
/* on the Details page the switch sits under Usual monthly rent */
.ud-auto .rent-auto { border-top: 0; padding: 4px 0 0; }
.ud-auto .soon-tip { right: 0; }

/* ---------- Money: Rent in | Expenses ---------- */
.money-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; margin: 2px 0 18px; border-radius: 12px; background: oklch(18% 0.006 60 / 0.07); max-width: 420px; }
.seg-tab { display: grid; place-items: center; min-height: 34px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--color-ink-2); text-decoration: none; }
.seg-tab[aria-current="page"] { background: var(--color-sheet); color: var(--color-ink); box-shadow: 0 1px 2px oklch(18% 0.006 60 / 0.12), 0 3px 8px -4px oklch(18% 0.006 60 / 0.25); }
.seg-tab:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
@media (min-width: 600px) { .money-tabs { margin-inline: auto; } }

/* rent: a vacant month (calm grey, nothing expected) and a month with other income (a small dot) */
.rent-pill.vacant { background: oklch(18% 0.006 60 / 0.06); color: oklch(18% 0.006 60 / 0.4); text-decoration: line-through; text-decoration-thickness: 1px; }
.rent-pill.has-extra::after { content: ""; position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: oklch(45% 0.1 var(--hue)); }
.hb-rent .hb-bars i.none { height: 4%; background: oklch(40% 0.06 60 / 0.1); }
.re-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.re-vacant { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--color-ink-2); }
.re-money, .re-extra { display: grid; gap: 10px; }
.re-money[hidden], .re-extra[hidden] { display: none; }

/* expenses: one row per category, with its share of the year as a thin bar in its colour */
.x-sels { display: flex; gap: 8px; }
.x-sels select { width: auto; min-height: 36px; padding-block: 4px; }
.xcats > li { position: relative; }
.xcat { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto 12px; align-items: center; gap: 12px; padding: 12px 14px; }
.xcat:hover { background: oklch(18% 0.006 60 / 0.025); }
.xcat:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.xcat-main { display: grid; gap: 3px; min-width: 0; }
.xcat-name { font-family: var(--font-display); font-weight: 600; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xcat-sub { font-size: 12.5px; color: var(--ios-2); }
.xcat-bar { display: block; height: 4px; border-radius: 4px; background: oklch(18% 0.006 60 / 0.06); overflow: hidden; margin-top: 2px; }
.xcat-bar i { display: block; height: 100%; border-radius: 4px; background: oklch(68% 0.12 var(--hue)); }
.xcat-amt { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; }
.xcat .chev { width: 7px; height: 12px; background: oklch(18% 0.006 60 / 0.3); clip-path: polygon(0 8%, 14% 0, 100% 50%, 14% 100%, 0 92%, 70% 50%); transition: transform var(--dur-short) var(--ease-out); }
.xcat[aria-expanded="true"] .chev { transform: rotate(90deg); }
.xcat-list { list-style: none; margin: 0; padding: 0 14px 8px 60px; display: grid; }
.xcat-list a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 0.5px solid var(--ios-sep); color: inherit; text-decoration: none; font-size: 14px; }
.xcat-list a > span:first-child { display: grid; min-width: 0; }
.xcat-list b { font-weight: 600; }
.xcat-list small { color: var(--ios-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xcat-r-amt { font-variant-numeric: tabular-nums; font-weight: 500; }
.xcat-more { color: var(--tint) !important; font-weight: 500; }
@media (max-width: 479px) { .xcat-list { padding-left: 14px; } }
/* Money: one tab with a switch on a phone; Rent and Expenses as two sidebar entries on a computer */
.nav .lbl-desk, .nav .nav-desk { display: none; }
@media (max-width: 1023px), (hover: none), (pointer: coarse) {
  .nav-in > :nth-child(6) { grid-column: 4; }
  .nav a[data-alt-on] { color: var(--tint); background: oklch(18% 0.006 60 / 0.07); }
  .nav a[data-alt-on] svg { color: var(--tint); }
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .nav .lbl-phone { display: none; }
  .nav .lbl-desk { display: inline; }
  .nav a.nav-desk { display: flex; }
  .money-tabs { display: none; }
}
/* Expenses: the unit buttons sit under the heading */
.x-units { margin: 0 0 12px; }
.x-units.unit-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.x-units .seg-btn { flex: none; min-height: 34px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; }
/* Expenses: downloads for what is on screen */
.x-dl { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-top: 12px; flex-wrap: wrap; }
.x-dl > div { display: grid; gap: 2px; min-width: 0; }
.x-dl small { color: var(--ios-2); font-size: 13px; }
/* the unit buttons must not move while someone taps several: same space under the paper with or without its button,
   the same weight when picked (so widths do not change), and lined up on the left instead of re-centred */
.hero-rent, .hero-rent:has(.hero-chip) { margin-bottom: 32px; }
.x-units.unit-seg { justify-content: flex-start; }
.x-units .seg-btn, .x-units .seg-btn[aria-pressed="true"] { font-weight: 500; }
/* a unit's colour picker: a small poster preview, then the dots (the first is "from the name") */
.uc-prev { margin-bottom: 14px; }
.uc-poster { height: 120px; border-radius: 14px; }
.uc-poster .poster-name { bottom: 18px; font-size: 1.6rem; right: 30%; }
.pick-dot.auto { background: conic-gradient(from 0deg, oklch(70% 0.12 25), oklch(70% 0.12 90), oklch(70% 0.12 150), oklch(70% 0.12 245), oklch(70% 0.12 340), oklch(70% 0.12 25)); }
/* Key dates (and any list whose rows are the cards themselves): rows inside the one rounded group, long lines wrap instead of being cut off */
.list:not(.unit-papers) > li.card { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.list:not(.unit-papers) > li.card.late { box-shadow: inset 3px 0 0 var(--color-error); }
.date-main { flex: 1 1 12rem; min-width: 0; }
.date-row .r-vendor, .date-row .r-meta { white-space: normal; overflow: visible; }
.lk-menu .lk-extra + .lk-extra { border-top: 0.5px solid var(--ios-sep); }

/* Demo only (demo-tips.js): what the page is for and the trial. In the sidebar on a computer, a small popup above the tab bar on a phone. */
.demo-tip { display: grid; gap: 6px; padding: 16px; border-radius: 16px; background: var(--color-sheet); box-shadow: var(--shadow-card); }
.demo-tip-goal { margin: 0; font-family: var(--font-display); font-size: 0.975rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; color: var(--color-ink); }
.demo-tip-calm { margin: 0; color: var(--ios-2); font-size: var(--text-xs); line-height: 1.45; }
.demo-tip-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 6px; }
.demo-tip .linkbtn { min-height: 36px; font-size: var(--text-xs); padding: 0 2px; }
.demo-side { margin-top: var(--space-lg); }
.demo-side .btn { width: 100%; }
.demo-pop { position: fixed; z-index: calc(var(--z-sticky-nav) + 2); left: 12px; right: 12px; bottom: calc(var(--nav-h, 64px) + var(--safe-b, 0px) + 24px); max-width: 420px; margin-inline: auto;
  padding-right: 40px; box-shadow: 0 2px 4px oklch(18% 0.006 60 / 0.08), 0 24px 48px -16px oklch(18% 0.006 60 / 0.45); opacity: 0; translate: 0 12px; transition: opacity 200ms ease, translate 260ms cubic-bezier(0.16, 1, 0.3, 1); }
.demo-pop.in { opacity: 1; translate: 0 0; }
.demo-pop::before { content: ""; position: absolute; top: -6px; left: 50%; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, oklch(82% 0.13 45), var(--color-accent) 45%, oklch(48% 0.17 35)); box-shadow: 0 3px 4px -1px oklch(15% 0.03 40 / 0.6); }
.demo-pop-x { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--ios-2); font-size: 22px; line-height: 1; cursor: pointer; }
.demo-pop-x:focus-visible { outline: 2px solid var(--color-focus); }
@media (prefers-reduced-motion: reduce) { .demo-pop { transition: none; translate: 0 0; } }
/* real accounts, empty screens: one quiet link to the demo */
.example-link { margin: 4px 0 0; font-size: var(--text-sm); color: var(--ios-2); }
.example-link a { color: inherit; text-underline-offset: 3px; }
/* a unit's Months look takes the unit's colour (Change color applies here too) */
.hb-months.tinted .hb-bars i:not(.neg):not(.future):not(.now) { background: oklch(68% 0.1 var(--hue, 60) / 0.32); }

/* ---------- Short term rentals: the bookings panel (bookings.js). Everything opens in place, like a grouped list in an Apple app ---------- */
/* the month tiles become buttons; today's month label is in the tint colour, the picked month gets a ring in the unit's colour */
.mg.is-pick { gap: 7px; }
.mg.is-pick .mg-cell { all: unset; box-sizing: border-box; cursor: pointer; display: grid; justify-items: center; gap: 1px; padding: 6px 2px 5px; border-radius: 11px;
  background: color-mix(in oklab, var(--color-ink) 5%, transparent);
  background-image: linear-gradient(oklch(66% 0.14 var(--hue, 200) / calc(var(--o, 0) * 0.85)), oklch(66% 0.14 var(--hue, 200) / calc(var(--o, 0) * 0.85)));
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s; -webkit-tap-highlight-color: transparent; }
.mg.is-pick .mg-cell:active { transform: scale(0.94); }
.mg.is-pick .mg-cell[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--color-sheet), 0 0 0 4px oklch(55% 0.13 var(--hue, 200)); }
.mg.is-pick .mg-cell:focus-visible { outline: 2px solid var(--color-focus, var(--color-accent)); outline-offset: 2px; }
.mg-cell.now { outline: 0; }
/* a month the unit was long term (it switched kind): red, all of it or a bar along the bottom for part of it */
.mg.is-pick .mg-cell.is-long { background: color-mix(in oklab, var(--color-error, #c0392b) 16%, transparent); background-image: none; }
.mg.is-pick .mg-cell.is-long small, .mg.is-pick .mg-cell.is-long b { color: var(--color-error, #c0392b); }
.mg.is-pick .mg-cell.part-long { position: relative; overflow: hidden; }
.mg.is-pick .mg-cell.part-long::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: color-mix(in oklab, var(--color-error, #c0392b) 70%, transparent); }
/* Corkdoor's own date field and calendar (calfield.js): looks like the other inputs; long term nights are red and can't be picked */
.calf { position: relative; }
.calf-btn { all: unset; box-sizing: border-box; width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px; cursor: pointer;
  border: 1px solid var(--color-line, color-mix(in oklab, var(--color-ink) 14%, transparent)); border-radius: 12px; background: var(--color-sheet, #fff); color: var(--color-ink); font: inherit; }
.calf-btn:focus-visible { outline: 2px solid var(--color-focus, var(--color-accent)); outline-offset: 2px; }
.calf-ph { color: var(--color-ink-2); }
.calf-ic { width: 16px; height: 16px; flex: none; border: 1.6px solid currentColor; border-radius: 3px; border-top-width: 4px; opacity: 0.7; }
.calf-pop { position: fixed; z-index: calc(var(--z-sticky-nav) + 5); width: 296px; max-width: calc(100vw - 32px); padding: 12px; border-radius: 14px;
  background: var(--color-sheet, #fff); color: var(--color-ink); box-shadow: 0 10px 30px rgb(0 0 0 / 0.18), 0 0 0 1px color-mix(in oklab, var(--color-ink) 10%, transparent); }
.calf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.calf-nav { all: unset; cursor: pointer; width: 28px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; font-size: 1.3rem; line-height: 1; }
.calf-nav:hover { background: color-mix(in oklab, var(--color-ink) 7%, transparent); }
.calf-nav:focus-visible, .calf-day:focus-visible { outline: 2px solid var(--color-focus, var(--color-accent)); outline-offset: 1px; }
.calf-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calf-wd { text-align: center; font-size: 0.75rem; color: var(--color-ink-2); padding: 2px 0 4px; }
.calf-day { all: unset; box-sizing: border-box; cursor: pointer; height: 36px; display: grid; place-items: center; border-radius: 9px; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.calf-day:hover { background: color-mix(in oklab, var(--color-ink) 7%, transparent); }
.calf-day.is-today { box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--color-ink) 35%, transparent); }
.calf-day.is-sel { background: var(--color-accent); color: #fff; font-weight: 700; }
.calf-day.is-bad { cursor: not-allowed; color: var(--color-error, #c0392b); background: color-mix(in oklab, var(--color-error, #c0392b) 14%, transparent); text-decoration: line-through; }
.calf-day.is-off { cursor: not-allowed; color: color-mix(in oklab, var(--color-ink) 28%, transparent); }
.calf-day.is-off:hover { background: none; }
.calf-note { margin: 8px 0 0; font-size: 0.8125rem; color: var(--color-error, #c0392b); }
.calf-note:empty { display: none; }
.calf-foot { display: flex; justify-content: space-between; margin-top: 8px; }
.stp-act-t { display: inline-grid; justify-items: start; line-height: 1.15; }
.stp-act-t small { font-size: 0.6875rem; font-weight: 500; opacity: 0.75; }
.stp-longnote { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; font-size: 0.8125rem; color: var(--color-error, #c0392b); background: color-mix(in oklab, var(--color-error, #c0392b) 9%, transparent); }
.mg-cell.now { position: relative; }
.mg-cell.now small { font-weight: 700; color: var(--color-ink); }
.mg-cell.now::after { content: ""; position: absolute; top: 5px; right: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--tint); box-shadow: 0 0 0 1.5px var(--color-sheet); }

.stp { display: grid; gap: 12px; }
.stp-card { padding: var(--space-md); margin-top: var(--space-md); display: grid; gap: 12px; }
/* a box that opens and closes with a smooth height change */
.stp-reveal { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.34s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.22s ease; }
.stp-reveal.is-open { grid-template-rows: 1fr; opacity: 1; }
.stp-reveal-in { min-height: 0; overflow: hidden; display: grid; gap: 12px; }
.stp-reveal:not(.is-open) .stp-reveal-in { visibility: hidden; transition: visibility 0s 0.34s; }
.stp-fade { animation: stp-in 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes stp-in { from { opacity: 0; transform: translateY(4px); } }
.stp-chev { display: inline-grid; place-items: center; width: 18px; height: 18px; color: var(--ios-2); transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); flex: none; }
.stp-chev svg { width: 12px; height: 12px; }
[aria-expanded="true"] > .stp-chev { transform: rotate(90deg); }

/* the Income page card: the whole top row opens and closes it */
.stp-head { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; border-radius: 10px; -webkit-tap-highlight-color: transparent; }
.stp-head:focus-visible { outline: 2px solid var(--color-focus, var(--color-accent)); outline-offset: 4px; }
.stp-head .rent-name { display: block; }
.stp-head .rent-name:hover { text-decoration: none; }
.stp-rent { gap: 14px; }

/* one month: a title, then its stays as one rounded group with thin inset dividers */
.stp-month { display: grid; gap: 8px; }
.stp-mhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 2px 2px 0; }
.stp-mtitle { margin: 0; font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }
.stp-msum { font-size: 13px; color: var(--ios-2); font-variant-numeric: tabular-nums; }
.stp-list { list-style: none; margin: 0; padding: 0; border-radius: 12px; overflow: hidden; background: color-mix(in oklab, var(--color-ink) 3.5%, var(--color-sheet)); box-shadow: inset 0 0 0 0.5px var(--ios-sep); }
.stp-item { position: relative; }
.stp-item + .stp-item::before { content: ""; position: absolute; left: 52px; right: 0; top: 0; height: 0.5px; background: var(--ios-sep); }
.stp-row { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 11px 12px; min-height: 56px; -webkit-tap-highlight-color: transparent; transition: background 0.15s; }
.stp-row:active { background: color-mix(in oklab, var(--color-ink) 6%, transparent); }
.stp-row:focus-visible { outline: 2px solid var(--color-focus, var(--color-accent)); outline-offset: -2px; border-radius: 12px; }
.stp-plat { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font: 700 13px/1 var(--font-body); color: #fff; background: oklch(60% 0.03 60); }
.stp-plat[data-p="airbnb"] { background: oklch(64% 0.2 18); }
.stp-plat[data-p="vrbo"] { background: oklch(50% 0.13 255); }
.stp-plat[data-p="direct"] { background: oklch(58% 0.11 160); }
.stp-rt { display: grid; min-width: 0; gap: 1px; }
.stp-r1 { font-size: 15px; font-weight: 500; color: var(--color-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stp-r2 { font-size: 13px; color: var(--ios-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stp-amt { font-family: var(--font-display); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.stp-amt.neg { color: var(--color-error); }
.stp-item.is-open .stp-row { background: color-mix(in oklab, var(--color-ink) 3%, transparent); }
.stp-empty { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: color-mix(in oklab, var(--color-ink) 3.5%, var(--color-sheet)); box-shadow: inset 0 0 0 0.5px var(--ios-sep); }
.stp-empty p { margin: 0; color: var(--ios-2); font-size: 14px; }
.stp-empty .linkbtn { min-height: 32px; color: var(--tint); text-decoration: none; font-weight: 600; }

/* a stay's details, unfolded inside its row */
.stp-detail { display: grid; gap: 0; padding: 0 14px 12px 52px; }
.stp-kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-top: 0.5px solid var(--ios-sep); }
.stp-kv span { color: var(--ios-2); }
.stp-kv b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stp-fine { margin: 6px 0 0; font-size: 12.5px; color: var(--ios-2); }
.stp-dact { display: flex; justify-content: flex-end; padding-top: 8px; }

/* Add a stay, Refund, Import: three soft buttons in a row */
.stp-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stp-act { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 8px; border-radius: 11px;
  font: 600 14px/1 var(--font-body); color: oklch(42% 0.1 var(--hue, 200)); background: oklch(95% 0.03 var(--hue, 200)); white-space: nowrap; -webkit-tap-highlight-color: transparent; transition: transform 0.15s, background 0.15s, color 0.15s; }
.stp-act:active { transform: scale(0.97); }
.stp-act[aria-pressed="true"] { background: oklch(55% 0.13 var(--hue, 200)); color: #fff; }
.stp-act:focus-visible { outline: 2px solid var(--color-focus, var(--color-accent)); outline-offset: 2px; }
.stp-act-g { font-size: 16px; line-height: 1; }

/* the forms, inside the card (and inside a stay's row when editing it) */
.stp-form { display: grid; gap: var(--space-sm); padding: 14px; border-radius: 12px; background: color-mix(in oklab, var(--color-ink) 3.5%, var(--color-sheet)); box-shadow: inset 0 0 0 0.5px var(--ios-sep); }
.stp-item .stp-form { background: transparent; box-shadow: none; padding: 4px 14px 14px; }
.stp-ftitle { margin: 0; font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; }
.stp-fmore { display: grid; gap: var(--space-sm); }
.stp-fmore[hidden] { display: none; }
.stp-morebtn { justify-self: start; padding-left: 0; min-height: 32px; color: var(--tint); text-decoration: none; font-weight: 500; }
.stp-morebtn::before { content: "+ "; }
.stp-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 2px; border-radius: 10px; background: color-mix(in oklab, var(--color-ink) 7%, transparent); }
.stp-seg button { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; min-height: 34px; padding: 0 8px; border-radius: 8px; font: 500 14px/34px var(--font-body); color: var(--color-ink); transition: background 0.2s, box-shadow 0.2s; }
.stp-seg button[aria-pressed="true"] { background: var(--color-sheet); box-shadow: 0 1px 3px oklch(18% 0.006 60 / 0.15), 0 0 0 0.5px var(--ios-sep); font-weight: 600; }

/* Year details: one row that opens the numbers */
.stp-drow { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 10px 2px 2px; border-top: 0.5px solid var(--ios-sep); -webkit-tap-highlight-color: transparent; }
.stp-drow:focus-visible { outline: 2px solid var(--color-focus, var(--color-accent)); outline-offset: 2px; border-radius: 8px; }
.stp-dsum { font-size: 13px; color: var(--ios-2); font-variant-numeric: tabular-nums; }
.stp-year { display: grid; gap: 10px; padding-top: 2px; }
.stp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stp-stat { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: oklch(96% 0.025 var(--hue, 200)); }
.stp-stat b { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stp-stat span { font-size: 12px; color: var(--ios-2); }
.stp-pu { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in oklab, var(--color-ink) 3.5%, var(--color-sheet)); box-shadow: inset 0 0 0 0.5px var(--ios-sep); cursor: text; }
.stp-pu > span { display: grid; min-width: 0; }
.stp-pu .stp-r2 { white-space: normal; }
.stp-pu-in { width: 4.5rem; text-align: right; flex: none; }
.stp-imports { display: grid; gap: 4px; }
.stp-imports h4 { margin: 0; font-size: 13px; font-weight: 600; color: var(--ios-2); text-transform: uppercase; letter-spacing: 0.04em; }
.stp-imp { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.stp-imp .linkbtn { min-height: 32px; color: var(--tint); text-decoration: none; font-weight: 600; }

@media (max-width: 420px) {
  .stp-acts { gap: 6px; }
  .stp-act { font-size: 13px; gap: 4px; padding: 0 4px; }
  .stp-detail { padding-left: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .stp-reveal, .stp-chev, .stp-act, .stp-row, .mg.is-pick .mg-cell { transition: none; }
  .stp-fade { animation: none; }
}

/* the unit page: Long term or Short term, a segmented switch under the title */
.unit-kind-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 0 4px; padding: 10px 12px; border-radius: var(--radius-card); background: var(--color-sheet); box-shadow: var(--shadow-card); }
.unit-kind-l { font-size: 15px; font-weight: 500; }
.unit-kind { flex: 0 1 260px; min-width: 220px; }
@media (max-width: 420px) { .unit-kind { flex-basis: 100%; } }

/* Booked through, Add option: a name box with Add and Cancel under the list */
.stp-adder { display: grid; gap: 6px; margin-top: 8px; }
.stp-adder[hidden] { display: none; }
.stp-adder-row { display: flex; gap: 6px; align-items: center; }
.stp-adder-row input { flex: 1; min-width: 0; }

/* "Adjust the corners" (cropper.js): the photo full screen, an outline with four corner handles, the outside dimmed */
.crop { position: fixed; inset: 0; z-index: 900; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px calc(env(safe-area-inset-bottom, 0px) + 14px); background: #111; color: #fff; }
.crop-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; font-size: 1.0625rem; }
.crop-x { all: unset; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.75rem; line-height: 1; color: #fff; }
.crop-stage { position: relative; overflow: hidden; touch-action: none; }
.crop-stage img { position: absolute; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.crop-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.crop-shade { fill: rgb(0 0 0 / 0.5); }
.crop-line { fill: none; stroke: oklch(80% 0.17 80); stroke-width: 2.5; stroke-linejoin: round; }
.crop-handle { all: unset; position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; cursor: grab; touch-action: none; display: grid; place-items: center; }
.crop-handle::after { content: ""; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid oklch(80% 0.17 80); box-shadow: 0 2px 8px rgb(0 0 0 / 0.5); transition: transform 0.12s; }
.crop-handle.is-drag::after, .crop-handle:focus-visible::after { transform: scale(1.3); }
.crop-handle:focus-visible { outline: none; }
.crop-note { margin: 0; text-align: center; font-size: 0.875rem; color: rgb(255 255 255 / 0.8); }
.crop-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.crop-acts .btn.ghost { background: rgb(255 255 255 / 0.12); color: #fff; border-color: transparent; }
.crop-whole { justify-self: center; color: rgb(255 255 255 / 0.85); }

/* ---- Plan page, Apple style (2026-11-24): quiet header, pill buttons, a segmented switch ---- */
.bill-seg { gap: 0; padding: 3px; border-radius: 999px; background: color-mix(in oklab, var(--color-ink) 8%, transparent); }
.bill-seg .seg-btn { border: 0; background: transparent; border-radius: 999px; min-height: 40px; font-weight: 500; color: var(--color-ink); }
.bill-seg .seg-btn[aria-pressed="true"] { background: var(--color-sheet); color: var(--color-ink); font-weight: 600; box-shadow: 0 1px 3px rgb(0 0 0 / 0.16); }
.plan-grid .plan-opt .btn { min-height: 48px; border-radius: 999px; font-size: 1rem; font-weight: 600; white-space: nowrap; padding-inline: 12px; }
.plan-opt.is-small { opacity: 1; }
.plan-opt .plan-hint { margin: 0 0 10px; color: var(--color-muted); font-size: var(--text-sm); line-height: 1.35; }

/* ---- Unit picker (a bottom sheet): grouped list, round checks, buttons pinned at the bottom ---- */
.bs-body .pick-list { list-style: none; margin: 0; padding: 0; gap: 0; }
.bs-body .pick-list li + li, .bs-body .pick-names li + li { border-top: 1px solid var(--app-sand-rule); }
.pick-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border: 0; border-radius: 0; background: transparent; cursor: pointer; }
.pick-row.on { background: transparent; }
.pick-row.locked { opacity: 0.5; }
.pick-mark { width: 24px; height: 24px; border-radius: 50%; border-width: 1.5px; font-size: 0.8rem; }
.pick-name { min-width: 0; }
.pick-name strong { font-size: 1rem; font-weight: 600; }
.pick-when { font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-state { font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.pick-row.on .pick-state { color: var(--color-green); }
.pick-actions { position: sticky; bottom: 0; display: grid; gap: 4px; padding: 12px 0 2px; background: linear-gradient(to bottom, transparent, var(--color-sheet) 14px); }
.pick-actions .btn { min-height: 50px; border-radius: 999px; font-size: 1.0625rem; font-weight: 600; }
.pick-count { margin: 0; text-align: center; font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.pick-text { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; min-height: 40px; display: grid; place-items: center; color: var(--color-accent); font-weight: 600; font-size: 0.9375rem; }
.pick-text:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 8px; }
.pick-h { margin: 0 0 6px 4px; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); }
.bs-body .pick-names { list-style: none; margin: 0; padding: 0; gap: 0; }
.bs-body .pick-names li { padding: 11px 14px; }
.bs-body .pick-fine { font-size: var(--text-xs); }
.bill-seg .seg-btn { font-size: 0.9375rem; padding-inline: 6px; white-space: nowrap; }
.plan-first { margin: 14px 0 4px; text-align: center; }
.bs-body.pick-body { display: flex; flex-direction: column; }
.pick-body > * + * { margin-top: 10px; }
.pick-body > * { flex: none; }
/* the unit table is its own scroller: it takes the space left over (never less than about 2 rows) and keeps its swipes to itself */
.bs-body .pick-list.bs-scroll { flex: 0 1 auto; min-height: 126px; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; } .plan-first .badge { font-size: var(--text-sm); padding: 5px 12px; }

/* ---- Plan page, tighter and more iOS (2026-11-24): fits one phone screen ---- */
.top-back { display: none; }
@media (max-width: 1023px) {
  .top.has-back .brand { display: none; }
  .top-back:not([hidden]) { display: inline-flex; align-items: center; min-height: 44px; max-width: 46%; margin-left: -6px; padding: 0 8px 0 4px; color: var(--color-accent); font-size: 1.0625rem; font-weight: 500; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.back-lifted #view > a.back:not(.ro-back), body.back-lifted #view > article.privacy > a.back, body.back-lifted #view > .no-print > a.back { display: none; }
  main:has(.plan-page) { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 6px); }
}
.plan-page { gap: 12px; }
.plan-grid { margin-top: 6px; gap: 10px; }
.plan-grid .plan-opt { position: relative; padding: 14px 14px 12px; gap: 0; }
.plan-opt .plan-flag { position: absolute; top: -11px; left: 12px; margin: 0; font-size: 0.75rem; padding: 3px 10px; }
.plan-opt .plan-flag-gap { display: none; }
.plan-opt .plan-name { font-size: 1.0625rem; font-weight: 600; }
.plan-opt .plan-covers { font-size: 0.8125rem; color: var(--color-muted); }
.plan-opt .plan-price { margin: 8px 0 10px; font-size: 1.875rem; line-height: 1.05; }
.plan-opt .plan-price span { font-size: 0.9375rem; }
.plan-grid .plan-opt .btn { min-height: 44px; }
.plan-first { margin: 2px 0 0; }
.plan-page > .hint { margin: 0 !important; text-align: center; font-size: 0.8125rem; }
.plan-more { padding: 0; font-size: 0.875rem; color: var(--color-muted); }
.plan-group { padding: 0; overflow: hidden; }
.plan-group > * + * { border-top: 1px solid var(--app-sand-rule); }
.plan-group > details > summary, .plan-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; font-size: 1rem; font-weight: 500; color: var(--color-ink); text-decoration: none; cursor: pointer; list-style: none; margin: 0; }
.plan-group > details > summary::-webkit-details-marker { display: none; }
.plan-group > details > summary::after, .plan-chev { content: "\203A"; color: var(--color-muted); font-size: 1.25rem; transition: transform 0.2s ease; }
.plan-group > details[open] > summary::after { transform: rotate(90deg); }
.plan-group .plan-included { margin: 0; padding: 0 16px 14px 34px; }
.plan-page { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 420px) { .bill-seg .seg-btn { font-size: 0.875rem; padding-inline: 4px; } }
.plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 420px) { .plan-grid .plan-opt .btn { font-size: 0.9375rem; padding-inline: 6px; } }
.plan-inc { padding: 14px 16px 8px; }
.plan-inc-h { margin: 0 0 8px; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.plan-checks { list-style: none; margin: 0; padding: 0; }
.plan-checks li { position: relative; padding: 0 0 6px 24px; font-size: 0.8125rem; line-height: 1.35; color: var(--color-ink-2); }
.plan-checks li::before { content: ""; position: absolute; left: 6px; top: 0.18em; width: 5px; height: 9px; border: solid oklch(55% 0.17 40); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.plan-row.card { padding: 0 16px; min-height: 48px; }

/* touch screens: the smaller dropdowns (rent bar, board bar, Expenses filters, the sharing table) are at least 44px tall so a finger hits them
   (audit 141). Computers with a mouse keep the compact sizes. */
@media (pointer: coarse) {
  .board-bar select, .rent-bar select, .x-sels select { min-height: 44px; }
  .share-table select.st-sel { height: 44px; }
}
