/* Монитор принтеров. Без CSS-переменных и grid — для старого Safari (iPad). */
* { -webkit-box-sizing: border-box; box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background-color: #070a10;
  background-image:
    radial-gradient(ellipse at 8% -10%, rgba(64, 120, 255, .22) 0%, rgba(64, 120, 255, 0) 45%),
    radial-gradient(ellipse at 95% 0%, rgba(140, 80, 255, .14) 0%, rgba(140, 80, 255, 0) 40%),
    radial-gradient(ellipse at 50% 120%, rgba(30, 200, 160, .08) 0%, rgba(30, 200, 160, 0) 50%);
  background-attachment: fixed;
  color: #e9eef6;
  font-family: -apple-system, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px; line-height: 1.3;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  padding: 0 0 24px;
}
.hidden { display: none !important; }
.mono, .clock, .t-val, .ring-num, .big, .temps, .chip-time {
  font-variant-numeric: tabular-nums;
  -webkit-font-feature-settings: "tnum"; font-feature-settings: "tnum";
}

/* ---------- полосы тревоги ---------- */
.nolink {
  background: -webkit-linear-gradient(left, #b3121f, #ff3b47, #b3121f);
  background: linear-gradient(90deg, #b3121f, #ff3b47, #b3121f);
  color: #fff; text-align: center; letter-spacing: .08em;
  font-size: 28px; font-weight: 800; padding: 14px;
  -webkit-animation: blink 1s infinite; animation: blink 1s infinite;
}
.svc {
  background: -webkit-linear-gradient(left, #5a3d00, #8a5d00, #5a3d00);
  background: linear-gradient(90deg, #5a3d00, #8a5d00, #5a3d00);
  color: #fff; text-align: center; font-size: 20px; padding: 12px 16px; font-weight: 600;
}

/* ---------- шапка: часы + сводка ---------- */
.hero {
  display: -webkit-box; display: -webkit-flex; display: flex;
  -webkit-box-align: stretch; -webkit-align-items: stretch; align-items: stretch;
  padding: 18px 18px 6px;
}
.clockbox, .tile, .timeline, .in {
  background: -webkit-linear-gradient(top, rgba(255,255,255,.075), rgba(255,255,255,.025));
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 22px;
  -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 18px 40px -18px rgba(0,0,0,.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 18px 40px -18px rgba(0,0,0,.8);
}
.clockbox {
  padding: 14px 30px 18px; margin-right: 16px; position: relative; overflow: hidden;
  display: -webkit-box; display: -webkit-flex; display: flex;
  -webkit-box-orient: vertical; -webkit-flex-direction: column; flex-direction: column;
  -webkit-box-pack: center; -webkit-justify-content: center; justify-content: center;
  min-width: 400px;
}
.clockbox:before {
  content: ""; position: absolute; left: -40%; top: -60%; width: 120%; height: 120%;
  background: radial-gradient(circle closest-side, rgba(90,150,255,.22) 0%, rgba(90,150,255,0) 100%);
  pointer-events: none;
}
.clock {
  position: relative; white-space: nowrap;
  font-size: 128px; font-weight: 200; letter-spacing: -.03em; line-height: 1;
  color: #fff;
  text-shadow: 0 0 40px rgba(120,170,255,.35), 0 2px 0 rgba(0,0,0,.4);
}
.clock .ss {
  font-size: 52px; font-weight: 300; margin-left: 10px; letter-spacing: 0;
  color: #8fb8ff; vertical-align: 52px; display: inline-block; min-width: 1.25em;
}
.secbar {
  position: relative; height: 4px; border-radius: 2px; margin: 14px 0 12px;
  background: rgba(255,255,255,.08); overflow: hidden;
}
.secbar i {
  display: block; height: 100%; width: 0; border-radius: 2px;
  background: -webkit-linear-gradient(left, #3d6bff, #7cc4ff);
  background: linear-gradient(90deg, #3d6bff, #7cc4ff);
  -webkit-box-shadow: 0 0 12px rgba(124,196,255,.8); box-shadow: 0 0 12px rgba(124,196,255,.8);
}
.date { position: relative; font-size: 22px; color: #aebbd0; font-weight: 500; letter-spacing: .01em; }
.date b { color: #fff; font-weight: 600; }

.info {
  -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; min-width: 0;
  display: -webkit-box; display: -webkit-flex; display: flex;
  -webkit-box-orient: vertical; -webkit-flex-direction: column; flex-direction: column;
}
.tiles { display: -webkit-box; display: -webkit-flex; display: flex; margin-bottom: 12px; }
.tile {
  -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; min-width: 0;
  padding: 14px 18px 14px; margin-right: 12px; position: relative; overflow: hidden;
}
.tile:last-child { margin-right: 0; }
.tile:after {
  content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 2px; border-radius: 0 0 2px 2px;
}
.t-next:after { background: -webkit-linear-gradient(left, #3d6bff, #7cc4ff); background: linear-gradient(90deg, #3d6bff, #7cc4ff); }
.t-all:after { background: -webkit-linear-gradient(left, #8b5cff, #d08bff); background: linear-gradient(90deg, #8b5cff, #d08bff); }
.t-ready:after { background: -webkit-linear-gradient(left, #16b866, #8ff5b6); background: linear-gradient(90deg, #16b866, #8ff5b6); }
.t-label {
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7f8ca3;
}
.t-val { font-size: 44px; font-weight: 700; line-height: 1.1; margin: 6px 0 4px; color: #fff; white-space: nowrap; }
.t-val small { font-size: 22px; font-weight: 600; color: #aebbd0; margin-left: 2px; }
.t-next .t-val { color: #a9d3ff; text-shadow: 0 0 24px rgba(124,196,255,.35); }
.t-all .t-val { color: #e0c4ff; text-shadow: 0 0 24px rgba(208,139,255,.3); }
.t-ready .t-val { color: #9af0bd; text-shadow: 0 0 24px rgba(60,220,130,.3); }
.t-ready.hot { border-color: rgba(60,220,130,.55); -webkit-animation: readyglow 2.4s infinite; animation: readyglow 2.4s infinite; }
.t-sub { font-size: 17px; color: #aebbd0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-sub b { color: #fff; }
.chips { white-space: normal; max-height: 56px; overflow: hidden; }
.chip {
  display: inline-block; font-size: 14px; font-weight: 700; padding: 3px 9px; margin: 2px 4px 2px 0;
  border-radius: 999px; background: rgba(60,220,130,.16); color: #b6f7d0;
  border: 1px solid rgba(60,220,130,.35);
}

/* шкала «когда освободятся» */
.timeline { padding: 12px 18px 12px; -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; }
.tl-head {
  display: -webkit-box; display: -webkit-flex; display: flex;
  -webkit-box-pack: justify; -webkit-justify-content: space-between; justify-content: space-between;
  -webkit-box-align: center; -webkit-align-items: center; align-items: center;
}
.counts span { margin-left: 14px; font-size: 14px; color: #8d99ad; font-weight: 600; white-space: nowrap; }
.counts b { font-size: 16px; color: #fff; margin-right: 3px; }
.counts i { display: inline-block; width: 8px; height: 8px; border-radius: 4px; margin-right: 6px; vertical-align: 1px; }
.tl { position: relative; height: 70px; margin: 6px 6px 0; }
.tl-axis {
  position: absolute; left: 0; right: 0; top: 34px; height: 4px; border-radius: 2px;
  background: -webkit-linear-gradient(left, rgba(124,196,255,.55), rgba(139,92,255,.35), rgba(255,255,255,.06));
  background: linear-gradient(90deg, rgba(124,196,255,.55), rgba(139,92,255,.35), rgba(255,255,255,.06));
}
.tl-tick { position: absolute; top: 30px; width: 1px; height: 12px; background: rgba(255,255,255,.22); }
.tl-tick span { position: absolute; top: 16px; left: -30px; width: 60px; text-align: center; font-size: 12px; color: #6f7c92; font-weight: 600; }
.tl-now { position: absolute; left: 0; top: 26px; width: 3px; height: 20px; border-radius: 2px; background: #fff; -webkit-box-shadow: 0 0 10px #7cc4ff; box-shadow: 0 0 10px #7cc4ff; }
.tl-mk { position: absolute; top: 0; width: 0; }
.tl-mk .lab {
  position: absolute; bottom: 0; left: -70px; width: 140px; text-align: center; top: 0; height: 24px;
}
.tl-mk .lab span {
  display: inline-block; font-size: 13px; font-weight: 700; color: #dce8ff; white-space: nowrap;
  background: rgba(61,107,255,.25); border: 1px solid rgba(124,196,255,.45); border-radius: 8px; padding: 2px 7px;
}
.tl-mk .pin {
  position: absolute; left: -7px; top: 29px; width: 14px; height: 14px; border-radius: 7px;
  background: #7cc4ff; border: 3px solid #0c1220;
  -webkit-box-shadow: 0 0 0 2px rgba(124,196,255,.5), 0 0 14px rgba(124,196,255,.9);
  box-shadow: 0 0 0 2px rgba(124,196,255,.5), 0 0 14px rgba(124,196,255,.9);
}
.tl-mk.soon .lab span { background: rgba(255,176,46,.22); border-color: rgba(255,200,90,.6); color: #ffe2a8; }
.tl-mk.soon .pin { background: #ffc35a; -webkit-box-shadow: 0 0 0 2px rgba(255,195,90,.5), 0 0 14px rgba(255,195,90,.9); box-shadow: 0 0 0 2px rgba(255,195,90,.5), 0 0 14px rgba(255,195,90,.9); }
.tl-empty { position: absolute; left: 0; right: 0; top: 22px; text-align: center; color: #6f7c92; font-size: 16px; }

/* ---------- карточки ---------- */
.grid {
  display: -webkit-box; display: -webkit-flex; display: flex;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
  padding: 6px 12px;
}
.empty { padding: 40px; font-size: 24px; color: #8a929c; width: 100%; text-align: center; }
.card { width: 100%; padding: 6px; }
@media (min-width: 600px) { body.nofit .card { width: 50%; } }
@media (min-width: 900px) { body.nofit .card { width: 33.333%; } }

.in {
  height: 100%; min-height: 220px; position: relative; overflow: hidden;
  padding: 16px 16px 14px; border-radius: 20px;
}
/* цветная полоса-акцент сверху и свечение */
.in:before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: rgba(255,255,255,.12);
}
.in:after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 90px;
  background: radial-gradient(circle, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}
.head { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center; position: relative; z-index: 1; }
.name { -webkit-box-flex: 0; -webkit-flex: 0 1 auto; flex: 0 1 auto; min-width: 0; font-size: 28px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; }
.model, .spd { -webkit-flex-shrink: 0; flex-shrink: 0; }
.model {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: #9aa7bc;
  border: 1px solid rgba(255,255,255,.14); border-radius: 6px; padding: 2px 6px; margin-left: 8px;
}
.spd {
  display: inline-block; font-size: 15px; font-weight: 800; letter-spacing: .01em; margin-left: 8px;
  padding: 3px 8px 3px 6px; border-radius: 8px; white-space: nowrap;
  color: #dfe6f1; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
}
.spd b { font-weight: 400; margin-right: 3px; opacity: .8; }
.spd.s1 { color: #a8f0ea; background: rgba(40,190,180,.16); border-color: rgba(80,220,210,.45); }
.spd.s3 { color: #ffd9a3; background: rgba(255,150,30,.2); border-color: rgba(255,176,46,.6); }
.spd.s4 {
  color: #fff; border-color: rgba(255,120,190,.8);
  background: -webkit-linear-gradient(left, #d4145a, #fb5e3c); background: linear-gradient(90deg, #d4145a, #fb5e3c);
  -webkit-box-shadow: 0 0 14px rgba(255,70,120,.55); box-shadow: 0 0 14px rgba(255,70,120,.55);
}
.badge {
  font-size: 14px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 11px 6px 9px; border-radius: 999px; white-space: nowrap; margin-left: 8px;
  background: rgba(255,255,255,.08); color: #c9d3e3; border: 1px solid rgba(255,255,255,.12);
}
.badge i { display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: #9aa7bc; margin-right: 7px; vertical-align: 1px; }

.body { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center; margin: 14px 0 10px; position: relative; z-index: 1; }
.ring { position: relative; width: 96px; height: 96px; -webkit-flex-shrink: 0; flex-shrink: 0; margin-right: 16px; }
.ring svg { width: 96px; height: 96px; -webkit-transform: rotate(-90deg); transform: rotate(-90deg); }
.ring .trk { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 9; }
.ring .val { fill: none; stroke-width: 9; stroke-linecap: round; -webkit-transition: stroke-dashoffset .8s; transition: stroke-dashoffset .8s; }
.ring-num { position: absolute; left: 0; right: 0; top: 30px; text-align: center; font-size: 28px; font-weight: 800; color: #fff; }
.ring-num small { font-size: 14px; font-weight: 700; color: #9aa7bc; }
.stat { min-width: 0; -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; }
.big { font-size: 30px; font-weight: 800; line-height: 1.1; color: #fff; white-space: nowrap; }
.big small { font-size: 18px; color: #aebbd0; font-weight: 700; }
.sub { font-size: 16px; color: #9aa7bc; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub b { color: #e9eef6; }
.layers { height: 4px; border-radius: 2px; background: rgba(255,255,255,.08); margin-top: 8px; overflow: hidden; }
.layers i { display: block; height: 100%; background: rgba(255,255,255,.35); border-radius: 2px; }

.file {
  position: relative; z-index: 1;
  font-size: 15px; color: #c3cddd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 7px 10px; border-radius: 10px; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.05);
}
.file b { color: #6f7c92; font-weight: 700; margin-right: 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.meta { position: relative; z-index: 1; margin-top: 6px; }
.pill {
  display: inline-block; font-size: 15px; font-weight: 600; color: #d6deea; white-space: nowrap;
  padding: 4px 10px; margin: 4px 6px 0 0; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
}
.pill em { font-style: normal; color: #7f8ca3; font-weight: 600; margin-right: 4px; }
.pill em.tgt { margin: 0 0 0 3px; }
body.fit .meta { white-space: nowrap; overflow: hidden; }
body.fit .pill { padding: 4px 8px; margin-right: 4px; }
body.fit .badge { padding: 5px 9px 5px 8px; font-size: 13px; letter-spacing: .02em; }
body.fit .name { font-size: 26px; letter-spacing: -.02em; }
body.fit .warn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill .sw {
  display: inline-block; width: 12px; height: 12px; border-radius: 6px; margin-right: 6px; vertical-align: -1px;
  border: 1px solid rgba(255,255,255,.35); -webkit-box-shadow: 0 0 8px rgba(255,255,255,.15); box-shadow: 0 0 8px rgba(255,255,255,.15);
}
.hot-t { color: #ffb36b; }
.msg { position: relative; z-index: 1; font-size: 22px; font-weight: 700; margin: 18px 0 10px; color: #fff; }
.msg small { display: block; font-size: 15px; font-weight: 500; color: #9aa7bc; margin-top: 4px; }
.err {
  position: relative; z-index: 1; font-size: 18px; font-weight: 800; color: #fff; margin: 12px 0 4px;
  padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,120,120,.4);
  word-wrap: break-word; overflow-wrap: break-word;
}
.err small { display: block; font-size: 13px; font-weight: 500; color: #ffc9c9; margin-top: 2px; }
.warn { position: relative; z-index: 1; font-size: 14px; color: #ffd27a; margin-top: 8px; }
.upd { position: relative; z-index: 1; font-size: 13px; color: #6d7580; margin-top: 6px; }

/* ---------- состояния ---------- */
.st-printing .in:before, .st-prepare .in:before { background: -webkit-linear-gradient(left, #3d6bff, #7cc4ff); background: linear-gradient(90deg, #3d6bff, #7cc4ff); -webkit-box-shadow: 0 0 18px rgba(124,196,255,.9); box-shadow: 0 0 18px rgba(124,196,255,.9); }
.st-printing .in:after, .st-prepare .in:after { background: radial-gradient(circle, rgba(80,140,255,.18) 0%, rgba(80,140,255,0) 70%); }
.st-printing .badge, .st-prepare .badge { background: rgba(61,107,255,.2); color: #bcd9ff; border-color: rgba(124,196,255,.4); }
.st-printing .badge i, .st-prepare .badge i { background: #7cc4ff; -webkit-box-shadow: 0 0 8px #7cc4ff; box-shadow: 0 0 8px #7cc4ff; -webkit-animation: pulse 1.6s infinite; animation: pulse 1.6s infinite; }

.st-finish .in { border-color: rgba(60,220,130,.45); background: -webkit-linear-gradient(top, rgba(40,200,110,.22), rgba(40,200,110,.06)); background: linear-gradient(180deg, rgba(40,200,110,.22), rgba(40,200,110,.06)); }
.st-finish .in:before { background: -webkit-linear-gradient(left, #16b866, #8ff5b6); background: linear-gradient(90deg, #16b866, #8ff5b6); -webkit-box-shadow: 0 0 18px rgba(60,220,130,.9); box-shadow: 0 0 18px rgba(60,220,130,.9); }
.st-finish .in:after { background: radial-gradient(circle, rgba(60,220,130,.25) 0%, rgba(60,220,130,0) 70%); }
.st-finish .badge { background: #2fd07a; color: #032713; border-color: #6ff0a8; }
.st-finish .badge i { background: #032713; }

.st-pause .in { border-color: rgba(255,176,46,.55); background: -webkit-linear-gradient(top, rgba(255,170,30,.2), rgba(255,170,30,.05)); background: linear-gradient(180deg, rgba(255,170,30,.2), rgba(255,170,30,.05)); }
.st-pause .in:before { background: #ffb02e; -webkit-box-shadow: 0 0 18px rgba(255,176,46,.9); box-shadow: 0 0 18px rgba(255,176,46,.9); }
.st-pause .badge { background: #ffb02e; color: #2b1a00; border-color: #ffd27a; }
.st-pause .badge i { background: #2b1a00; }

.st-error .in { border-color: #ff4d57; background: #4a0d12; -webkit-animation: flash 1.2s infinite; animation: flash 1.2s infinite; }
.st-error .in:before { background: #ff4d57; -webkit-box-shadow: 0 0 22px #ff4d57; box-shadow: 0 0 22px #ff4d57; }
.st-error .badge { background: #ff4d57; color: #fff; border-color: #ff9aa0; }
.st-error .badge i { background: #fff; }

.st-idle .badge i, .st-cancel .badge i { background: #c9d3e3; }
.st-offline .in { opacity: .55; }
.st-offline .badge i { background: #5c6575; }

@-webkit-keyframes flash { 0%, 100% { background-color: #4a0d12; } 50% { background-color: #a3161f; } }
@keyframes flash { 0%, 100% { background-color: #4a0d12; } 50% { background-color: #a3161f; } }
@-webkit-keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@-webkit-keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@-webkit-keyframes readyglow { 0%, 100% { -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 rgba(60,220,130,0); } 50% { -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 28px rgba(60,220,130,.35); } }
@keyframes readyglow { 0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 rgba(60,220,130,0); } 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 28px rgba(60,220,130,.35); } }

.wake {
  position: fixed; left: 50%; bottom: 14px; width: 320px; margin-left: -160px;
  background: #1a2130; color: #e8ebef; text-align: center; padding: 12px; border-radius: 14px;
  font-size: 16px; border: 1px solid rgba(255,255,255,.15);
}

/* ---------- режим «всё на одном экране» ----------
   Страница рисуется в «дизайнерских» пикселях и целиком масштабируется под окно (app.js → fit). */
body.fit { overflow: hidden; height: 100%; padding: 0; }
body.fit #app {
  position: absolute; left: 0; top: 0; overflow: hidden;
  -webkit-transform-origin: 0 0; transform-origin: 0 0;
}
body.fit .hero { height: 290px; padding: 18px 18px 6px; }
body.fit .grid { padding: 0 12px 12px; -webkit-align-content: flex-start; align-content: flex-start; }
body.fit .in { min-height: 0; }
body.fit .tiles { margin-bottom: 10px; }
body.fit .tile { padding: 12px 16px; }
body.fit .t-val { font-size: 40px; margin: 4px 0 2px; }
body.fit .chips { max-height: 50px; }
body.fit .chip { font-size: 13px; padding: 2px 8px; }
body.fit .timeline { padding: 10px 16px 8px; overflow: hidden; }
body.fit .tl { height: 64px; }

/* полосы тревоги и уведомления — поверх страницы */
.nolink, .svc { position: fixed; left: 0; right: 0; top: 0; z-index: 50; }
.svc { top: auto; bottom: 0; }

/* ---------- звук ---------- */
.sound { position: relative; margin-top: 12px; white-space: nowrap; }
.bell, .sndtest {
  -webkit-appearance: none; appearance: none; font: inherit; cursor: pointer;
  font-size: 15px; font-weight: 700; color: #cfe0ff;
  padding: 6px 12px; border-radius: 999px; margin-right: 6px;
  background: rgba(124,196,255,.12); border: 1px solid rgba(124,196,255,.35);
}
.sndtest { color: #9aa7bc; background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
.bell.off { color: #8d99ad; background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
.bell.locked {
  color: #2b1a00; background: #ffc35a; border-color: #ffe08a;
  -webkit-animation: blink 1.4s infinite; animation: blink 1.4s infinite;
}

.toasts { position: fixed; left: 50%; top: 14px; width: 640px; margin-left: -320px; z-index: 60; pointer-events: none; }
.toast {
  margin-bottom: 10px; padding: 14px 20px; border-radius: 18px; font-size: 22px; font-weight: 800; color: #fff;
  background: rgba(16,22,36,.94); border: 1px solid rgba(255,255,255,.18);
  -webkit-box-shadow: 0 20px 50px rgba(0,0,0,.6); box-shadow: 0 20px 50px rgba(0,0,0,.6);
  -webkit-animation: toastin .35s ease-out; animation: toastin .35s ease-out;
}
.toast small { display: block; font-size: 15px; font-weight: 500; color: #c3cddd; margin-top: 2px; }
.toast.k-finish { border-color: #2fd07a; background: rgba(10,60,34,.95); }
.toast.k-error, .toast.k-filament { border-color: #ff4d57; background: rgba(90,14,20,.96); }
.toast.k-pause, .toast.k-cancel { border-color: #ffb02e; background: rgba(80,52,6,.96); }
.toast.k-start { border-color: #7cc4ff; background: rgba(14,36,80,.95); }
@-webkit-keyframes toastin { from { opacity: 0; -webkit-transform: translateY(-20px); } to { opacity: 1; -webkit-transform: none; } }
@keyframes toastin { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: none; } }

/* ---------- узкие экраны (телефон): обычная прокрутка ---------- */
@media (max-width: 860px) {
  body.nofit .hero { display: block; padding: 12px 12px 4px; }
  body.nofit .clockbox { margin: 0 0 12px; text-align: center; min-width: 0; }
  body.nofit .clock { font-size: 96px; }
}
@media (max-width: 700px) {
  body.nofit .clock { font-size: 76px; }
  body.nofit .clock .ss { font-size: 30px; vertical-align: 30px; }
  body.nofit .date { font-size: 17px; }
  body.nofit .tiles { display: block; }
  body.nofit .tile { margin: 0 0 10px; }
  body.nofit .t-val { font-size: 32px; }
  body.nofit .counts { display: none; }
  body.nofit .grid { padding: 4px 6px; }
  body.nofit .sound { white-space: normal; }
  body.nofit .bell, body.nofit .sndtest { margin-top: 6px; }
  .nolink { font-size: 22px; }
  .toasts { width: auto; left: 10px; right: 10px; margin-left: 0; }
  .toast { font-size: 18px; }
}

/* кнопка журнала и подсказка «коснитесь для звука» */
.jbtn {
  display: inline-block; text-decoration: none; font-size: 15px; font-weight: 700; color: #e0c4ff;
  padding: 6px 12px; border-radius: 999px; background: rgba(139,92,255,.16); border: 1px solid rgba(208,139,255,.4);
}
.tapall {
  position: fixed; left: 50%; top: 50%; width: 460px; margin: -70px 0 0 -230px; z-index: 80; pointer-events: none;
  text-align: center; padding: 22px 20px; border-radius: 22px; font-size: 16px; color: #3a2600;
  background: rgba(255,195,90,.96); border: 1px solid #ffe08a;
  -webkit-box-shadow: 0 24px 60px rgba(0,0,0,.6); box-shadow: 0 24px 60px rgba(0,0,0,.6);
  -webkit-animation: blink 1.6s infinite; animation: blink 1.6s infinite;
}
.tapall b { display: block; font-size: 30px; margin-bottom: 6px; color: #2b1a00; }
@media (max-width: 700px) { .tapall { width: auto; left: 16px; right: 16px; margin: -70px 0 0; } }

/* ---------- кнопка «Во весь экран» ---------- */
.fsbtn {
  -webkit-appearance: none; appearance: none; font: inherit; cursor: pointer;
  font-size: 15px; font-weight: 700; color: #bff5d6; margin-left: 6px;
  padding: 6px 12px; border-radius: 999px; background: rgba(47,208,122,.14); border: 1px solid rgba(47,208,122,.45);
}
.fshint {
  position: fixed; left: 50%; top: 50%; width: 520px; margin: -110px 0 0 -260px; z-index: 90;
  text-align: center; padding: 22px 20px; border-radius: 22px; font-size: 18px; line-height: 1.45; color: #e8ebef;
  background: rgba(16,22,36,.97); border: 1px solid rgba(124,196,255,.45);
  -webkit-box-shadow: 0 24px 60px rgba(0,0,0,.6); box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.fshint b { display: block; font-size: 26px; margin-bottom: 8px; }
.fshint u { display: inline-block; margin-top: 12px; color: #7cc4ff; cursor: pointer; }
@media (max-width: 700px) { .fshint { width: auto; left: 16px; right: 16px; margin: -110px 0 0; } body.nofit .fsbtn { margin-top: 6px; margin-left: 0; } }

/* ---------- кнопки-иконки (звук, во весь экран) ---------- */
.sndtest.ico, .fsbtn.ico { width: 34px; height: 34px; padding: 0; text-align: center; font-size: 16px; line-height: 32px; vertical-align: middle; }
.obtn { color: #ffd9a8; background: rgba(255,150,40,.14); border-color: rgba(255,170,80,.45); margin-left: 6px; }

/* ---------- плитка «Заказы» ---------- */
a.tile { text-decoration: none; color: inherit; display: block; }
.t-orders { -webkit-box-flex: 1.7; -webkit-flex: 1.7 1 0; flex: 1.7 1 0; }
.t-ready { -webkit-box-flex: 0; -webkit-flex: 0 0 172px; flex: 0 0 172px; }
.t-ready .t-label { white-space: nowrap; }
.o-mp small { font-size: 17px; font-weight: 700; color: #aebbd0; margin-left: 8px; }
.t-orders { border-color: rgba(47,191,82,.55); }
.t-orders:after { background: -webkit-linear-gradient(left, #16b866, #8ff5b6); background: linear-gradient(90deg, #16b866, #8ff5b6); }
.o-row { display: -webkit-box; display: -webkit-flex; display: flex; margin: 4px 0 2px; }
.o-mp { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; white-space: nowrap; }
.o-mp i { display: inline-block; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .05em; padding: 2px 6px; border-radius: 6px; color: #fff; vertical-align: 14px; margin-right: 6px; }
.o-mp b { font-size: 44px; font-weight: 700; line-height: 1.1; color: #fff; }
.mp-oz { background: #005bff; }
.mp-wb { background: #cb11ab; }
body.fit .o-mp b { font-size: 40px; }
@media (max-width: 700px) { body.nofit .t-orders { -webkit-flex: none; flex: none; } body.nofit .o-mp b { font-size: 32px; } }

/* ---------- узкая шапка (iPad стоя): часы меньше, плиткам больше места ---------- */
body.fit.narrow .clockbox { min-width: 0; width: 330px; -webkit-flex: 0 0 330px; flex: 0 0 330px; padding: 12px 18px 14px; margin-right: 12px; }
body.fit.narrow .clock { font-size: 92px; }
body.fit.narrow .clock .ss { font-size: 36px; vertical-align: 38px; margin-left: 6px; }
body.fit.narrow .secbar { margin: 10px 0 8px; }
body.fit.narrow .date { font-size: 18px; }
body.fit.narrow .sound { white-space: normal; margin-top: 6px; }
body.fit.narrow .sound .bell, body.fit.narrow .sound .sndtest, body.fit.narrow .sound .jbtn, body.fit.narrow .sound .fsbtn { margin: 6px 6px 0 0; }
body.fit.narrow .tile { padding: 12px 12px; margin-right: 10px; }
body.fit.narrow .tile:last-child { margin-right: 0; }
body.fit.narrow .t-label { font-size: 12px; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.fit.narrow .t-val { font-size: 34px; }
body.fit.narrow .t-sub { font-size: 15px; }
body.fit.narrow .o-mp b { font-size: 34px; }
body.fit.narrow .o-mp small { display: block; font-size: 14px; margin: 0; }
body.fit.narrow .o-row { margin: 2px 0 0; }
body.fit.narrow .t-orders .t-sub { display: none; }
body.fit.narrow .t-ready { -webkit-flex-basis: 140px; flex-basis: 140px; }
.o-w { font-size: 14px; font-weight: 600; color: #6f7c92; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.fit .o-row { margin-top: 8px; }
body.fit.narrow .o-w { font-size: 12px; }
