/* Live silkscreen. The artwork is the real sticker; this file only lights the readout. */

.controls-intro { max-width: 40rem; }
.machine {
  width: min(100%, 940px);
  margin-top: 2.75rem;
}
.face {
  position: relative;
  width: 100%;
  container-type: inline-size;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.face .art {
  display: block;
  width: 100%;
  height: auto;
}
.face:not(.powered) .art { filter: brightness(0.62); }
.face:not(.powered) .hud { opacity: 0.72; }

.hud, .keys { position: absolute; inset: 0; }
.keys { z-index: 2; pointer-events: none; }
.hud { z-index: 1; pointer-events: none; }
.hud .glyph { pointer-events: auto; }

.bars {
  position: absolute;
  left: 32.6%;
  top: 6.85%;
  width: 34.6%;
  height: 2.15%;
  display: flex;
  gap: 2.15%;
}
.bars i {
  flex: 1;
  border-radius: 99px;
  background: #17191b;
}
.face.powered:not(.busy) .bars i {
  background: #00ffff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.45);
}
.face.busy .bars i { background: rgba(0, 255, 255, 0.22); }
.face.busy .bars i.live {
  background: #00ffff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
  animation: phaseBreath 1.6s ease-in-out infinite alternate;
}
.face.busy .bars i.done {
  background: #00ffff;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
}

.display {
  position: absolute;
  left: 36.4%;
  top: 12.6%;
  width: 26.4%;
  height: 18.2%;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
}
.digit {
  position: relative;
  flex: 0 0 22%;
  height: 100%;
}
.colon {
  position: relative;
  flex: 0 0 7%;
  height: 100%;
}
.colon i {
  position: absolute;
  left: 28%;
  width: 44%;
  height: 0.813cqi;
  border-radius: 0;
  background: transparent;
}
.colon i:first-child { top: 28%; }
.colon i:last-child { bottom: 28%; }
.colon.on i { background: #fff; box-shadow: none; }
.seg {
  position: absolute;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
.seg.on {
  background: #fff;
  box-shadow: none;
}
/* Half-bar cuts use face-relative units so the chamfers stay at 45 degrees.
   Inset the strokes to preserve the sticker's slender glyphs and joint gaps. */
.seg.a, .seg.g, .seg.d {
  left: 20%;
  right: 20%;
  height: 9%;
  clip-path: polygon(0 50%, 0.3693cqi 0, calc(100% - 0.3693cqi) 0,
    100% 50%, calc(100% - 0.3693cqi) 100%, 0.3693cqi 100%);
}
.seg.a { top: 0; }
.seg.g { top: 45.5%; }
.seg.d { bottom: 0; }
.seg.b, .seg.c, .seg.e, .seg.f {
  width: 13%;
  clip-path: polygon(50% 0, 100% 0.3775cqi, 100% calc(100% - 0.3775cqi),
    50% 100%, 0 calc(100% - 0.3775cqi), 0 0.3775cqi);
}
.seg.b, .seg.c { right: 9%; }
.seg.e, .seg.f { left: 9%; }
.seg.b, .seg.f { top: 6%; height: 40%; }
.seg.c, .seg.e { bottom: 6%; height: 40%; }

.side-icons {
  position: absolute;
  left: 33.2%;
  top: 15.5%;
  width: 3.4%;
  height: 14%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.side-icon {
  width: 100%;
  height: 42%;
  opacity: 0;
  stroke: #00ffff;
  fill: none;
  stroke-width: 2.4;
}
.side-icon.on {
  opacity: 1;
  filter: drop-shadow(0 0 4px currentColor);
}
.side-icon.clock-side.on { stroke: #00ffff; color: #00ffff; }
.side-icon.nowater-side.on { stroke: #ffd24a; color: #ffd24a; }

.units {
  position: absolute;
  left: 63.6%;
  top: 16%;
  width: 5.2%;
  color: #fff;
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 650;
  font-size: 2.05cqi;
  letter-spacing: 0.06em;
  line-height: 0.95;
}
.unit { display: none; }
.unit.on { display: block; text-shadow: 0 0 8px rgba(255, 255, 255, 0.35); }
.unit.grind { font-size: 1.28cqi; letter-spacing: 0.08em; }

.glyph {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.glyph img {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}
.glyph.active img { opacity: 1; }
.glyph.locked img { opacity: 0.18; }
.face:not(.powered) .glyph img { opacity: 0.28; }
.face.custom-setting .glyph[data-cup] img,
.face.custom-setting .glyph[data-strength] img { opacity: 0.14; }
.face.gate-mode .glyph img { opacity: 0.2; }

.g-cup-1 { left: 36.56%; top: 32.69%; width: 2.65%; height: 7.54%; }
.g-cup-2 { left: 42.15%; top: 32.69%; width: 3.46%; height: 7.54%; }
.g-cup-3 { left: 47.76%; top: 32.69%; width: 4.04%; height: 7.54%; }
.g-cup-4 { left: 53.55%; top: 32.69%; width: 4.07%; height: 7.54%; }
.g-cup-5 { left: 59.57%; top: 32.69%; width: 4.04%; height: 7.54%; }
.g-strength-light { left: 32.17%; top: 40.68%; width: 7.45%; height: 7.74%; }
.g-strength-regular { left: 39.56%; top: 40.68%; width: 11.26%; height: 7.74%; }
.g-strength-bold { left: 50.76%; top: 40.68%; width: 6.46%; height: 7.74%; }
.g-strength-intense { left: 57.36%; top: 40.68%; width: 10.44%; height: 7.74%; }
.g-mode-water { left: 31.76%; top: 48.68%; width: 15.24%; height: 8.12%; }
.g-mode-auto { left: 46.74%; top: 48.68%; width: 6.66%; height: 8.12%; }
.g-mode-grind { left: 53.17%; top: 48.68%; width: 14.83%; height: 8.12%; }

.face .key {
  position: absolute;
  pointer-events: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 8px;
}
.face .key.pressing { background: rgba(255, 255, 255, 0.07); }
.face .key-start.paused { background: rgba(255, 210, 74, 0.42); }
.face .key-clean.cleaning { box-shadow: inset 0 0 0 1px rgba(255, 210, 74, 0.8); }
.key-preset { left: 2%; top: 15%; width: 16%; height: 26%; }
.key-clean { left: 83%; top: 14%; width: 15%; height: 26%; }
.key-strength { left: 12%; top: 42%; width: 16%; height: 26%; }
.key-source { left: 74%; top: 44%; width: 14%; height: 26%; }
.key-cups { left: 26%; top: 64%; width: 16%; height: 28%; }
.key-start { left: 42.5%; top: 70%; width: 15%; height: 24%; }
.key-power { left: 60%; top: 64%; width: 14%; height: 28%; }

.face .key:focus-visible,
.glyph:focus-visible,
.assist:focus-visible {
  outline: 2px solid #f3f3f1;
  outline-offset: 2px;
}

.panel-status {
  min-height: 1.5em;
  margin: 0.9rem 0 0;
  color: var(--muted, #b6b6b3);
  font-size: 0.95rem;
}
.panel-live {
  min-height: 1.4em;
  margin: 0.2rem 0 0;
  color: var(--faint, #8e8e8b);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.panel-assist {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 1rem 0 0;
  max-width: 62ch;
  color: var(--muted, #b6b6b3);
  font-size: 0.92rem;
}
.assist {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 540;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: inherit;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.38);
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}
.assist:hover { background: #f3f3f1; color: #141414; }
.face.custom-setting .assist,
.display.timer-setting,
.display.custom-setting { animation: timerBlink 0.8s steps(1, end) infinite; }
.face.custom-setting .key-preset { animation: timerBlink 0.8s steps(1, end) infinite; }

.display.chasing .seg {
  display: block !important;
  animation: displaySegChase 1.8s linear infinite both !important;
  animation-delay: 99s !important;
}
.display.chasing.chase-paused .seg { animation-play-state: paused !important; }
.display.chasing .digit:nth-child(1) .seg.a { animation-delay: 0s !important; }
.display.chasing .digit:nth-child(2) .seg.a { animation-delay: 0.15s !important; }
.display.chasing .digit:nth-child(4) .seg.a { animation-delay: 0.3s !important; }
.display.chasing .digit:nth-child(5) .seg.a { animation-delay: 0.45s !important; }
.display.chasing .digit:nth-child(5) .seg.b { animation-delay: 0.6s !important; }
.display.chasing .digit:nth-child(5) .seg.c { animation-delay: 0.75s !important; }
.display.chasing .digit:nth-child(5) .seg.d { animation-delay: 0.9s !important; }
.display.chasing .digit:nth-child(4) .seg.d { animation-delay: 1.05s !important; }
.display.chasing .digit:nth-child(2) .seg.d { animation-delay: 1.2s !important; }
.display.chasing .digit:nth-child(1) .seg.d { animation-delay: 1.35s !important; }
.display.chasing .digit:nth-child(1) .seg.e { animation-delay: 1.5s !important; }
.display.chasing .digit:nth-child(1) .seg.f { animation-delay: 1.65s !important; }
.face.powered .display:not(.timer-setting):not(.chasing):not(.custom-setting) .colon.on {
  animation: colonBlink 1s steps(1, end) infinite;
}

@keyframes displaySegChase {
  0%, 100% { opacity: 0.12; background: #252b2d; box-shadow: none; }
  1%, 7% { opacity: 1; background: #fff; box-shadow: none; }
}
@keyframes timerBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.28; }
}
@keyframes colonBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.08; }
}
@keyframes phaseBreath {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .machine { margin-top: 1.75rem; }
  .panel-assist { font-size: 0.86rem; }
}

@media (prefers-reduced-motion: reduce) {
  .display.chasing .seg,
  .face.busy .bars i.live,
  .display.timer-setting,
  .face.custom-setting .assist,
  .face.custom-setting .key-preset,
  .face.powered .display .colon.on {
    animation: none !important;
  }
}
