
:root {
  --rz-side: 16px;
  --rz-gap:   5px;
}
/* the board note's own corner (boardparts.js); a text area has none (15.2195) */
.rz-corner { color: var(--rz-ink, var(--line2)); }
textarea::-webkit-resizer, .textarea::-webkit-resizer { display: none; }

.panel-body { overscroll-behavior: contain; }

.field-icon { position: relative; --field-icon-w: var(--sp-400); }
/* a finger's reach (15.2789): the button the field's whole height, over its border */
@media (pointer: coarse) { .field-icon { --field-icon-w: 44px; } .field-icon > .field-icon-btn { top: 0; bottom: 0; } }
input.input.date:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]) {
  width: 100%; padding-right: calc(var(--field-icon-w) + var(--sp-100));
}
.field-icon-btn {
  position: absolute;
  top: var(--bw); right: var(--bw); bottom: var(--bw);
  width: var(--field-icon-w);
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; color: var(--ink3); cursor: pointer;
  border-radius: 0 var(--r) var(--r) 0;
  transition: background .15s, color .15s;
}
.field-icon-btn:hover  { color: var(--ink); }
.field-icon-btn:active { color: var(--acc-ink); }
.field-icon-btn svg { width: 17px; height: 17px; }

.daypick, .timepick {
  position: fixed; z-index: var(--z-pick); padding: var(--sp-150);
  background: var(--card); border: var(--bw) solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-raised);
}
.daypick { width: 268px; overflow: clip; }
.daypick-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-100); font-size: var(--fs-s);
}
.daypick-head button {
  height: var(--h-btn-sm); min-width: var(--h-btn-sm);
  padding: 0 var(--sp-075);
  border: 0; border-radius: var(--r-s);
  background: none; color: var(--ink2);
  line-height: 1;
  transition: background .15s, color .15s;
}
/* 15.2453: the month's arrows are drawn icons centred in their buttons, never a font's «‹ ›» */
.daypick-head button[data-move] { display: inline-grid; place-items: center; padding: 0; }
.daypick-head button:hover { background: var(--a-200); color: var(--ink); }
.daypick-head button:active { background: var(--a-300); }
.daypick-when { display: flex; align-items: center; gap: var(--sp-025); }
.daypick-when button { font-weight: var(--fw-med); color: var(--ink); }

.daypick-over {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-150);
  background: var(--card);
  border-radius: inherit;
}
.daypick-pick {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-050);
  width: 100%;
}
.daypick-pick button {
  height: var(--h-btn); padding: 0 var(--sp-050);
  border: 0; border-radius: var(--r);
  background: none; color: var(--ink);
  font-size: var(--fs-s);
  transition: background .15s, color .15s;
}
.daypick-pick button:hover { background: var(--a-200); }
.daypick-pick button.on { background: var(--acc-weak); color: var(--acc-ink);
                          font-weight: var(--fw-med); }

.daypick-wheel {
  position: relative;
  --wheel-h: 216px;
  width: 100%; height: var(--wheel-h); overflow: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 22%,
                                      #000 78%, transparent);
          mask-image: linear-gradient(transparent, #000 22%,
                                      #000 78%, transparent);
}
.daypick-wheel::-webkit-scrollbar { width: 0; height: 0; }
.daypick-wheel-rail {
  display: flex; flex-direction: column;
  padding: calc((var(--wheel-h) - var(--h-btn)) / 2) 0;
}
.daypick-wheel button {
  height: var(--h-btn); flex: none;
  scroll-snap-align: center;
  border: 0; background: none; color: var(--ink3);
  font-size: var(--fs); font-variant-numeric: tabular-nums;
  transition: color .15s;
}
.daypick-wheel button:hover { color: var(--ink); }
.daypick-wheel button.on {
  color: var(--acc-ink); font-weight: var(--fw-semi); font-size: var(--fs-l);
}
.daypick-wheel-box { position: relative; width: 100%; }
.daypick-wheel-band {
  position: absolute; left: 0; right: 0; top: 50%;
  height: var(--h-btn); margin-top: calc(var(--h-btn) / -2);
  pointer-events: none;
  border-top: var(--bw) solid var(--line);
  border-bottom: var(--bw) solid var(--line);
}
.daypick-week, .daypick-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--sp-025);
}
.daypick-week span {
  text-align: center; font-size: var(--fs-xs); color: var(--ink3);
  padding-bottom: var(--sp-050);
}
.daypick-grid button {
  height: 30px; border: var(--bw) solid transparent; border-radius: var(--r-s);
  background: none; color: var(--ink);
  font-family: var(--num); font-size: var(--fs-s);
}
.daypick-grid .other {
  display: flex; align-items: center; justify-content: center;
  height: 30px;
  color: var(--line2);
  font-family: var(--num); font-size: var(--fs-s);
}
.daypick-grid button:hover { background: var(--a-200); }
.daypick-grid button.now { border-color: var(--line2); }
.daypick-grid button.on { background: var(--acc-solid); color: #fff; }
.daypick-foot {
  display: flex; gap: var(--sp-075); margin-top: var(--sp-100);
  padding-top: var(--sp-100); border-top: var(--bw) solid var(--line);
}
.daypick-foot button {
  flex: 1; padding: var(--sp-075); border: var(--bw) solid var(--line);
  border-radius: var(--r-s); background: none; color: var(--ink2);
  font-size: var(--fs-s);
}
.daypick-foot button:hover { border-color: var(--acc); color: var(--acc-ink); }

.numfield { position: relative; display: block; min-width: 0; }
.numfield > .input { width: 100%; }
.numfield-unit {
  position: absolute; top: 0; right: var(--sp-150); height: 100%;
  display: inline-flex; align-items: center;
  color: var(--ink3); font-size: var(--fs-s); pointer-events: none;
}
.numfield.has-unit > .input { padding-right: var(--sp-400); }

.numfield.with-steps {
  display: inline-flex; align-items: center; gap: var(--sp-050);
  width: auto;
}
.numfield.with-steps > .input {
  width: 5ch; min-width: 5ch; max-width: 5ch; text-align: center;
  padding-left: var(--sp-100); padding-right: var(--sp-100);
}
.numfield.with-steps.has-unit > .input { padding-right: var(--sp-100); }
.numfield.with-steps > .numfield-unit {
  position: static; height: auto; right: auto;
}

.demo-bar:not(:empty) {
  display: flex; align-items: center; gap: var(--sp-150);
  padding: var(--sp-150) var(--sp-200);
  border: var(--bw) dashed var(--line2); border-radius: var(--r);
  background: var(--a-100);
}
.demo-bar .small { color: var(--ink3); }
/* 15.2966: an empty bar takes no gap of its column - the screen's tabs stand where every screen's do */
.demo-bar:empty { display: none; }

.fold { padding: 0; }
.sblock .fold {
  box-shadow: none;
  border: var(--bw) solid var(--line);
}
.fold-head {
  display: flex; align-items: center; gap: var(--sp-100);
  width: 100%; padding: var(--sp-150) var(--gap);
  background: none; border: 0; text-align: left; cursor: pointer;
  font: inherit; color: inherit;
}
.fold-head:hover { background: var(--a-100); }
.fold.open .fold-head { border-bottom: var(--bw) solid var(--line); }
.fold-note { font-size: var(--fs-s); color: var(--ink3); }

.fold-head > .card-title,    .fold-head > .fold-note,
.fold-head > .fold-t,
.dash-card > .row > .card-title, .dash-card > .row > .dash-note {
  align-self: baseline;
}
.fold-x {
  display: inline-flex; color: var(--ink3); transition: transform .18s;
}
.fold.open .fold-x { transform: rotate(180deg); }
.fold-body {
  display: grid; grid-template-rows: 0fr;
  visibility: hidden; padding: 0;
  transition: grid-template-rows var(--dur-fold) var(--ease-out),
              padding var(--dur-fold) var(--ease-out),
              visibility var(--dur-fold);
}
.fold.open .fold-body {
  grid-template-rows: 1fr; visibility: visible;
  transition-duration: var(--dur-fold), var(--dur-fold), 0s;
}
.fold-in { min-height: 0; min-width: 0; overflow: clip; }
.fold.open > .fold-body > .fold-in { overflow-clip-margin: var(--sp-050); }
html[data-motion="calm"] .fold-body { transition: none; }

.fold-t { font-size: var(--fs); line-height: var(--lh);
          font-weight: var(--fw-reg); color: var(--ink); }

.fold-rows {
  display: flex; flex-direction: column;
  max-height: 420px; overflow: auto;
}
.fold-rows > * {
  padding: var(--sp-100) var(--gap);
  border: 0;
  border-top: var(--bw) solid var(--line);
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.fold-rows > *:first-child { border-top: 0; }
.fold-in > .empty-state { padding: var(--sp-300) var(--gap); }

.fold-plain {
  display: flex; flex-direction: column; gap: var(--gap);
  padding: var(--gap);
}
.fold-plain > .grid-table { max-height: 420px; min-height: 0; }

.fold-row {
  display: flex; align-items: flex-start; gap: var(--gap);
}
.fold-row-main { flex: 1 1 auto; min-width: 0; }
.fold-row-side { flex: none; text-align: right; }
.fold-row-note {
  margin-top: var(--sp-025);
  font-size: var(--fs-s); line-height: var(--lh-s); color: var(--ink3);
}

.timepick { width: max-content; border-radius: var(--r-l); box-shadow: var(--sh-overlay); }
.timepick .timepick-zone { max-width: none; }

/* A time on a drum (a touch screen): two wheels turned by a finger, the chosen row in the band (15.2791) */
.dr { position: relative; display: flex; align-items: center; justify-content: center; gap: var(--sp-050);
  padding: 0 var(--sp-100); }
.dr-band { position: absolute; left: 0; right: 0; top: 50%; height: var(--h-field);
  margin-top: calc(var(--h-field) / -2); border-radius: var(--r); background: var(--a-200); pointer-events: none; }
.dr-wheel { position: relative; width: 64px; height: calc(var(--h-field) * 5); overflow: auto; overscroll-behavior: contain;
  scrollbar-width: none; scroll-snap-type: y mandatory; outline: none; touch-action: pan-y;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);  /* own colour: a mask's opacity, not a hue */
          mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }  /* own colour: a mask's opacity, not a hue */
.dr-wheel::-webkit-scrollbar { width: 0; }
.dr-rail { display: flex; flex-direction: column; padding: calc(var(--h-field) * 2) 0; }
.dr-item { flex: none; height: var(--h-field); border: 0; background: none; color: var(--ink2);
  font-size: var(--fs-num-s); font-variant-numeric: tabular-nums; cursor: pointer; scroll-snap-align: center;
  transform-origin: center; backface-visibility: hidden; -webkit-tap-highlight-color: transparent; }
.dr-item.on { color: var(--ink); font-weight: var(--fw-semi); }
.dr-colon { position: relative; color: var(--ink); font-size: var(--fs-num-s); font-weight: var(--fw-semi); }
html[data-by="key"] .dr-wheel:focus-visible { box-shadow: 0 0 0 2px var(--acc); border-radius: var(--r); }

/* A time on a dial (a mouse): the hand led round the face; hours first, then the minutes open by themselves (15.2791) */
.dl { display: flex; flex-direction: column; align-items: center; gap: var(--sp-200); }
.dl-show { display: flex; align-items: center; gap: var(--sp-050); }
.dl-seg { min-width: 76px; height: 60px; border: 0; border-radius: var(--r-l); background: var(--a-200); color: var(--ink);
  font-size: var(--fs-num-l); font-weight: var(--fw-semi); font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background .2s, color .2s; }
.dl-seg:hover:not(.on) { color: var(--acc-ink); }
.dl-seg.on { background: var(--acc-weak-2); color: var(--acc-ink); }
.dl-colon { color: var(--ink); font-size: var(--fs-num-l); font-weight: var(--fw-semi); }
.dl-face { width: 240px; height: 240px; touch-action: none; cursor: pointer; user-select: none; outline: none;
  border-radius: 50%; }
html[data-by="key"] .dl-face:focus-visible { box-shadow: 0 0 0 2px var(--acc); }
.dl-plate { fill: var(--a-200); }
.dl-hand { transform-box: view-box; transform-origin: 120px 120px; transition: transform .34s cubic-bezier(.3, 1.25, .5, 1); }
.dl-face.held .dl-hand { transition: transform .06s linear; }
.dl-stick { fill: var(--acc-btn); transition: y .2s var(--ease-out), height .2s var(--ease-out); }
.dl-knob { fill: var(--acc-btn); transition: cy .2s var(--ease-out); }
.dl-dot { fill: var(--acc-btn-ink); opacity: 0; transition: cy .2s var(--ease-out), opacity .15s; }
.dl-dot.shown { opacity: 1; }
.dl-pin { fill: var(--acc-btn); }
.dl-n { fill: var(--ink); font-size: var(--fs); font-variant-numeric: tabular-nums; pointer-events: none; transition: fill .15s; }
.dl-n.dl-inner { fill: var(--ink2); font-size: var(--fs-s); }
.dl-n.on { fill: var(--acc-btn-ink); font-weight: var(--fw-semi); }
.dl-set { transform-box: view-box; transform-origin: 120px 120px; transition: opacity .22s var(--ease-out), transform .26s var(--ease-out); }
.dl-face[data-mode="h"] .dl-minutes, .dl-face[data-mode="m"] .dl-hours { opacity: 0; transform: scale(.86); pointer-events: none; }
.dl-face[data-mode="m"] .dl-hours { transform: scale(1.12); }
html[data-motion="calm"] :is(.dl-hand, .dl-set, .dl-stick, .dl-knob, .dl-dot, .dl-seg) { transition: none; }
/* A few times of the day as chips (15.970, `timeList`): a chip changes at a press, «+» adds one; the small window -
   hours and minutes, the usual hours, the answer */
.time-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--sp-100); }
.time-chip { cursor: pointer; font-variant-numeric: tabular-nums; }
.time-chip:hover { background: var(--a-200); }
.time-list-empty { color: var(--ink3); }
.time-ask { display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-150); padding: var(--sp-050); }
.time-ask-usual { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-050); max-width: 272px; }
.time-ask .timepick-zone { margin-top: 0; max-width: 272px; }
.timepick-zone {
  margin-top: var(--sp-100); padding-top: var(--sp-075);
  border-top: var(--bw) solid var(--line);
  font-size: var(--fs-s); color: var(--ink3); text-align: center;
  max-width: 190px;
}

.hint-stack { display: grid; }
.hint-stack > * { grid-area: 1 / 1; }
.hint-stack > .off { visibility: hidden; }

/* 15.1030: a storage's mark - the service's own drawing, or the registry's sign on a quiet ground */
.svc-mark { flex: none; display: inline-grid; place-items: center; width: var(--sp-400); height: var(--sp-400);
            border-radius: var(--r-s); background: var(--a-100); color: var(--ink2); }
.svc-mark.big { width: var(--sp-600); height: var(--sp-600); border-radius: var(--r); }
.svc-mark.brand > svg { width: 62%; height: auto; }
/* Yandex Disk's saucer is dark on top: it stands on a light plate in both themes, as its app icon does */
.svc-mark.brand.yadisk { background: #ffffff; }
.svc-mark.brand.yadisk > svg { width: 74%; }
.svc-caption { display: flex; align-items: center; gap: var(--sp-100); }
/* a service's steps under its group: the foot's inset, a step of air above, the steps' own words */
.rg-foot.svc-steps { padding-top: var(--sp-100); font-size: var(--fs); line-height: var(--lh); color: var(--ink); }

/* 15.2768: the notices' window - its column of sections, and the events' rows with a mark for each place under the
   places' heads, stuck at the top while the events scroll */
.nt-col { display: flex; flex-direction: column; gap: var(--sp-300); --nt-col: 88px; }
.nt-col > .rg-back { align-self: flex-start; }
/* 15.2794: the devices' page keeps the window's spacing between its groups */
.nt-devices { display: flex; flex-direction: column; gap: var(--sp-300); }
.nt-events { display: flex; flex-direction: column; gap: var(--sp-300); }
/* the window's body keeps its top padding: the bar sticks over it, no row shows above */
.panel-body .nt-headbar { top: calc(-1 * var(--sp-200)); }
.nt-headbar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: var(--sp-150);
  margin-bottom: calc(-1 * var(--sp-150)); padding: var(--sp-150) var(--sp-200);
  background: var(--card); border-bottom: var(--bw) solid var(--line); }
.nt-headbar-title { flex: 1 1 auto; min-width: 0; color: var(--ink); font-size: var(--fs); line-height: var(--lh);
  font-weight: var(--fw-semi); }
.nt-heads, .nt-marks { display: grid; grid-template-columns: repeat(3, var(--nt-col)); flex: none; }
.nt-head { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink2);
  font-size: var(--fs-s); line-height: var(--lh-s); font-weight: var(--fw-semi); }
.nt-head > .ic { display: none; }
.nt-row { gap: var(--sp-150); }
.nt-row > .rg-main { flex: 1 1 auto; min-width: 0; }
.nt-cell { display: grid; place-items: center; min-height: 44px; }
.nt-cell > .pick-mark { margin: 0; }
@media (max-width: 700px) {
  .nt-col { --nt-col: 44px; }
  .nt-head > .ic { display: inline-flex; }
  .nt-head > .nt-head-word { display: none; }
  .nt-row { flex-wrap: nowrap; }
}
