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;
}

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

.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  opacity: 0.1;
}
.tab-nav:hover {
  opacity: 1;
}


.tab-button {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-button:hover,
.tab-button:focus-visible {
  color: var(--text);
  background: rgba(0, 105, 192, 0.12);
  outline: none;
}

.tab-button.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 22px rgba(0, 105, 192, 0.28);
}

.tab-panel {
  display: none;
  min-height: 600px;
}

.tab-panel.is-active {
  display: block;
}

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

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

.config-label {
  font-weight: 600;
  color: var(--text);
}

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

.config-card {
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.02);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-inline-size: 0;
}

@media (prefers-color-scheme: dark) {
  .config-card {
    background: rgba(255, 255, 255, 0.05);
  }
}

.config-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.config-card legend {
  border: 0;
  padding: 0;
  margin: 0 0 12px;
}

.config-note {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
}

.config-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  gap: 12px;
}

.config-time-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.config-time-label span {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 600px) {
  .config-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

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

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

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

.config-input-suffix {
  font-weight: 600;
  color: var(--muted);
}

.config-submit {
  align-self: flex-start;
}

.config-feedback {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.config-actions {
  display: flex;
  justify-content: flex-end;
  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-heading {
  margin: 0;
  font-size: 1.8rem;
  color: var(--text);
  text-align: center;
}

.timer {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.timer-visual {
  position: relative;
  height: 170px;
}

.timer-circle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.timer-circle--total {
  width: 136px;
  height: 136px;
  margin: 20px auto;
  transform: translate(-50%, -8px);
}

.timer-circle--round {
  width: 120px;
  height: 120px;
  margin: 20px auto;
}

.timer-circle-svg {
  display: block;
  width: 100%;
  height: 100%;
  rotate: -90deg;
}

.timer-total-background,
.timer-round-background {
  fill: none;
  stroke-width: 5;
}

.timer-total-background {
  stroke: var(--highlight);
}

.timer-round-background {
  stroke: var(--highlight2);
}

.timer-total-progress,
.timer-round-progress {
  fill: none;
  stroke-width: 5;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 0.2s ease-in-out;
}

.timer-total-progress {
  stroke: var(--focus2);
}

.timer-round-progress {
  stroke: var(--focus1);
}

.timer-circle-overlay {
  width: 110px;
  height: 110px;
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.timer-round-value {
  font-size: 2rem;
  line-height: 1;
  font-weight: 600;
  color: var(--focus0);
  font-family: 'B612 Mono', monospace;
}
#sketch-panel .timer-circle-overlay {
  top: 13px;
}

.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 180px;
  text-align: center;
  border-radius: 16px;
  padding: 16px;
  opacity: 0.2;
}
.timer-stats-item.highlight {
    opacity: 1;
}

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

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

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

#feedbacks-panel .timer-stats-phase {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 2rem;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#feedbacks-panel .timer.is-presentation-phase .timer-round-progress {
  stroke: var(--focus1);
}

#feedbacks-panel .timer.is-feedback-phase .timer-round-progress {
  stroke: var(--focus3);
}

#feedbacks-panel .timer-stats-item.highlight.is-presentation-phase {
  background: var(--focus1);
  color: #fff;
}

#feedbacks-panel .timer-stats-item.highlight.is-feedback-phase {
  background: var(--focus3);
  color: #fff;
}

#feedbacks-panel .timer-stats-item.highlight.is-presentation-phase .timer-stats-label,
#feedbacks-panel .timer-stats-item.highlight.is-feedback-phase .timer-stats-label {
  color: rgba(255, 255, 255, 0.85);
}

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

.summary-total {
  margin: 8px auto 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-total-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.summary-total-value {
  font-size: 1.8rem;
  font-family: 'B612 Mono', monospace;
  letter-spacing: 0.08em;
  color: var(--text);
}

.timer-controls {
  display: flex;
  justify-content: center;
}

.timer-controls-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.timer-control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.timer-control-button.btn-secondary {
  border-color: transparent;
  background: rgba(0, 105, 192, 0.12);
  color: var(--accent);
}

.timer-control-button.btn-secondary:hover,
.timer-control-button.btn-secondary:focus-visible {
  background: rgba(0, 105, 192, 0.2);
  color: var(--accent);
}

.timer-audio {
  display: none;
}

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

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

  .page-title {
    font-size: 2.1rem;
  }

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

  .timer-round-value {
    font-size: 2.5rem;
  }

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

@media (max-width: 480px) {
  .tab-nav {
    border-radius: 16px;
  }

  .tab-button {
    flex: 1 1 45%;
    text-align: center;
  }

  .config-form,
  .timer-layout {
    padding: 20px;
  }

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

.tab-icon { width: 1.2rem; height: 1.2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
