:root {
  --safe-bottom: max(16px, env(safe-area-inset-bottom));
}

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

html,
body {
  margin: 0;
  height: 100%;
  background: #120c08;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

.screen {
  position: relative;
  height: 100%;
  min-height: 100dvh;
}

.photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 4, 2, 0.88) 0%,
    rgba(8, 4, 2, 0.35) 38%,
    rgba(8, 4, 2, 0.08) 62%,
    transparent 100%
  );
  pointer-events: none;
}

.hud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 16px var(--safe-bottom);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status {
  margin: 0;
  text-align: center;
  font-size: 15px;
  line-height: 1.35;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.status.error {
  color: #ffb4b4;
}

.timer {
  margin: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.log {
  margin: 0;
  max-height: 28vh;
  overflow: auto;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

button {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 17px;
  font-weight: 650;
  cursor: pointer;
}

#start-btn {
  background: #f3d39a;
  color: #2a1608;
}

#stop-btn {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}
