:root {
  --bg: #0a0a0a;
  --fg: #f0f0f0;
  --text-min: 16px;
  --tap-min: 44px;
  --focus: #7eb6ff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #111111;
  color: var(--fg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: var(--text-min);
  overflow-x: hidden;
}

.container {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-bottom: 72px;
  text-align: center;
  max-width: 100vw;
}

.lang-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  background: #1a1a1a;
  border-radius: 8px;
  padding: 3px;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: #888;
  font-weight: 700;
  font-size: var(--text-min);
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.lang-btn--on {
  background: #333;
  color: #fff;
}

.header h1 {
  margin: 0 0 6px 0;
  font-size: 2.2rem;
  letter-spacing: 2px;
  font-weight: 600;
}

.tag {
  font-size: var(--text-min);
  opacity: 0.55;
  letter-spacing: 1px;
  margin-bottom: 28px;
}

.controls {
  width: 100%;
  max-width: 340px;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.btn {
  flex: 1;
  min-height: var(--tap-min);
  padding: 12px 16px;
  font-size: var(--text-min);
  font-weight: 600;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 80ms ease, background 80ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn-open {
  background: #ffffff;
  color: #000000;
}

.btn-close {
  background: #333333;
  color: #ffffff;
}

.btn-timer {
  background: #222222;
  color: #dddddd;
}

/* Visible keyboard focus for accessibility */
.btn:focus-visible,
.lang-btn:focus-visible,
.overlay:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.status {
  margin-top: 18px;
  font-size: var(--text-min);
  min-height: 22px;
  opacity: 0.85;
}

.hint {
  margin-top: 32px;
  font-size: var(--text-min);
  opacity: 0.45;
  line-height: 1.35;
  max-width: 28rem;
}

.overlay {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 99999;
  display: none;
  cursor: pointer;
}

.overlay.is-open {
  display: block;
}

.overlay::after {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.8rem;
  letter-spacing: 6px;
  color: #222222;
  pointer-events: none;
  user-select: none;
  font-weight: 500;
}

.yiq-copy-2026 {
  margin: 0 auto 24px;
  padding: 10px 14px;
  max-width: 720px;
  text-align: center;
  font-size: 16px;
  opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
  .btn:active {
    transform: none;
  }
}
