* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, Arial, sans-serif;
  background: #ffffff;
  color: #111111;
  -webkit-tap-highlight-color: transparent;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.site-header {
  text-align: center;
  margin-bottom: 16px;
}

.site-header h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 2px;
  margin: 0;
}

.site-footer {
  text-align: center;
  padding: 20px 16px;
  color: #666666;
  font-size: 13px;
  border-top: 1px solid #eeeeee;
}

.footer-nav {
  margin-bottom: 8px;
}

.footer-nav a {
  color: #666666;
  text-decoration: underline;
  margin: 0 8px;
}

.tagline {
  color: #666666;
  margin: 4px 0 0;
  font-size: 15px;
}

.ad-container {
  border: 1px dashed #cccccc;
  color: #999999;
  font-size: 12px;
  text-align: center;
  padding: 10px;
  margin: 16px 0;
}

.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}

.duration-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.dur-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  background: #ffffff;
  color: #111111;
  border: 2px solid #111111;
  cursor: pointer;
}

.dur-btn.is-selected {
  background: #111111;
  color: #ffffff;
}

.primary-btn {
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 16px 40px;
  background: #111111;
  color: #ffffff;
  border: none;
  cursor: pointer;
  width: 100%;
  max-width: 280px;
}

.primary-btn:active {
  background: #333333;
}

.secondary-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  background: #ffffff;
  color: #e53935;
  border: 2px solid #e53935;
  cursor: pointer;
  margin-top: 12px;
}

.best-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  color: #666666;
  font-size: 14px;
}

.best-line-center {
  color: #666666;
  font-size: 14px;
  text-align: center;
  margin: 4px 0 0;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.stat-box {
  flex: 1;
  text-align: center;
  border: 1px solid #dddddd;
  padding: 10px 4px;
}

.stat-label {
  font-size: 12px;
  color: #666666;
  font-weight: 600;
  letter-spacing: 1px;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.click-btn {
  font-family: inherit;
  width: 100%;
  height: min(60vh, 340px);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
  background: #1e88e5;
  color: #ffffff;
  border: none;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.click-btn:active {
  background: #43a047;
}

.complete-title {
  font-size: 22px;
  letter-spacing: 1px;
  margin: 0;
}

.new-best {
  background: #43a047;
  color: #ffffff;
  font-weight: 700;
  padding: 10px 16px;
  font-size: 15px;
  text-align: center;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.result-box {
  border: 1px solid #dddddd;
  padding: 14px 8px;
  text-align: center;
}

.result-box.result-main {
  border: 2px solid #111111;
}

.result-value {
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.result-label {
  font-size: 12px;
  color: #666666;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.stats-section {
  margin-top: 32px;
  border-top: 1px solid #dddddd;
  padding-top: 24px;
  text-align: center;
}

.stats-section h2 {
  font-size: 16px;
  letter-spacing: 1px;
  margin: 0 0 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stats-item {
  border: 1px solid #dddddd;
  padding: 12px 4px;
}

.stats-value {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stats-label {
  font-size: 12px;
  color: #666666;
  margin-top: 4px;
}

.records-heading {
  font-size: 13px;
  color: #666666;
  letter-spacing: 1px;
  margin: 24px 0 10px;
}

.duration-records {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.duration-records li {
  display: flex;
  justify-content: space-between;
  border: 1px solid #dddddd;
  padding: 8px 12px;
  font-size: 14px;
}

.duration-records li span:first-child {
  color: #666666;
  font-weight: 600;
}

.countdown-number {
  font-size: 96px;
  font-weight: 800;
  text-align: center;
  padding: 80px 0;
}
@media (max-width: 400px) {
  .site-header h1 {
    font-size: 26px;
  }

  .click-btn {
    font-size: 22px;
  }

  .stat-value {
    font-size: 20px;
  }
}
