/* ============================================================
   UNIFY TRAINER — design system
   Monochrome athletic brutalism, matched to unifyaz.com:
   Bebas Neue display · Nunito Sans body · zero-chroma palette
   ============================================================ */

:root {
  --ink-0: oklch(10% 0 0);        /* deepest bg */
  --ink-1: oklch(14% 0 0);        /* app shell bg */
  --ink-2: oklch(18% 0 0);        /* card bg */
  --ink-3: oklch(23% 0 0);        /* raised card / hover */
  --ink-4: oklch(30% 0 0);        /* borders strong */
  --line: oklch(26% 0 0);         /* hairlines */
  --mist: oklch(64% 0 0);         /* muted text */
  --fog: oklch(78% 0 0);          /* secondary text */
  --paper: oklch(96% 0 0);        /* primary text */
  --pure: #ffffff;
  --alert: oklch(60% .22 27);     /* red — alerts only */
  --ok: oklch(78% 0 0);           /* "success" stays monochrome */

  --display: "Bebas Neue", "Arial Narrow", sans-serif;
  --body: "Nunito Sans", -apple-system, sans-serif;

  --r: 2px;                        /* sharp edges, near-square */
  --pad: clamp(16px, 3vw, 28px);
  --sidebar-w: 232px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scrollbar-color: var(--ink-4) var(--ink-1); }

body {
  background: var(--ink-1);
  color: var(--paper);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* grain atmosphere over everything */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--pure); color: var(--ink-0); }

h1,h2,h3,.disp {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: .035em;
  text-transform: uppercase;
  line-height: .95;
}

a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea {
  font: inherit; color: var(--paper);
  background: var(--ink-1); border: 1px solid var(--ink-4);
  border-radius: var(--r); padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--pure); outline-offset: -1px; }
input::placeholder, textarea::placeholder { color: var(--mist); }

/* ---------- layout shell ---------- */
.app { min-height: 100dvh; }

.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100dvh; }

.sidebar {
  background: var(--ink-0);
  border-right: 1px solid var(--line);
  padding: 0 0 18px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100dvh;
}
/* white brand block — continues the topstrip band across the sidebar */
.side-head {
  background: var(--pure); color: var(--ink-0);
  padding: 20px 22px 12px; margin-bottom: 8px;
  margin-right: -1px; position: relative; z-index: 1; /* cover the sidebar border so the band is seamless */
}
/* desktop: brand block and topstrip form one uniform white band */
@media (min-width: 901px) {
  .side-head, .topstrip { height: 132px; overflow: hidden; }
}
.brand {
  font-family: var(--display); font-size: 30px; letter-spacing: .06em;
  padding: 0 0 4px; text-transform: uppercase;
}
.brand small { display: block; font-family: var(--body); font-size: 9.5px; letter-spacing: .34em; color: oklch(45% 0 0); font-weight: 700; margin-top: 2px; }
.role-chip {
  margin: 10px 0 0; font-size: 10px; font-weight: 800; letter-spacing: .22em;
  text-transform: uppercase; color: var(--pure); background: var(--ink-0);
  padding: 4px 9px; display: inline-block; width: fit-content;
}

.nav { flex: 1; overflow-y: auto; padding: 6px 0; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 22px; text-decoration: none;
  font-size: 13.5px; font-weight: 700; color: var(--fog);
  border-left: 3px solid transparent;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--pure); background: var(--ink-1); }
.nav a.on { color: var(--pure); border-left-color: var(--pure); background: var(--ink-1); }
.nav a .ic { width: 18px; text-align: center; opacity: .85; }
.nav a .badge {
  margin-left: auto; background: var(--pure); color: var(--ink-0);
  font-size: 10.5px; font-weight: 800; min-width: 18px; height: 18px;
  display: grid; place-items: center; border-radius: 999px; padding: 0 5px;
}
.nav-sep { margin: 10px 22px 6px; font-size: 9.5px; letter-spacing: .3em; color: var(--mist); font-weight: 800; text-transform: uppercase; }

.side-foot { padding: 12px 22px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--mist); }
.side-foot button { color: var(--fog); font-weight: 700; font-size: 12.5px; padding: 4px 0; display: block; }
.side-foot button:hover { color: var(--pure); }

.main { min-width: 0; padding: 0 var(--pad) 72px; }

/* top strip — white band with black type, continuous with unifyaz.com */
.topstrip {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  background: var(--pure); color: var(--ink-0);
  margin: 0 calc(-1 * var(--pad)) 26px; padding: 26px var(--pad) 16px;
  flex-wrap: wrap;
}
.topstrip h1 { font-size: clamp(38px, 5vw, 58px); color: var(--ink-0); }
.topstrip .sub { color: oklch(42% 0 0); font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.topstrip .kicker { color: oklch(48% 0 0); }
.topstrip .btn { background: var(--ink-0); color: var(--pure); border-color: var(--ink-0); }
.topstrip .btn:hover { background: transparent; color: var(--ink-0); }
.kicker { font-size: 10.5px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: var(--mist); margin-bottom: 6px; }

/* ---------- primitives ---------- */
.card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px;
}
.card.flat { background: transparent; }
.card h3 { font-size: 21px; margin-bottom: 12px; letter-spacing: .05em; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--pure); color: var(--ink-0);
  font-weight: 800; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase;
  padding: 11px 20px; border-radius: var(--r); text-decoration: none;
  border: 1px solid var(--pure); transition: background .15s, color .15s, transform .1s;
}
.btn:hover { background: transparent; color: var(--pure); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--paper); border-color: var(--ink-4); }
.btn.ghost:hover { border-color: var(--pure); }
.btn.sm { padding: 7px 13px; font-size: 11px; }
.btn.danger { border-color: var(--alert); color: var(--alert); background: transparent; }
.btn.danger:hover { background: var(--alert); color: var(--pure); }
.btn[disabled] { opacity: .4; pointer-events: none; }

.stat-num { font-family: var(--display); font-size: clamp(40px, 4.4vw, 62px); line-height: .9; letter-spacing: .02em; }
.stat-lbl { font-size: 10.5px; font-weight: 800; letter-spacing: .26em; text-transform: uppercase; color: var(--mist); margin-top: 6px; }
.stat-sub { font-size: 12px; color: var(--fog); margin-top: 4px; }

.tag {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--ink-4);
  color: var(--fog); border-radius: var(--r);
}
.tag.fill { background: var(--paper); color: var(--ink-0); border-color: var(--paper); }
.tag.alert { border-color: var(--alert); color: var(--alert); }

/* instant hover tooltip — content comes from data-tip; a single body-level
   bubble (see app.js) so table/card overflow never clips it */
[data-tip] { cursor: help; }
.tipbox {
  position: fixed; width: max-content; max-width: 250px;
  background: var(--ink-0); color: var(--paper); border: 1px solid var(--ink-4);
  padding: 8px 11px; border-radius: var(--r);
  font-size: 12px; font-weight: 500; line-height: 1.45; text-align: left;
  opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 60;
}
.tipbox.on { opacity: 1; }

.hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

.muted { color: var(--mist); }
.small { font-size: 12.5px; }
.b { font-weight: 800; }

/* progress bars — blunt monochrome */
.bar { height: 7px; background: var(--ink-1); border: 1px solid var(--line); position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0; right: auto; background: var(--paper); display: block; }

/* tables — wrapped in .tablewrap for horizontal scroll on narrow screens */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.tablewrap table { min-width: 620px; }

/* exercise-block editor rows (player, program editor, customizer) */
.blockswrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.blockswrap > .inner { min-width: 640px; }
.block-grid { display: grid; grid-template-columns: 1fr 64px 90px 100px 74px 74px 36px; gap: 8px; align-items: center; margin-bottom: 8px; }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { font-size: 10px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--mist); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--ink-4); }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:hover td { background: var(--ink-3); }

/* list rows */
.row {
  display: flex; align-items: center; gap: 14px; padding: 13px 4px;
  border-bottom: 1px solid var(--line); text-decoration: none;
  transition: background .12s;
}
.row:hover { background: var(--ink-3); }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 800; font-size: 14px; }
.row .d { font-size: 12.5px; color: var(--mist); }

/* pills / segmented control */
.seg { display: inline-flex; border: 1px solid var(--ink-4); border-radius: var(--r); overflow: hidden; }
.seg button { padding: 8px 16px; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mist); }
.seg button.on { background: var(--paper); color: var(--ink-0); }

/* checkbox squares (habits) */
.ck {
  width: 26px; height: 26px; border: 2px solid var(--ink-4); border-radius: var(--r);
  display: grid; place-items: center; cursor: pointer; flex: none;
  font-size: 15px; color: var(--ink-0); transition: all .12s; background: transparent;
}
.ck.on { background: var(--pure); border-color: var(--pure); }

/* week dot strip */
.dots { display: flex; gap: 5px; }
.dot { width: 13px; height: 13px; border: 1px solid var(--ink-4); border-radius: 1px; }
.dot.on { background: var(--paper); border-color: var(--paper); }
.dot.today { outline: 1px solid var(--mist); outline-offset: 2px; }

/* messages */
.thread { display: flex; flex-direction: column; gap: 10px; padding: 18px 0; max-height: 56vh; overflow-y: auto; }
.msg { max-width: 72%; padding: 10px 14px; border-radius: var(--r); font-size: 14px; }
.msg.them { background: var(--ink-3); align-self: flex-start; border: 1px solid var(--line); }
.msg.me { background: var(--paper); color: var(--ink-0); align-self: flex-end; }
.msg .who { font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; opacity: .6; margin-bottom: 3px; }
.msg .when { font-size: 10.5px; opacity: .55; margin-top: 4px; }

/* workout player */
.exercise {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-2);
  margin-bottom: 14px; overflow: hidden;
}
.exercise > header {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer;
  background: var(--ink-2);
}
.exercise > header:hover { background: var(--ink-3); }
.ex-num { font-family: var(--display); font-size: 30px; color: var(--mist); width: 40px; }
.ex-name { font-weight: 800; font-size: 15px; }
.ex-rx { font-size: 12px; color: var(--mist); }
.ex-body { border-top: 1px solid var(--line); padding: 16px 18px; }
.set-grid { display: grid; grid-template-columns: 44px 1fr 1fr 1fr 44px; gap: 8px; align-items: center; margin-bottom: 8px; }
.set-grid input { padding: 8px 10px; text-align: center; }
.set-grid .lbl { font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--mist); text-align: center; }
.demo-box {
  aspect-ratio: 16/9; background: var(--ink-0); border: 1px solid var(--line);
  display: grid; place-items: center; margin-bottom: 14px; position: relative; overflow: hidden;
}
.demo-box::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(-45deg, transparent 0 18px, oklch(20% 0 0) 18px 19px);
}
.demo-box span { position: relative; font-family: var(--display); font-size: 22px; letter-spacing: .1em; color: var(--mist); }
.demo-box.has-video::before { display: none; }
.demo-box iframe, .demo-box video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--ink-0); }

/* charts */
.chart { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .line { stroke: var(--pure); stroke-width: 2.5; fill: none; }
.chart .area { fill: oklch(96% 0 0 / .06); }
.chart .pt { fill: var(--pure); }
.chart text { fill: var(--mist); font-size: 10px; font-family: var(--body); font-weight: 700; }
.chart .zone { fill: oklch(96% 0 0 / .05); stroke: var(--line); }

/* big hero panel on dashboard */
.hero {
  background: var(--ink-0); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(24px, 4vw, 44px); position: relative; overflow: hidden; margin-bottom: 14px;
}
.hero::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 340px; height: 340px;
  background: repeating-linear-gradient(-45deg, transparent 0 14px, oklch(18% 0 0) 14px 15px);
  transform: rotate(8deg); pointer-events: none;
}
.hero h2 { font-size: clamp(34px, 4.4vw, 56px); position: relative; }
.hero .k { position: relative; }

/* login */
.login {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  background:
    repeating-linear-gradient(-45deg, transparent 0 60px, oklch(12% 0 0) 60px 61px),
    var(--ink-0);
}
.login-card { width: min(460px, 100%); text-align: center; animation: rise .5s ease both; }
.login-card .wordmark { font-family: var(--display); font-size: clamp(64px, 12vw, 96px); letter-spacing: .04em; line-height: .9; }
.login-card .tagline { font-size: 11px; font-weight: 800; letter-spacing: .42em; text-transform: uppercase; color: var(--mist); margin: 10px 0 38px; }
.oauth {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; background: var(--pure); color: #1a1a19;
  font-weight: 800; font-size: 14.5px; padding: 14px 20px;
  border-radius: var(--r); margin-bottom: 10px; border: 1px solid var(--pure);
  transition: transform .12s, box-shadow .15s;
}
.oauth:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgb(0 0 0 / .45); }
.oauth.busy { opacity: .8; pointer-events: none; }
.spin {
  width: 16px; height: 16px; border: 2px solid #1a1a19; border-top-color: transparent;
  border-radius: 999px; animation: whirl .7s linear infinite;
}
@keyframes whirl { to { transform: rotate(360deg); } }
.login-div {
  display: flex; align-items: center; gap: 14px; margin: 22px 0 16px;
  color: var(--mist); font-size: 10px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase;
}
.login-div::before, .login-div::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.persona {
  display: flex; align-items: center; gap: 16px; text-align: left; width: 100%;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 20px; margin-bottom: 12px; transition: border-color .15s, transform .12s;
}
.persona:hover { border-color: var(--pure); transform: translateY(-2px); }
.persona .av { flex: none; }
.persona .t { font-weight: 800; font-size: 15px; }
.persona .d { font-size: 12.5px; color: var(--mist); }
.persona .arrow { margin-left: auto; font-family: var(--display); font-size: 22px; color: var(--mist); }

.av {
  width: 44px; height: 44px; border-radius: 999px; background: var(--paper); color: var(--ink-0);
  display: grid; place-items: center; font-family: var(--display); font-size: 19px; flex: none;
}
.av.sm { width: 32px; height: 32px; font-size: 14px; }
.av.lg { width: 76px; height: 76px; font-size: 32px; }
.av.dark { background: var(--ink-4); color: var(--paper); }
.av.photo { background-size: cover; background-position: center; color: transparent; }
button.av { cursor: pointer; border: 2px solid transparent; }
button.av:hover { border-color: var(--pure); }

/* progress photos */
.pphoto {
  aspect-ratio: 3/4; border: 1px solid var(--line); border-radius: var(--r);
  background-size: cover; background-position: center; position: relative;
}
.pphoto .del {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
  background: var(--ink-0); color: var(--paper); border: 1px solid var(--ink-4);
  border-radius: var(--r); font-size: 12px; display: grid; place-items: center;
}
.pphoto .del:hover { background: var(--alert); border-color: var(--alert); }
.pphoto .plabel {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 8px;
  background: rgb(0 0 0 / .65); font-size: 10.5px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
}

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .hd { font-size: 9.5px; font-weight: 800; letter-spacing: .2em; color: var(--mist); text-transform: uppercase; text-align: center; padding: 4px 0; }
.cal .day {
  aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--r); padding: 6px;
  font-size: 11px; color: var(--mist); position: relative; background: var(--ink-2);
}
.cal .day.workout { border-color: var(--ink-4); color: var(--paper); cursor: pointer; }
.cal .day.workout:hover { border-color: var(--pure); }
.cal .day.done { background: var(--paper); color: var(--ink-0); border-color: var(--paper); }
.cal .day.today { outline: 2px solid var(--pure); outline-offset: -2px; }
.cal .day .wk { position: absolute; bottom: 5px; left: 6px; right: 6px; font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* modal — collapsed-by-default add forms behind a "+" button */
.modal-wrap {
  position: fixed; inset: 0; z-index: 500; background: rgba(10, 10, 9, .72);
  display: flex; align-items: center; justify-content: center; padding: 18px;
  animation: rise .18s ease both;
}
.modal-card {
  width: min(680px, 100%); max-height: calc(100dvh - 36px); overflow: auto;
  /* white glow — lifts the dialog off the dark page in 3D */
  box-shadow: 0 0 0 1px oklch(100% 0 0 / .2), 0 10px 28px oklch(100% 0 0 / .14), 0 30px 90px oklch(100% 0 0 / .22);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.modal-head h3 { margin-bottom: 0; }
.modal-x { font-size: 26px; line-height: 1; color: var(--mist); padding: 2px 10px; }
.modal-x:hover { color: var(--pure); }
.strip-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
@media (max-width: 700px) {
  .modal-wrap { align-items: flex-end; padding: 0; }
  .modal-card { width: 100%; max-height: 92dvh; border-radius: var(--r) var(--r) 0 0; }
  .strip-right { align-items: flex-start; }
}

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--paper); color: var(--ink-0); font-weight: 800; font-size: 13px;
  padding: 12px 22px; border-radius: var(--r); z-index: 1000;
  letter-spacing: .06em; animation: rise .25s ease both;
}

/* range slider */
input[type=range] { -webkit-appearance: none; appearance: none; height: 4px; background: var(--ink-4); border: none; padding: 0; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; background: var(--pure); border-radius: 999px; cursor: pointer;
}

/* animations */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.view > * { animation: rise .35s ease both; }
.view > *:nth-child(2) { animation-delay: .05s; }
.view > *:nth-child(3) { animation-delay: .1s; }
.view > *:nth-child(4) { animation-delay: .15s; }
.view > *:nth-child(5) { animation-delay: .2s; }

/* leaderboard rank numerals */
.rank { font-family: var(--display); font-size: 26px; width: 40px; color: var(--mist); }
.rank.top { color: var(--pure); }

/* photo placeholders */
.photo-ph {
  aspect-ratio: 3/4; background: var(--ink-0); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--mist);
  font-family: var(--display); font-size: 15px; letter-spacing: .1em; text-align: center;
}

/* mobile */
@media (max-width: 700px) {
  /* 16px floor: anything smaller makes iOS Safari zoom-pan the page on focus */
  input, select, textarea { font-size: 16px; }
  table { font-size: 12.5px; }
  th, td { padding: 7px 8px; }
  /* narrow tables shrink to fit; wide ones opt into stacked rows below */
  .tablewrap table { min-width: 0; width: 100%; }
  /* .tablewrap.stack — each row becomes a bordered mini-card, cells stack
     with their column label (data-th) as a kicker. No side-to-side scroll. */
  .tablewrap.stack table, .tablewrap.stack tbody { display: block; width: 100%; }
  .tablewrap.stack tr:first-child { display: none; }
  .tablewrap.stack tr { display: block; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin-bottom: 10px; }
  .tablewrap.stack td { display: block; border: none; padding: 3px 0; white-space: normal !important; }
  .tablewrap.stack td:empty { display: none; }
  .tablewrap.stack td[data-th]::before {
    content: attr(data-th); display: block; font-size: 9.5px; font-weight: 800;
    letter-spacing: .22em; text-transform: uppercase; color: var(--mist); margin: 6px 0 3px;
  }
  .topstrip h1 { font-size: 34px; }
  .stat-num { font-size: 36px; }
  .hero h2 { font-size: 30px; }
  .card { padding: 16px 14px; }
  .msg { max-width: 88%; }
  .login-card .wordmark { font-size: 56px; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 100; left: 0; top: 0; bottom: 0; width: min(300px, 84vw); transform: translateX(-100%); transition: transform .22s ease; height: 100dvh; }
  .sidebar.open { transform: none; box-shadow: 24px 0 60px rgb(0 0 0 / .5); }
  .burger {
    position: fixed; z-index: 101;
    bottom: calc(16px + env(safe-area-inset-bottom)); right: 16px;
    background: var(--paper); color: var(--ink-0); font-family: var(--display);
    font-size: 15px; letter-spacing: .1em; padding: 10px 16px; border-radius: var(--r);
    box-shadow: 0 8px 24px rgb(0 0 0 / .55);
  }
  .burger.left { left: 16px; right: auto; }
  .main { padding-top: 6px; }
  .set-grid { grid-template-columns: 36px 1fr 1fr 1fr 36px; }
}
@media (min-width: 901px) { .burger { display: none; } }
