body {
  margin: 0;
  background: var(--background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.homepage {
  justify-content: flex-start;
  align-items: stretch;
  padding: 48px 16px 64px;
}

.page {
  width: 100%;
  max-width: 960px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 48px 24px 64px;
  gap: 32px;
}

.config-form {
  background: var(--surface);
}

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

.config-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.config-input-row--time {
  align-items: center;
  gap: 8px;
}

.config-input {
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  font-size: 2rem;
  color: var(--accent);
  transition: border 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  width: 100%;
}

.config-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 105, 192, 0.22);
  outline: none;
}

.config-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.timer-layout {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.timer-stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  color: var(--text);
}

.timer-stats-item {
  flex: 1 1 150px;
  text-align: center;
  border-radius: 16px;
  padding: 16px;
  opacity: 0.2;
  display: flex;
  flex-direction: column;
}

.timer-stats-item.highlight {
  opacity: 1;
}

@media (prefers-color-scheme: dark) {
  .timer-stats-item.highlight {
    background: rgba(255, 255, 255, 0.06);
  }
}

.home-page {
  gap: 40px;
}

.home-hero-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-hero-text h1 {
  font-size: 2.75rem;
  line-height: 1.15;
  margin: 0;
}

.home-hero-text p {
  margin: 0;
  font-size: 1.125rem;
  color: var(--muted);
}

.home-apps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-section-title {
  margin: 0;
  font-size: 1.75rem;
}

.home-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 19px;
}

.app-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  text-decoration: none;
  color: inherit;
  transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.app-card:hover,
.app-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.app-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.app-card-label {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--focus0);
}

.app-card-tag {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(0, 105, 192, 0.12);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
}

.app-card-tag.creativity {
  color: var(--focus1);
}
.app-card-tag.jury {
  color: var(--focus2);
}

.app-card-description {
  margin: 0;
  color: var(--muted);
  flex: 1;
  line-height: 1.5;
}

.app-card-cta {
  font-weight: 600;
  color: var(--accent);
}

.timer-stats-value {
  font-size: 2rem;
  line-height: 1.5;
  font-weight: 600;
}

.timer-stats-value--time {
  font-family: 'B612 Mono', monospace;
  letter-spacing: 0.04em;
}

.timer-stats-label {
  font-weight: 500;
  font-size: 1rem;
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .page {
    padding: 32px 16px 56px;
    gap: 24px;
  }

  .home-hero-text h1 {
    font-size: 2.25rem;
  }

  .home-section-title {
    font-size: 1.5rem;
  }

  .timer-layout {
    padding: 24px;
    gap: 24px;
  }

  .timer-stats-value {
    font-size: 1.6rem;
  }
}

@media (max-width: 640px) {
  .homepage {
    padding: 32px 16px 56px;
  }

  .home-apps-grid {
    display: flex;
    flex-direction: column;
  }

  .app-card {
    padding: 20px;
  }

  .app-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-card-tag {
    margin-top: 4px;
  }
}

@media (max-width: 480px) {
  .config-form,
  .timer-layout {
    padding: 20px;
  }

  .timer-stats-item {
    flex: 1 1 140px;
  }
}
