/* ІнфоЧек Mini App — palette and effects: docs/MINI_APP.md */

:root {
  --bg: #200633; --bg-deep: #160326;
  --card-from: #3d114e; --card-to: #381186;
  --stroke: rgba(144, 135, 200, .45); --stroke-soft: rgba(144, 135, 200, .22);
  --works: #ffc94d; --lilac: #a086e9; --rose: #bb5e7b; --rose-glow: #e07a9a;
  --text: #fffafe; --text-dim: #a08eb3;
  --logo-blue: #044376; --logo-violet: #3c0074; --logo-crimson: #70004c;
  --brand: linear-gradient(135deg, var(--logo-blue) 0%, var(--logo-violet) 55%, var(--logo-crimson) 100%);
  --card: linear-gradient(135deg, var(--card-from), var(--card-to));
  --glass: linear-gradient(135deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .035));
  --radius: 26px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);
  /* specular highlight position, moved by the gyroscope / pointer */
  --gx: 28%; --gy: 0%;
  --safe-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.4 Manrope, "e-Ukraine", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  user-select: none;
  -webkit-user-select: none;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input { user-select: text; -webkit-user-select: text; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.defs { position: absolute; width: 0; height: 0; }

/* --- living background ------------------------------------------------------------------ */

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, #2a0b45 0%, var(--bg) 55%, var(--bg-deep) 100%); }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; will-change: transform; }
.b1 { width: 70vmax; height: 70vmax; left: -30vmax; top: -25vmax; background: radial-gradient(circle, var(--logo-blue), transparent 65%); animation: drift1 38s ease-in-out infinite alternate; }
.b2 { width: 60vmax; height: 60vmax; right: -28vmax; top: 10vh; background: radial-gradient(circle, var(--logo-crimson), transparent 65%); animation: drift2 44s ease-in-out infinite alternate; }
.b3 { width: 55vmax; height: 55vmax; left: -10vmax; bottom: -30vmax; background: radial-gradient(circle, var(--logo-violet), transparent 65%); animation: drift3 40s ease-in-out infinite alternate; }
.b4 { width: 34vmax; height: 34vmax; right: 0; bottom: 8vh; background: radial-gradient(circle, rgba(160, 134, 233, .55), transparent 65%); animation: drift1 52s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(18vw, 22vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-22vw, 30vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(25vw, -18vh) scale(1.1); } }

/* --- liquid glass ----------------------------------------------------------------------- */

.glass {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 -1px 0 rgba(0, 0, 0, .22),
    0 12px 32px rgba(10, 0, 22, .45);
  isolation: isolate;
}
/* rim: brighter top-left, darker bottom-right */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .5), rgba(144, 135, 200, .28) 30%, rgba(144, 135, 200, .08) 65%, rgba(255, 255, 255, .22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* specular highlight that slides with the phone's tilt */
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(90% 70% at var(--gx) var(--gy), rgba(255, 255, 255, .13), transparent 62%);
  transition: background-position .2s linear;
}
.chromium .glass.lens { -webkit-backdrop-filter: blur(18px) saturate(190%); backdrop-filter: url(#lens) blur(18px) saturate(190%); }

/* weak phones and reduced motion: solid brand cards, no blur, no drift */
.lite .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--card); }
.lite .blob { animation: none; filter: blur(40px); }
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* --- header ----------------------------------------------------------------------------- */

.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(var(--safe-top) + 12px) 16px 10px;
  /* dense down to the last few pixels: a banner scrolled under it showed through the logo (testers 02.10.2026) */
  background: linear-gradient(var(--bg), rgba(32, 6, 51, .97) calc(100% - 12px), rgba(32, 6, 51, 0));
}
.brand { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }  /* a long address title ends with «…» */
.brand-text b { font-weight: 800; font-size: 18px; letter-spacing: .2px; }
.brand-text small { color: var(--text-dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.logo-wrap { position: relative; width: 42px; height: 42px; flex: none; }
.logo { width: 42px; height: 42px; border-radius: 12px; display: block; position: relative; z-index: 1; transition: filter .6s var(--ease); }
.logo-wrap .glow { position: absolute; inset: -6px; border-radius: 16px; background: radial-gradient(circle at 70% 40%, rgba(255, 236, 170, .75), rgba(224, 122, 154, .35) 45%, transparent 70%); filter: blur(8px); animation: breathe 3.2s ease-in-out infinite; transition: opacity .6s; }
@keyframes breathe { 50% { opacity: .55; transform: scale(.94); } }
/* no power: the bulb goes dark with a short flicker */
.logo-wrap.dark .logo { filter: grayscale(.7) brightness(.55); }
.logo-wrap.dark .glow { opacity: 0; animation: none; }
.logo-wrap.flicker .logo { animation: flicker .7s steps(1) 1; }
@keyframes flicker { 0%, 30%, 60% { filter: brightness(.4); } 15%, 45%, 80% { filter: brightness(1.2); } }
/* power is back: a flash and sparks, once */
.sparks { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.sparks i { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: #ffe9a8; box-shadow: 0 0 8px #ffd36b; animation: spark .9s var(--ease) forwards; }
@keyframes spark { from { transform: translate(-50%, -50%) scale(1); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.2); opacity: 0; } }

.top-right { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn {
  display: flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; padding: 0; border-radius: 50%; color: var(--text);
  border: 1.5px solid var(--stroke-soft); background: rgba(160, 134, 233, .08); transition: transform .25s var(--spring);
}
.icon-btn:active { transform: scale(.9); }
.icon-btn svg { display: block; flex: none; }
.icon-btn .fs-close, .icon-btn.on .fs-open { display: none; }
.icon-btn.on .fs-close { display: inline; }
.pill {
  flex: none; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--lilac);
  font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums;
  background: rgba(160, 134, 233, .08); box-shadow: 0 0 18px rgba(160, 134, 233, .18);
}

.alert-strip {
  margin: 0 16px 6px; padding: 9px 14px; border-radius: 14px; font-size: 13px;
  background: linear-gradient(90deg, rgba(187, 94, 123, .32), rgba(187, 94, 123, .12));
  border: 1px solid rgba(224, 122, 154, .45);
}

/* ГАВ in force: bright orange, the one colour outside the brand palette, so it cannot be overlooked;
   deeper than the yellow of planned works so the two never blend (asked 02.10.2026) */
.emergency-strip {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 0 16px 8px; padding: 11px 14px; border-radius: 16px;
  font-size: 13px; line-height: 1.35; color: #fff4e6;
  background: linear-gradient(110deg, rgba(255, 106, 0, .62), rgba(255, 90, 0, .3) 60%, rgba(255, 106, 0, .5));
  background-size: 200% 100%;
  border: 1px solid #ff6a00;
  box-shadow: 0 0 22px rgba(255, 106, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .2);
  animation: ember 6s ease-in-out infinite;
}
.emergency-strip b { color: #fff; font-weight: 800; }
.emergency-strip .em-ico { font-size: 18px; line-height: 1.1; filter: drop-shadow(0 0 6px rgba(255, 106, 0, .9)); }
@keyframes ember { 50% { background-position: 100% 0; box-shadow: 0 0 30px rgba(255, 106, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .2); } }

/* --- layout ------------------------------------------------------------------------------ */

main { padding: 4px 16px calc(var(--safe-bottom) + 108px); max-width: 560px; margin: 0 auto; }
/* Each block of a new screen rises on its own. Not the whole screen: opacity < 1 on an ancestor makes it
   a «backdrop root», and the glass cards inside blur nothing until the animation ends — then they pop.
   A block with glass inside only moves; its glass fades itself. */
.view-enter > * { animation: rise .45s var(--ease) both; }
.view-enter > :not(.glass):has(.glass) { animation-name: slide; }
.view-enter > :not(.glass) .glass { animation: fade .45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes slide { from { transform: translateY(14px) scale(.985); } }

.card { padding: 18px; margin-bottom: 14px; }
.card h2 { margin: 0 0 10px; font-size: 17px; font-weight: 800; }
.card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.muted { color: var(--text-dim); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.section-title { margin: 18px 4px 10px; font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text-dim); }

/* --- chips, buttons, segmented ------------------------------------------------------------ */

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--stroke-soft);
  transition: transform .35s var(--spring), background .25s, border-color .25s;
}
.chip:active { transform: scale(.94); }
.chip.on { background: rgba(160, 134, 233, .2); border-color: var(--lilac); box-shadow: 0 0 16px rgba(160, 134, 233, .25); }
.chip .sq { font-size: 12px; color: var(--text-dim); font-weight: 600; }
.chip.on .sq { color: var(--text); }
.chip.add { border-style: dashed; color: var(--text-dim); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 18px; border-radius: 18px; font-weight: 700;
  background: var(--brand); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 22px rgba(60, 0, 116, .45);
  transition: transform .3s var(--spring), filter .2s;
}
.btn:active { transform: scale(.96); filter: brightness(1.15); }
.btn.ghost { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--stroke-soft); }
.btn.rose { background: linear-gradient(135deg, #8e3756, var(--rose)); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btns { display: flex; gap: 10px; }
.btns .btn { flex: 1; }

.segmented { position: relative; display: flex; padding: 4px; border-radius: 16px; background: rgba(0, 0, 0, .22); box-shadow: inset 0 0 0 1px var(--stroke-soft); }
.segmented button { position: relative; z-index: 1; flex: 1; padding: 8px 6px; border-radius: 12px; font-weight: 700; font-size: 14px; color: var(--text-dim); transition: color .25s; }
.segmented button.on { color: var(--text); }
.segmented button[disabled] { opacity: .35; }
.segmented .seg-drop { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 12px; background: linear-gradient(135deg, rgba(160, 134, 233, .45), rgba(56, 17, 134, .7)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 14px rgba(56, 17, 134, .5); transition: transform .45s var(--spring), width .45s var(--spring); }

/* --- today: ring of the day --------------------------------------------------------------- */

.ring-card { padding: 16px 16px 20px; text-align: center; }
.ring-note { font-size: 12px; color: var(--text-dim); margin: -4px 0 8px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.note-q {
  width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1px solid var(--lilac); background: rgba(160, 134, 233, .12);
  color: var(--lilac); font-family: inherit; font-size: 11px; font-weight: 700; line-height: 16px; cursor: pointer; position: relative;
}
.note-q::before { content: ""; position: absolute; inset: -12px; }  /* a finger-sized target around the small circle */
.ring-box { position: relative; width: min(72vw, 300px); aspect-ratio: 1; margin: 18px auto 14px; }
.ring-box svg { width: 100%; height: 100%; overflow: visible; }
.ring-hit { fill: none; stroke: transparent; pointer-events: stroke; touch-action: none; cursor: pointer; }
.ring-scrub { fill: #fffafe; stroke: var(--lilac); stroke-width: 3; filter: drop-shadow(0 0 6px rgba(160, 134, 233, .8)); pointer-events: none; }
.ring-track { fill: none; stroke: rgba(144, 135, 200, .16); }
.ring-off { fill: none; stroke: var(--rose); stroke-linecap: round; animation: draw 1.1s var(--ease) both; }
.ring-off.now { stroke: var(--rose-glow); filter: url(#glow); }
.ring-off.past { stroke: rgba(187, 94, 123, .45); }
.ring-works { fill: none; stroke: var(--works); stroke-linecap: round; animation: draw 1.1s var(--ease) both; }
.ring-works.now { filter: url(#glow); }
.ring-works.past { stroke: #8f7a45; }
@keyframes draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.ring-tick { stroke: rgba(255, 250, 254, .38); stroke-width: 1.5; }
.ring-tick.major { stroke: rgba(255, 250, 254, .7); stroke-width: 2.5; }
.ring-label { fill: var(--text-dim); font-size: 13px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.ring-hand { transition: transform 1s linear; transform-origin: 160px 160px; }
.ring-hand line { stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; }
.ring-hand circle { fill: var(--text); filter: drop-shadow(0 0 6px rgba(255, 255, 255, .9)); }
.ring-center { position: absolute; inset: 17%; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-center .state { font-size: 13px; font-weight: 700; color: var(--text-dim); letter-spacing: .3px; }
.ring-center .timer { font-size: clamp(30px, 10vw, 42px); font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.5px; margin: 4px 0 2px; }
.ring-center .at { font-size: 13px; color: var(--text-dim); }
.ring-center.off .timer { color: var(--rose-glow); text-shadow: 0 0 22px rgba(224, 122, 154, .55); }
.ring-center.calm .timer { font-size: clamp(20px, 6.4vw, 26px); }
.ring-center.works .timer, .status-box.works .timer { color: var(--works); text-shadow: 0 0 22px rgba(255, 201, 77, .45); }

.intervals { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
/* the rose dashed pill of «немає відключень» from the channel posts */
.dash-pill { padding: 7px 14px; border-radius: 999px; border: 1.5px dashed var(--rose); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.dash-pill.past { opacity: .45; }
.dash-pill.now { border-style: solid; border-color: var(--rose-glow); background: rgba(224, 122, 154, .14); box-shadow: 0 0 16px rgba(224, 122, 154, .35); }
.dash-pill.none { border-color: var(--lilac); }
.dash-pill.works { border-color: var(--works); color: var(--works); }
.dash-pill.works.now { border-color: var(--works); background: rgba(255, 201, 77, .14); box-shadow: 0 0 16px rgba(255, 201, 77, .35); }

.plates { display: grid; gap: 8px; margin-top: 12px; text-align: left; }
.plate { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--stroke-soft); font-size: 13.5px; }
.plate .ico { font-size: 17px; line-height: 1.2; }
.plate b { font-weight: 700; }
.plate.alarm { border-color: rgba(224, 122, 154, .55); background: rgba(187, 94, 123, .14); }
/* planned works: yellow everywhere — the plate, the bar, the ring, the lists (asked 02.10.2026) */
.plate.works { border-color: rgba(255, 201, 77, .6); background: rgba(255, 201, 77, .1); }
.plate.works b { color: var(--works); }

/* --- today: plain hours (default view) ----------------------------------------------------- */

.status-box { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 0 16px; }
.status-box .state { font-size: 13px; font-weight: 700; color: var(--text-dim); letter-spacing: .3px; }
.status-box .timer { font-size: clamp(40px, 13vw, 54px); font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.5px; margin: 6px 0 4px; }
.status-box .at { font-size: 14px; color: var(--text-dim); }
.status-box.off .timer { color: var(--rose-glow); text-shadow: 0 0 22px rgba(224, 122, 154, .55); }
.status-box.calm .timer { font-size: clamp(24px, 7.5vw, 30px); }

.day-bar-box { position: relative; margin: 4px 0 14px; }
.day-bar { position: relative; height: 16px; border-radius: 9px; background: rgba(160, 134, 233, .16); touch-action: none; cursor: pointer; }
/* a taller invisible strip: easier to hit with a finger */
.day-bar::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; bottom: -14px; }
.bar-tip { position: absolute; top: 0; z-index: 2; transform: translate(-50%, calc(-100% + 2px)); display: grid; justify-items: center; gap: 1px; padding: 6px 12px; border-radius: 14px; white-space: nowrap; pointer-events: none; background: rgba(32, 6, 51, .94); border: 1px solid var(--lilac); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.bar-tip b { font-size: 17px; font-weight: 800; }
.bar-tip small { font-size: 12px; font-weight: 700; color: var(--text-dim); }
.bar-tip.off { border-color: var(--rose-glow); }
.bar-tip.off small { color: var(--rose-glow); }
.bar-tip::after { content: ""; position: absolute; top: 100%; left: calc(50% + var(--arrow, 0px)); margin-left: -6px; border: 6px solid transparent; border-top-color: var(--lilac); }
.bar-tip.off::after { border-top-color: var(--rose-glow); }
.bar-tip.works { border-color: var(--works); }
.bar-tip.works small { color: var(--works); }
.bar-tip.works::after { border-top-color: var(--works); }
.day-bar i { position: absolute; top: 0; bottom: 0; border-radius: 9px; background: var(--rose); }
.day-bar i.past { background: rgba(187, 94, 123, .45); }
.day-bar i.now { background: var(--rose-glow); box-shadow: 0 0 14px rgba(224, 122, 154, .6); }
.day-bar i.works { background: var(--works); box-shadow: 0 0 10px rgba(255, 201, 77, .45); }
.day-bar i.works.past { background: #8f7a45; box-shadow: none; }
.day-bar .now-cursor { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: #fff; box-shadow: 0 0 8px #fff; transition: left 1s linear; }
.day-bar .bar-scrub { position: absolute; top: 50%; z-index: 1; box-sizing: border-box; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #fffafe; border: 3px solid var(--lilac); box-shadow: 0 0 8px rgba(160, 134, 233, .8); pointer-events: none; }
.day-bar .bar-scrub[hidden] { display: none; }
.day-bar-ticks { position: relative; height: 7px; margin-top: 3px; pointer-events: none; }
.day-bar-ticks i { position: absolute; top: 0; width: 1.5px; height: 4px; margin-left: -.75px; border-radius: 1px; background: rgba(255, 250, 254, .3); }
.day-bar-ticks i.major { height: 7px; width: 2px; margin-left: -1px; background: rgba(255, 250, 254, .65); }
body.no-ticks .day-bar-ticks i:not(.major), body.no-ticks .ring-tick:not(.major) { display: none; }
.day-bar-hours { position: relative; height: 15px; margin-top: 2px; font-size: 11.5px; font-weight: 700; color: var(--text-dim); }
.day-bar-hours span { position: absolute; top: 0; transform: translateX(-50%); }  /* under its tick */
.day-bar-hours span:first-child { transform: none; }
.day-bar-hours span:last-child { transform: translateX(-100%); }

.hours-list { display: grid; gap: 8px; text-align: left; }
.hrow { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 18px; border: 1.5px dashed var(--rose); background: rgba(187, 94, 123, .06); }
.hrow b { font-size: 19px; font-weight: 800; letter-spacing: .2px; white-space: nowrap; }
.hrow.none b { white-space: normal; text-align: center; }
.hrow .dur { white-space: nowrap; text-align: right; }
@media (max-width: 380px) { .hrow { gap: 9px; padding: 12px 13px; } .hrow b { font-size: 17px; } .hrow .dur { font-size: 13px; } }
.hrow .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--rose); }
.hrow .dur { color: var(--text-dim); font-weight: 600; font-size: 14px; margin-left: auto; }
.hrow .tag { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgba(255, 255, 255, .08); }
.hrow.past { opacity: .45; }
.hrow.now { border-style: solid; border-color: var(--rose-glow); background: rgba(224, 122, 154, .14); box-shadow: 0 0 18px rgba(224, 122, 154, .3); }
.hrow.now .dot { background: var(--rose-glow); box-shadow: 0 0 10px var(--rose-glow); animation: breathe 1.6s ease-in-out infinite; }
.hrow.now .tag { background: var(--rose-glow); color: #2a0718; }
.hrow.none { justify-content: center; border-color: var(--lilac); background: rgba(160, 134, 233, .08); }
.hrow.none .dot { background: var(--lilac); }
.hrow.works { border-color: var(--works); background: rgba(255, 201, 77, .07); }
.hrow.works .dot { background: var(--works); }
.hrow.works .dur { color: var(--works); }
.hrow.works.now { border-color: var(--works); background: rgba(255, 201, 77, .14); box-shadow: 0 0 18px rgba(255, 201, 77, .3); }
.hrow.works.now .dot { background: var(--works); box-shadow: 0 0 10px var(--works); }
.hrow.works.now .tag { background: var(--works); color: #2a1a00; }

.view-switch { display: block; margin: 14px auto 0; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text-dim); background: rgba(255, 255, 255, .05); border: 1px solid var(--stroke-soft); }

/* --- week heatmap -------------------------------------------------------------------------- */

.heat { display: grid; gap: 6px; }
.heat-row { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 8px; padding: 4px; margin: 0 -4px; border-radius: 12px; transition: background .2s; }
.heat-row:active { background: rgba(255, 255, 255, .06); }
/* text-align: rows are buttons (centred by the browser), «завтра — ще не опубліковано» is a div */
.heat-row .d { font-size: 12.5px; font-weight: 700; line-height: 1.15; text-align: center; }
.heat-row .d small { display: block; color: var(--text-dim); font-weight: 600; }
.heat-row.today .d { color: var(--lilac); }
.heat-row.past { opacity: .62; }
.cells { position: relative; display: grid; grid-template-columns: repeat(48, 1fr); gap: 1.5px; height: 26px; }
.cells i { border-radius: 3px; background: rgba(160, 134, 233, .16); }
.cells i.off { background: linear-gradient(180deg, var(--rose-glow), var(--rose)); box-shadow: 0 0 6px rgba(224, 122, 154, .35); }
.cells i.works { background: var(--works); box-shadow: 0 0 6px rgba(255, 201, 77, .4); }
.cells.missing { border: 1.5px dashed var(--stroke); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 11.5px; color: var(--text-dim); }
.cells .now-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 2px; background: var(--text); box-shadow: 0 0 8px #fff; }
.hours { display: grid; grid-template-columns: 62px 1fr; gap: 8px; font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.hours div { display: flex; justify-content: space-between; }

/* --- all queues: «time machine» ------------------------------------------------------------ */

.queues { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qcard { padding: 12px 12px 10px; border-radius: 20px; transition: box-shadow .35s, transform .35s var(--spring); }
.qcard h3 { margin: 0 0 8px; font-size: 16px; font-weight: 800; text-align: center; }
.qsub { margin-top: 8px; }
.qsub .lbl { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--text-dim); margin-bottom: 4px; }
.qsub .lbl .st { color: var(--text); }
.qsub.dark .lbl .st { color: var(--rose-glow); }
.qsub.mine .lbl span:first-child { color: var(--lilac); }
.strip { position: relative; height: 10px; border-radius: 6px; background: rgba(160, 134, 233, .16); overflow: hidden; }
.strip i { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: var(--rose-glow); }
.strip .cursor { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #fff; box-shadow: 0 0 6px #fff; border-radius: 1px; }
.qcard.dark { box-shadow: inset 0 0 0 1.5px rgba(224, 122, 154, .7), 0 0 24px rgba(224, 122, 154, .28); }
.qcard.half { box-shadow: inset 0 0 0 1.5px rgba(224, 122, 154, .35); }

.machine { position: sticky; bottom: calc(var(--safe-bottom) + 92px); z-index: 3; margin-top: 14px; padding: 12px 16px 14px; }
.machine .time { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; margin: 4px 0 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 6px; background: linear-gradient(90deg, var(--logo-blue), var(--lilac), var(--logo-crimson)); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 6px; background: linear-gradient(90deg, var(--logo-blue), var(--lilac), var(--logo-crimson)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e6dcff 45%, #a086e9); box-shadow: 0 0 0 4px rgba(255, 255, 255, .15), 0 4px 14px rgba(0, 0, 0, .45); }
input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e6dcff 45%, #a086e9); }

/* --- addresses ------------------------------------------------------------------------------ */

.addr { padding: 16px; margin-bottom: 12px; }
.addr .title { font-size: 17px; font-weight: 800; }
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; background: rgba(160, 134, 233, .2); border: 1px solid var(--lilac); white-space: nowrap; }
.badge.free { border-color: rgba(255, 250, 254, .5); background: rgba(255, 250, 254, .08); }
.addr-actions { display: flex; gap: 8px; margin-top: 12px; }
.icon-btn { flex: 1; white-space: nowrap; padding: 9px 10px; border-radius: 14px; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .06); border: 1px solid var(--stroke-soft); transition: transform .3s var(--spring); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.danger { flex: 0 0 48px; color: var(--rose-glow); }

/* --- settings: drop toggles ------------------------------------------------------------------ */

.setting { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid rgba(144, 135, 200, .14); }
.setting:last-child, .setting:has(+ [hidden]) { border-bottom: 0; }
/* «🎲 Випадкові графіки»: what to invent, indented under the main switch */
.demo-parts { padding-left: 38px; }
.setting.sub { padding: 10px 0; }
.setting.sub .ico { font-size: 17px; }
.setting .ico { font-size: 20px; width: 26px; text-align: center; }
.setting .txt { flex: 1; min-width: 0; }
.setting .txt b { display: block; font-weight: 700; }
.setting .txt small { color: var(--text-dim); font-size: 12.5px; }
.setting.stack { flex-wrap: wrap; }
.setting.stack .segmented { flex-basis: 100%; margin-left: 38px; }

.toggle { position: relative; flex: none; width: 54px; height: 32px; border-radius: 999px; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px var(--stroke-soft); transition: background .35s; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: radial-gradient(circle at 35% 30%, #fff, #d8ccf5 60%, #b4a3e6); box-shadow: 0 3px 8px rgba(0, 0, 0, .35); transition: transform .45s var(--spring), width .2s var(--ease); }
.toggle:active i { width: 34px; }
.toggle.on { background: linear-gradient(135deg, var(--lilac), #6b3fd6); }
.toggle.on i { transform: translateX(22px); }
.toggle.on:active i { transform: translateX(14px); }

/* --- sheet (add address, day ring) ------------------------------------------------------------ */

.sheet-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(10, 0, 20, .55); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 88vh; overflow-y: auto;
  padding: 10px 18px calc(var(--safe-bottom) + 22px); border-radius: 30px 30px 0 0;
  background: linear-gradient(160deg, rgba(61, 17, 78, .92), rgba(32, 6, 51, .96));
  animation: sheet-in .45s var(--spring);
}
@keyframes sheet-in { from { transform: translateY(100%); } }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .25); margin: 0 auto 14px; }
.sheet { overscroll-behavior: contain; }
/* the glass rim and highlight are absolute layers: in a sheet that scrolls they scrolled with the text and
   drew a line across a long list (testers 02.10.2026). The sheet keeps a rim of its own on the top edge. */
.sheet.glass::before, .sheet.glass::after { display: none; }
.sheet.glass { border-top: 1px solid rgba(255, 255, 255, .22); }
.day-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 6px; margin-bottom: 12px; }
.day-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--stroke); background: rgba(255, 255, 255, .06); color: inherit; font-size: 26px; line-height: 1; font-weight: 700; }
.day-arrow:disabled { opacity: .25; }
.steps { display: flex; gap: 6px; margin-bottom: 14px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .12); transition: background .3s; }
.steps i.done { background: var(--lilac); }

.field { position: relative; margin: 6px 0 10px; }
.field input { width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--stroke); background: rgba(0, 0, 0, .25); outline: none; font-size: 16px; font-weight: 600; transition: border-color .2s, box-shadow .2s; }
.field input:focus { border-color: var(--lilac); box-shadow: 0 0 0 4px rgba(160, 134, 233, .18); }
.field textarea { width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--stroke); background: rgba(0, 0, 0, .25); outline: none; font: inherit; font-size: 16px; font-weight: 600; color: inherit; resize: vertical; min-height: 120px; transition: border-color .2s, box-shadow .2s; }
.field textarea:focus { border-color: var(--lilac); box-shadow: 0 0 0 4px rgba(160, 134, 233, .18); }
.list { display: grid; gap: 6px; margin: 4px 0 10px; }
.list button { text-align: left; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(144, 135, 200, .14); font-weight: 600; transition: background .2s, transform .3s var(--spring); }
.list button:active { transform: scale(.98); background: rgba(160, 134, 233, .18); }
.list button small { display: block; color: var(--text-dim); font-size: 12px; font-weight: 500; }
.result { padding: 16px; border-radius: 20px; text-align: center; margin: 8px 0 12px; background: var(--card); border: 1px solid var(--stroke); }
.result .big { font-size: 26px; font-weight: 800; margin: 2px 0; }
.houses { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.houses button { padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .07); font-weight: 700; font-size: 13px; }

/* --- tab bar with a drop that flows between icons --------------------------------------------- */

/* the round «write to admins» button above the tab bar, on the right */
.support-fab {
  position: fixed; right: max(16px, calc((100vw - 520px) / 2 + 4px)); bottom: calc(var(--safe-bottom) + 92px); z-index: 11;
  width: 58px; height: 58px; padding: 0; border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(160, 134, 233, .7); box-shadow: 0 8px 22px rgba(10, 0, 20, .5), 0 0 18px rgba(160, 134, 233, .35);
  transition: transform .35s var(--spring); animation: fab-in .5s var(--spring);
}
.support-fab img { display: block; width: 100%; height: 100%; object-fit: cover; }
.support-fab:active { transform: scale(.9); }
@keyframes fab-in { from { transform: scale(0); } }

.tabs {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--safe-bottom) + 12px); z-index: 10;
  max-width: 520px; margin: 0 auto; display: flex; padding: 6px; border-radius: 28px;
}
.tab { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; border-radius: 22px; color: var(--text-dim); font-size: 10.5px; font-weight: 700; transition: color .3s; }
.tab svg { width: 24px; height: 24px; transition: transform .45s var(--spring); }
.tab.on { color: var(--text); }
.tab.on svg { transform: translateY(-1px) scale(1.1); }
.tab-drop { position: absolute; top: 6px; bottom: 6px; left: 6px; border-radius: 22px; background: linear-gradient(135deg, rgba(160, 134, 233, .38), rgba(112, 0, 76, .35)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 0 rgba(0, 0, 0, .2), 0 6px 18px rgba(60, 0, 116, .45); transition: transform .55s var(--spring), width .55s var(--spring); }
.tab-drop.stretch { animation: stretch .55s var(--ease); }
@keyframes stretch { 40% { border-radius: 18px 28px 28px 18px; filter: brightness(1.2); } }

/* --- skeleton, toast, empty ----------------------------------------------------------------------- */

.skeleton { border-radius: var(--radius); background: linear-gradient(100deg, rgba(255, 255, 255, .04) 30%, rgba(255, 255, 255, .11) 50%, rgba(255, 255, 255, .04) 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; margin-bottom: 14px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.toast { position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 100px); z-index: 30; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 14px; background: rgba(22, 3, 38, .92); border: 1px solid var(--stroke); font-weight: 700; font-size: 14px; transition: opacity .25s, transform .35s var(--spring); max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.empty { text-align: center; padding: 28px 18px; }
.empty .big-ico { font-size: 46px; margin-bottom: 6px; filter: drop-shadow(0 0 18px rgba(160, 134, 233, .6)); }

.footer { text-align: center; color: var(--text-dim); font-size: 12px; margin: 20px 0 6px; }
.footer a, .link { color: var(--lilac); text-decoration: none; font-weight: 700; }
.about p { margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.45; }
.about p + p { margin-top: 8px; }
.partners { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.partner { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border-radius: 16px;
  color: var(--text); text-decoration: none; transition: transform .25s var(--spring); }
.partner img { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px var(--stroke-soft); }
.partner-text { display: flex; flex-direction: column; min-width: 0; }
.partner-text b { font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; }
.partner-text small { color: var(--text-dim); font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
.partner:active { transform: scale(.97); }
.phones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 14px; }
.phone { padding: 10px 8px; border-radius: 12px; text-align: center; font-weight: 700; font-size: 14px; white-space: nowrap;
  color: var(--text); text-decoration: none; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--stroke-soft); }
.phone:active { transform: scale(.97); }
/* the support button floats over the bottom of the page: keep the last lines clear of it */
body.has-fab main { padding-bottom: calc(var(--safe-bottom) + 170px); }

/* --- «❓ Питання й відповіді» ------------------------------------------------------------- */

.faq { display: grid; gap: 8px; }
.faq details { border-radius: 16px; border: 1px solid var(--stroke-soft); background: rgba(255, 255, 255, .04); }
.faq summary { list-style: none; cursor: pointer; padding: 13px 40px 13px 14px; position: relative; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--lilac); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details[open] { border-color: var(--lilac); background: rgba(160, 134, 233, .08); }
/* justified (helpers 02.10.2026); <html lang="uk"> gives the hyphenation that keeps the gaps even */
.faq details p { margin: 0 14px 12px; color: var(--text-dim); font-size: 14px; line-height: 1.45; text-align: justify; -webkit-hyphens: auto; hyphens: auto; }

/* --- the tour: a lit hole over the element and a card with a word on it ------------------- */

.tour { position: fixed; inset: 0; z-index: 60; }
.tour-hole {
  position: fixed; border-radius: 18px; pointer-events: none;
  border: 2px solid var(--lilac); box-shadow: 0 0 0 9999px rgba(12, 2, 22, .74), 0 0 24px rgba(160, 134, 233, .6);
  transition: left .35s var(--ease), top .35s var(--ease), width .35s var(--ease), height .35s var(--ease);
}
.tour-card { position: fixed; left: 16px; right: 16px; max-width: 420px; margin: 0 auto; padding: 16px; border-radius: 20px; transition: top .35s var(--ease); }
.tour-card b { display: block; font-size: 17px; font-weight: 800; margin: 2px 0 6px; }
.tour-card p { margin: 0 0 14px; color: var(--text-dim); font-size: 14px; line-height: 1.45; }
.tour-count { font-size: 12px; font-weight: 700; color: var(--lilac); }
.tour-btns { display: flex; gap: 10px; }
.tour-btns .btn { flex: 1; }
@media (prefers-reduced-motion: reduce) { .tour-hole, .tour-card { transition: none; } }
