@font-face {
  font-family: 'Computer Modern';
  src: local('CMU Serif'), local('Computer Modern'), local('Latin Modern Roman'), local('Latin Modern Math');
  font-weight: normal;
}

:root {
  --bg-light: #ffffff;
  --bg-dark: #242424;
  --text-light: #f2f2f2;
  --text-dark: #1a1a1a;
  --font-scale: 1.6;
}

body {
  margin: 0;
  width: 100vw;
  height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s, color 0.3s;
}

body.light {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.container {
  text-align: center;
}

.label {
  font-size: calc(1.6rem * var(--font-scale));
  margin-bottom: 1rem;
  opacity: 0.8;
  /* Computer Modern Math style */
  font-family: 'Computer Modern', 'Latin Modern Math', 'Times New Roman', 'Liberation Serif', 'Nimbus Roman', 'Times', 'Hiragino Mincho ProN', 'Yu Mincho', 'MS Mincho', 'Noto Serif JP', 'Source Han Serif JP', serif;
  font-style: italic;
  font-weight: normal;
  letter-spacing: 0.02em;
}

.deadline {
  font-size: calc(1rem * var(--font-scale));
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.timer {
  font-size: calc(clamp(3rem, 8vw, 6rem) * var(--font-scale));
  font-weight: 700;
  letter-spacing: 0.05em;
}

.controls {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.font-button {
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 1.4rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.font-button:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

.font-button:active {
  transform: translateY(0);
}

/* テーマ切替ボタン */
#themeToggle {
  position: fixed;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: inherit;
  font-size: 5rem;
  cursor: pointer;
  opacity: 0.5;
}

#themeToggle:hover {
  opacity: 0.8;
}
