:root {
  --blue: #3859ff;
  --blue-dark: #2c48d6;
  --plum: #3c1745;
  --pink: #f4bdff;
  --pink-soft: #fbeaff;
  --lilac: #b8b3ff;
  --yellow: #fff3a0;
  --rose: #f9b8e8;
  --green: #9fe0b5;
  --tile: #eef1ff;
  --line: #eceefb;
  --muted: #5b4762;
  --field: #c9cdf0;
}

* { box-sizing: border-box; }
html { background: var(--blue); }
body {
  margin: 0;
  background: var(--blue);
  color: #fff;
  font-family: Manrope, system-ui, sans-serif;
  overflow-wrap: anywhere;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--plum); }
a:hover { color: var(--blue); }

.page {
  max-width: 480px;
  min-width: 0;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 20px 24px;
  flex-grow: 1;
  min-width: 0;
}

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 0; }
.brand { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.brand-row { display: flex; align-items: baseline; gap: 10px; min-width: 0; text-decoration: none; color: #fff; }
.brand-row svg { flex: 0 0 auto; }
.brand-name { font-size: clamp(16px, 5.1vw, 20px); font-weight: 800; letter-spacing: .02em; line-height: 1; white-space: nowrap; }
.kicker { font-size: 12px; font-weight: 800; letter-spacing: .08em; }

h1.title a.title-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
h1.title a.title-link svg { opacity: .6; flex: 0 0 auto; }
h1.title a.title-link:hover svg { opacity: 1; }
.target-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.target-row input[name=target] { min-width: 0; width: 100%; }
.seg.target-units { grid-template-columns: repeat(3, auto); min-height: 48px; }
.target-units label { display: flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.target-units label.on { background: var(--blue); color: #fff; }
.target-units input { position: absolute; opacity: 0; pointer-events: none; }
.target-units label:has(input:focus-visible) { outline: 2px solid var(--blue); }
.target-progress { display: flex; flex-direction: column; gap: 6px; }
.target-progress .bar { height: 10px; }
.date-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.date-pair input { width: 100%; }
.seg.page-tabs { background: var(--blue-dark); }
.seg.page-tabs a:not(.on) { color: #fff; }
.seg.page-tabs a.on { background: #fff; color: var(--plum); }
.project-grid { display: flex; flex-direction: column; gap: 16px; }
.project-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
h1.title {
  margin: 0;
  font-weight: 800;
  font-size: 28px;
  line-height: 1.15;
  color: #fff;
}

/* cards */
.card {
  background: #fff;
  color: var(--plum);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card h2 { margin: 0; font-size: 20px; font-weight: 800; }
.card p { margin: 0; font-size: 15px; line-height: 1.5; }
/* no one-word last lines, balanced headings */
p, li, small, label, .muted, .notice, .on-blue, .sub p { text-wrap: pretty; }
h1, h2, .label { text-wrap: balance; }
.label { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--blue); }
.muted { font-size: 12px; color: var(--muted); }
.big { font-family: 'Yeseva One', Georgia, serif; font-size: 44px; line-height: 1; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.row-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { background: var(--tile); border-radius: 12px; padding: 10px; }
.tile b { display: block; font-size: 20px; font-weight: 800; }
.tile span { display: block; font-size: 12px; }
.tile.green { background: var(--green); }

.badge {
  flex: 0 0 auto; align-self: flex-start;
  font-size: 11.5px; font-weight: 800; letter-spacing: .06em;
  background: var(--yellow); border: 1.5px solid var(--plum); border-radius: 8px; padding: 3px 8px;
}

.coworking .sub { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 16px; border-radius: 14px; border: 3px solid var(--tile); background: #fff; }
.coworking .sub p { margin: 0; font-size: 14px; line-height: 1.5; }
.coworking .sub .btn { margin-top: auto; }
.coworking .cols { gap: 12px; }
.wb-fan { position: relative; display: block; width: 100%; height: min(190px, 52vw); margin: 4px 0; padding: 0; border: 0; background: none; cursor: zoom-in; }
.wb-fan img { position: absolute; top: 10px; left: 50%; width: min(120px, 36%); height: auto; border-radius: 6px; box-shadow: 0 6px 18px rgba(40, 20, 60, .25); transition: transform .2s; }
.wb-fan img:nth-child(1) { transform: translateX(-120%) rotate(-8deg); }
.wb-fan img:nth-child(2) { transform: translateX(20%) rotate(8deg); }
.wb-fan img:nth-child(3) { transform: translateX(-50%); top: 0; }
.wb-fan:hover img:nth-child(1) { transform: translateX(-130%) rotate(-11deg); }
.wb-fan:hover img:nth-child(2) { transform: translateX(30%) rotate(11deg); }
.wb-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.coworking .sub .wb-actions .btn { margin-top: 0; }
.wb-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 12px; border: 0; border-radius: 18px; background: #fff; color: var(--plum); }
.wb-dialog::backdrop { background: rgba(30, 20, 60, .7); }
.wb-dialog[open] { display: flex; flex-direction: column; gap: 10px; }
.wb-top, .wb-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.wb-cap { font-weight: 800; }
.wb-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.wb-x { width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--tile); color: var(--plum); font-size: 16px; cursor: pointer; }
.wb-stage { position: relative; display: flex; justify-content: center; min-height: 0; }
.wb-page { display: block; max-width: 100%; max-height: calc(100dvh - 150px); aspect-ratio: 398 / 565; object-fit: contain; border-radius: 8px; box-shadow: 0 2px 10px rgba(40, 20, 60, .15); }
.wb-nav { position: absolute; top: 50%; z-index: 1; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--plum); font-size: 26px; font-weight: 800; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(40, 20, 60, .25); }
.wb-nav[data-step="-1"] { left: 4px; }
.wb-nav[data-step="1"] { right: 4px; }
.person { display: flex; flex-direction: column; gap: 4px; }
.person p { margin: 0; font-size: 14px; line-height: 1.5; }
.person a, .card p a { color: var(--blue); font-weight: 700; }
ul.rules { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.45; }

/* buttons */
.btn {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 0 14px; border-radius: 12px;
  font-family: inherit; font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--plum); background: var(--pink); color: var(--plum);
}
.btn:hover { color: var(--plum); filter: brightness(.97); }
.btn.big-btn { min-height: 56px; border-radius: 14px; font-size: 16px; }
.btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.outline { background: #fff; border-color: var(--blue); color: var(--blue); font-weight: 700; }
.btn.white { background: #fff; border-color: #fff; }
.btn.small { min-height: 40px; font-size: 14px; }
.btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.link-btn { border: 0; background: transparent; padding: 0; font: inherit; font-weight: 700; color: var(--blue); cursor: pointer; text-decoration: underline; }
.top .btn { min-height: 44px; flex: 0 0 auto; font-weight: 700; font-size: 14px; padding: 0 16px; }

/* segmented */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; background: var(--tile); border-radius: 12px; padding: 4px; }
.seg a {
  display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 10px;
  font-weight: 700; font-size: 14px; text-decoration: none; color: var(--plum);
}
.seg a.on { background: var(--blue); color: #fff; }

/* forms */
label.field, div.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
label.field small, div.field small { font-size: 12px; font-weight: 400; color: var(--muted); }
input[type=text], input[type=password], input[type=number], input[type=date], input:not([type]), select {
  min-height: 48px; width: 100%; border: 1.5px solid var(--field); border-radius: 12px; padding: 0 14px;
  font-family: inherit; font-size: 16px; color: var(--plum); background: #fff;
}
.entry { display: flex; gap: 8px; }
.entry input { flex: 1 1 auto; min-width: 0; min-height: 52px; font-size: 18px; }
.entry .btn { flex: 0 0 116px; min-height: 52px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; }
.check input { flex: 0 0 auto; width: 22px; height: 22px; accent-color: var(--blue); }
.goals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.goals label {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 6px 8px; line-height: 1.25; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--field); font-weight: 700; font-size: 15px;
}
.goals label small { font-size: 12px; font-weight: 600; }
.goals input { position: absolute; opacity: 0; pointer-events: none; }
.goals input:checked + label, .goals label:has(input:checked) { background: var(--blue); border-color: var(--blue); color: #fff; }
.goals input:focus-visible + label { outline: 2px solid var(--plum); }
.custom-goal { display: none; }
#goal-custom:checked ~ .custom-goal { display: block; }

.notice { background: #eaf8ef; border-radius: 12px; padding: 10px 12px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--plum); }
.notice.warn { background: var(--pink-soft); }
.error { background: var(--pink-soft); color: var(--plum); border: 1.5px solid var(--plum); border-radius: 12px; padding: 10px 12px; font-size: 14px; }

/* progress */
.bar { height: 14px; border-radius: 7px; background: var(--tile); overflow: hidden; }
.bar div { height: 100%; border-radius: 7px; background: var(--blue); }

/* community chart */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 140px; border-bottom: 1px solid #d9dcf5; }
.chart .col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.chart .col span { font-size: 9px; white-space: nowrap; }
.chart .col div { width: 100%; border-radius: 4px 4px 0 0; background: var(--blue); }
.chart .col.today div { background: var(--pink); border: 1.5px solid var(--plum); border-bottom: 0; }

/* rating */
ol.rating { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
ol.rating li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
ol.rating li.me { background: var(--pink-soft); border-radius: 10px; padding-left: 6px; padding-right: 6px; }
.place { flex: 0 0 32px; white-space: nowrap; font-weight: 800; font-size: 15px; text-align: center; }
.avatar { flex: 0 0 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--plum); }
.who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.who b { font-size: 15px; }
.who span { font-size: 12px; color: var(--muted); }
.who b.masked { letter-spacing: .04em; }
.who .you-tag { align-self: flex-start; margin: 2px 0; padding: 1px 8px; border-radius: 8px; background: var(--pink); color: var(--plum); font-weight: 800; font-size: 11px; }
.val { flex: 0 0 auto; font-weight: 800; font-size: 15px; }

/* calendar */
.cal-head, .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { font-size: 11px; font-weight: 700; text-align: center; }
.cal .day, .cal span.blank {
  min-height: 46px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none;
}
.cal .day b { font-size: 13px; }
.cal .day i { font-style: normal; font-size: 10px; white-space: nowrap; }
.cal .day { position: relative; }
.cal .done { background: var(--blue); color: #fff; }
.cal .min { background: #c9d0ff; color: var(--plum); }
.cal .low { background: #fff; border: 1.5px solid #c9d0ff; color: var(--plum); }
.cal .best { background: #9fe0b5; color: var(--plum); }

/* history of entries */
.card-gear { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; margin: -8px -8px -8px 0; border-radius: 10px; color: var(--plum); }
.card-gear:hover { background: var(--tile); }
/* admin: change history */
.log-row { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.log-when { color: #8a7d90; font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.log-row .link-btn { font-size: 13px; white-space: nowrap; }
/* privacy policy */
.policy { gap: 10px; font-size: 15px; line-height: 1.55; }
.policy h2 { margin: 10px 0 0; font-size: 17px; }
.policy p, .policy ul { margin: 0; }
.policy ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
/* awards */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 8px; }
.badge-item { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.badge-title { font-size: 12px; font-weight: 700; line-height: 1.25; }
.badge-hint { font-size: 11px; color: #8a7d90; }
.badge-item.got .badge-hint { color: #2f9a5a; font-weight: 700; }
.medal { display: inline-flex; align-items: center; justify-content: center; gap: 1px; width: 56px; height: 56px; flex: 0 0 auto; border-radius: 50%; border: 2px dashed #d6d0de; background: #f6f4f9; color: #b3a9b8; }
.medal b { font-family: 'Yeseva One', Georgia, serif; font-size: 17px; font-weight: 400; line-height: 1; }
.medal.got { border: 3px solid var(--plum); color: var(--plum); box-shadow: 0 3px 0 var(--plum); }
.medal.got.words { background: var(--pink); }
.medal.got.streak { background: #ffd59e; }
.medal.got.start { background: #9fe0b5; }
.medal.got.early { background: #fff3a6; }
.medal.small { width: 36px; height: 36px; border-width: 2px; box-shadow: 0 2px 0 var(--plum); }
.medal.small b { font-size: 12px; }
.medal.small svg { width: 14px; height: 14px; }
.badge-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; text-decoration: none; color: var(--plum); font-size: 13px; font-weight: 700; }
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.mn-switch { display: flex; align-items: center; gap: 4px; }
.mn-name { padding: 0 6px; text-align: center; white-space: nowrap; font-weight: 800; font-size: 16px; }
.mn-name::first-letter { text-transform: uppercase; }
.mn-arrow { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--tile); color: var(--plum); }
.mn-arrow:hover { background: var(--line); }
.mn-arrow.off { background: none; }
.mn-today { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); font-size: 13px; font-weight: 700; text-decoration: none; color: var(--plum); white-space: nowrap; }
.mn-today:hover { background: var(--tile); }
.h-projects { background: var(--tile); }
.h-projects a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-table { display: flex; flex-direction: column; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.h-tr { display: grid; grid-template-columns: 92px minmax(0, 1fr) 36px minmax(0, 1fr); align-items: center; column-gap: 10px; min-height: 44px; padding: 2px 4px 2px 12px; border-top: 1px solid var(--line); font-size: 14px; }
.h-tr:first-child { border-top: 0; }
.h-tr:nth-child(even):not(.h-th):not(.h-today):not(.editing) { background: #f8f6fc; }
.h-th { min-height: 36px; background: var(--blue-dark); font-size: 12px; font-weight: 800; color: #fff; line-height: 1.2; }
.h-date { white-space: nowrap; }
.h-today { background: var(--tile); }
.h-today .h-date { font-weight: 800; }
.h-future { color: #b3a9b8; }
.h-num { font-variant-numeric: tabular-nums; font-weight: 700; display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
.h-num small { font-size: 11px; font-weight: 400; color: #8a7d90; }
.h-neg { color: #c0306b; }
.h-tools { display: flex; }
.h-pen, .h-ok { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--plum); cursor: pointer; }
.h-pen:hover { background: var(--tile); }
.h-ok { background: var(--blue); color: #fff; }
.h-bar { display: none; }
.h-bar i { display: block; height: 10px; border-radius: 5px; background: #c9d0ff; }
.h-bar i.neg { background: #f6c3d8; }
/* editing a row: the field takes the day's cell, «отмена» takes the total's at the end */
.h-tr .h-in { display: none; }
.h-tr.editing { background: var(--pink-soft); }
.h-tr.editing .h-view { display: none; }
.h-tr.editing .h-in { display: block; }
.h-tr.editing .h-ok { display: grid; }
.h-input { width: 100%; min-width: 0; min-height: 34px; padding: 0 8px; font-size: 14px; font-weight: 700; }
.h-cancel { font-size: 13px; font-weight: 700; color: var(--plum); }
.h-note { grid-column: 1 / -1; padding-bottom: 6px; font-size: 12px; color: #8a7d90; }
.cal .miss { background: #fff; border: 1.5px dashed #8f9df5; color: var(--plum); }
.cal .today { background: #fff; border: 1.5px dashed #8f9df5; color: var(--plum); }
.cal .future { background: #f5f6fd; color: #8a7d90; pointer-events: none; }

/* settings list */
.list { padding: 8px 20px 12px; gap: 0; font-size: 15px; }
.list .item { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--line); }
.list .item:last-child { border-bottom: 0; }
.list select, .list input[type=text] { max-width: 60%; min-height: 40px; font-size: 15px; }

/* nav */
body { overflow-x: clip; }
.nav-right { display: contents; }
nav.bottom {
  position: sticky; bottom: 0;
  /* white from edge to edge, wider than the 480px page column */
  width: 100vw; margin-left: calc(50% - 50vw);
  padding-left: calc(50vw - 50%); padding-right: calc(50vw - 50%);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #fff; border-top: 1px solid #d9dcf5;
  padding-bottom: env(safe-area-inset-bottom);
}
nav.bottom a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 64px; text-decoration: none; color: var(--plum); font-size: 12px; font-weight: 600;
}
nav.bottom a.on { color: var(--blue); font-weight: 800; }

.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; align-self: flex-start; }
.back:hover { color: #fff; }
.on-blue { font-size: 13px; line-height: 1.5; text-align: center; margin: 0; }
.path-chart { height: 160px; display: block; }
.chip.pink { background: var(--pink); color: var(--plum); border: 1.5px solid var(--plum); }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 18px; background: var(--blue-dark); color: #fff; font-weight: 700; font-size: 14px; }

table.admin { width: 100%; border-collapse: collapse; font-size: 13px; }
table.admin td, table.admin th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.admin form { display: inline; }

/* ---------- desktop ---------- */
.cols, .col { display: contents; }
.desk-only { display: none !important; }
.rating-card ol.rating { max-height: 560px; overflow-y: auto; }

@media (min-width: 900px) {
  .page { max-width: 1120px; overflow-x: visible; }
  main { padding: 28px 32px 48px; gap: 20px; }
  .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .cols.wide-left { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
  /* narrow pages keep to the left edge like the rest of the desktop layout */
  .narrow { max-width: 640px; width: 100%; margin: 0; }
  .cols.stretch { align-items: stretch; }
  .path-chart { height: 220px; }
  .mn-name { min-width: 140px; }
  /* day words and the pencil stay next to the date, then a bar of the day's words, the book total last */
  .h-tr { grid-template-columns: 120px 110px 36px minmax(0, 1fr) 130px; column-gap: 16px; padding-right: 16px; }
  .h-bar { display: block; }
  .cols.stretch .col > .cal-card, .cols.stretch .col > .card:last-child { flex: 1 1 auto; }
  .cols.stretch .col > .grow { flex: 1 1 auto; }
  .cal-card .cal { flex: 1 1 auto; grid-auto-rows: minmax(66px, 1fr); gap: 6px; }
  .cal-head { gap: 6px; }

  h1.title { font-size: 34px; }
  .top { padding: 24px 32px 0; }

  /* the bottom tab bar becomes a top menu */
  nav.bottom {
    order: -1; position: sticky; top: 0; z-index: 5;
    width: 100vw; margin-left: calc(50% - 50vw);
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px;
    padding: 10px max(32px, calc(50vw - 528px)); border-top: 0; border-bottom: 1px solid #d9dcf5;
  }
  nav.bottom a { flex-direction: row; gap: 8px; min-height: 44px; padding: 0 16px; white-space: nowrap; border-radius: 12px; font-size: 15px; }
  nav.bottom a.on { background: var(--tile); }
  nav.bottom a:hover { background: var(--tile); color: var(--blue); }
  nav.bottom > a[href="/admin"] { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); }
  nav.bottom .nav-right { grid-column: 3; display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
  nav.bottom .nav-right a:not(.chat-btn) { padding: 0 12px; }
  nav.bottom a.brand-link { justify-self: start; align-self: center; min-height: 0; padding-left: 0; gap: 12px; align-items: baseline; background: none; }
  nav.bottom a.brand-link:hover { background: none; }
  nav.bottom a.brand-link b { font-size: 20px; font-weight: 800; letter-spacing: .02em; line-height: 1; color: var(--plum); }
  nav.bottom a.chat-btn { margin-left: 4px; background: var(--pink); border: 1.5px solid var(--plum); color: var(--plum); font-weight: 800; }
  nav.bottom a.chat-btn:hover { background: var(--pink); color: var(--plum); filter: brightness(.97); }

  .page-tabs { max-width: 640px; }
  .project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
  .project-actions { flex-direction: row; }
  .project-actions > * { flex: 1 1 0; }
  .new-project { align-self: flex-start; padding: 0 32px; }
  .desk-only { display: flex !important; }
  .mobile-only { display: none !important; }

  /* rating: as tall as the left column, scrolls inside */
  .rating-col { position: relative; align-self: stretch; }
  .rating-card { position: absolute; inset: 0; overflow: hidden; }
  .rating-card ol.rating { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; margin-right: -8px; padding-right: 8px; }

  .chart { height: 180px; }
  .chart .col span { font-size: 11px; }
  .cal .day, .cal span.blank { min-height: 66px; gap: 10px; }
  .cal .day b { font-size: 18px; }
  .cal .day i { font-size: 13px; font-weight: 600; }
}
