/* Awards "tuner": orange corner power button + Braun-style device with a 14-segment LCD */

.at-corner,
.at-device {
  --at-orange: #f97029;
  --at-orange-edge: #cf5412;
  --at-body: #eceae5;
  --at-ink: #2a2b28;
  --at-muted: #7c7b76;
  position: absolute;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.at-corner[hidden],
.at-device[hidden] { display: none; }

/* ---------- physical orange buttons ---------- */
.at-button {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--at-orange);
  --edge: 5px;
  box-shadow:
    inset 0 calc(var(--edge) * -1) 0 var(--at-orange-edge),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.28),
    0 2px 0 rgba(0, 0, 0, 0.07),
    0 calc(var(--edge) * 2) calc(var(--edge) * 3) calc(var(--edge) * -1.6) rgba(160, 60, 10, 0.55);
  transform: translateY(0);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}
.at-button svg { width: 44%; height: 44%; transform: translateY(calc(var(--edge) * -0.4)); }
.at-button:focus-visible { outline: 2px solid var(--at-ink); outline-offset: 4px; }
@media (hover: hover) {
  .at-button:hover { transform: translateY(calc(var(--edge) * 0.3)); box-shadow: inset 0 calc(var(--edge) * -0.7) 0 var(--at-orange-edge), inset 0 1.5px 0 rgba(255, 255, 255, 0.28), 0 1px 0 rgba(0, 0, 0, 0.07), 0 calc(var(--edge) * 1.4) calc(var(--edge) * 2.4) calc(var(--edge) * -1.4) rgba(160, 60, 10, 0.55); }
}
.at-button:active,
.at-button.pressed,
.at-corner.on .at-button--main {
  transform: translateY(calc(var(--edge) * 0.7));
  box-shadow:
    inset 0 calc(var(--edge) * -0.3) 0 var(--at-orange-edge),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 1px 0 rgba(0, 0, 0, 0.06),
    0 3px 6px -4px rgba(160, 60, 10, 0.5);
}

/* ---------- corner button + LED ---------- */
.at-corner { z-index: 4; width: 66px; height: 66px; }
.at-corner .at-button--main { width: 100%; height: 100%; }
.at-corner .at-button--main svg { width: 38%; height: 38%; }
@media (max-width: 809.98px) { .at-corner { width: 56px; height: 56px; } }
.at-led {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cfcfcb;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease, box-shadow 0.3s ease;
}
.at-corner.on .at-led { background: #ff7a2e; box-shadow: 0 0 0 2px rgba(249, 112, 41, 0.18), 0 0 10px 2px rgba(249, 112, 41, 0.55); }
.at-corner .at-button--main { position: relative; }

/* ---------- the device ---------- */
.at-device {
  z-index: 5;
  box-sizing: border-box;
  padding: 18px 18px 16px;
  border-radius: 34px;
  background: linear-gradient(180deg, #f1f0ec 0%, var(--at-body) 100%);
  box-shadow:
    inset 0 0 0 2px #dedcd6,
    inset 0 0 0 5px #f3f2ee,
    inset 0 0 0 6px rgba(0, 0, 0, 0.05),
    inset 0 2px 0 7px rgba(255, 255, 255, 0.4),
    0 2px 0 #d3d1cb,
    0 4px 0 #c9c7c1,
    0 30px 50px -20px rgba(0, 0, 0, 0.35);
  transform-origin: var(--origin-x, 90%) -30px;
  transform: translateY(-10px) scale(0.55);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.2s ease;
}
.at-device.open { transform: none; opacity: 1; }

/* LCD window */
.at-screen {
  position: relative;
  padding: 22px 12px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #d3d7cb 0%, #dde0d6 60%, #d6d9ce 100%);
  box-shadow:
    inset 0 0 0 1.5px #bfc2b8,
    inset 0 3px 6px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.9);
}
.at-lcd-svg { display: block; width: 100%; height: auto; overflow: visible; }
.at-lcd-svg line { stroke-width: 2.2; stroke-linecap: round; }
.at-ghost line { stroke: rgba(40, 44, 36, 0.07); }
.at-lit line { stroke: transparent; }
.at-lit line.on { stroke: #262923; }
.at-lit circle { fill: transparent; }
.at-lit circle.on { fill: #262923; }
.at-lit .at-custom line { stroke: transparent; }
.at-lit .at-custom.on line { stroke: #262923; }
.at-screen.boot .at-lit line.on { stroke: #3a3e35; }
.at-screen.flicker .at-lit { opacity: 0.35; }
.at-screen.off .at-lit { opacity: 0; transition: opacity 0.2s ease; }

.at-ind {
  position: absolute;
  top: 6px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: rgba(40, 44, 36, 0.12);
  transition: color 0.15s ease;
}
.at-ind--jury { left: 12px; font-weight: 700; }
.at-ind--jury.on { color: #262923; }
.at-ind--count { right: 12px; color: #262923; font-weight: 500; }
.at-ind--count b { font-weight: 500; }
.at-screen.off .at-ind--count { color: rgba(40, 44, 36, 0.12); }
.at-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Controls */
.at-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 18px;
  margin: 16px 10px 4px;
}
.at-label { margin-right: auto; padding-bottom: 2px; font-size: 13px; line-height: 1; color: #6a6964; }
.at-small { display: grid; justify-items: center; gap: 8px; }
.at-cap { font-size: 12px; letter-spacing: 0.02em; text-transform: uppercase; color: var(--at-muted); }
.at-button--small { width: 34px; height: 34px; --edge: 3px; }

@media (prefers-reduced-motion: reduce) {
  .at-device { transition: opacity 0.2s ease; transform: none; }
}
