html, body, main, header, footer {
  padding: 0px;
  margin: 0px;
}

.hidden {
  display: none !important;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px;
}

#app-title {
  text-align: center;
  font-size: 24px;
  color: #1a1a2e;
  margin-bottom: 24px;
}

.tab-group {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  justify-content: center;
}

.tab-btn {
  flex: 1;
  max-width: 180px;
  padding: 10px 20px;
  border: 2px solid #3a7bd5;
  background: #fff;
  color: #3a7bd5;
  font-size: 15px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: #3a7bd5;
  color: #fff;
}

.tab-btn:hover:not(.active) {
  background: #e8f0fe;
}

.card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

#input-section label,
#precision-section label {
  display: block;
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
  font-weight: 500;
}

#input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

#input-value {
  flex: 1;
  padding: 12px 16px;
  font-size: 20px;
  border: 2px solid #d0d0d0;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease;
  font-family: 'Courier New', monospace;
}

#input-value:focus {
  border-color: #3a7bd5;
}

#input-unit {
  font-size: 16px;
  color: #888;
}

#precision-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 2px solid #d0d0d0;
  border-radius: 8px;
  outline: none;
  background: #fff;
  cursor: pointer;
}

#precision-select:focus {
  border-color: #3a7bd5;
}

#custom-pi {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 15px;
  border: 2px solid #d0d0d0;
  border-radius: 8px;
  outline: none;
  font-family: 'Courier New', monospace;
  box-sizing: border-box;
}

#custom-pi:focus {
  border-color: #3a7bd5;
}

#visual-section {
  text-align: center;
}

#circle-svg {
  width: 100%;
  max-width: 280px;
  height: auto;
}

#circle-shape {
  fill: none;
  stroke: #3a7bd5;
  stroke-width: 3;
}

#radius-line {
  stroke: #e74c3c;
  stroke-width: 2;
  stroke-dasharray: 6, 3;
}

#center-dot {
  fill: #e74c3c;
}

#radius-label-text,
#diameter-label-text {
  font-size: 18px;
  fill: #e74c3c;
  font-style: italic;
}

#diameter-line {
  stroke: #27ae60;
  stroke-width: 2;
  stroke-dasharray: 6, 3;
}

#result-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.result-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.result-card h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #555;
}

.formula {
  font-size: 13px;
  color: #888;
  margin-bottom: 12px;
  min-height: 20px;
  word-break: break-all;
}

.result-value {
  font-size: 28px;
  font-weight: 700;
  color: #2ecc71;
  font-family: 'Courier New', monospace;
  word-break: break-all;
  margin-bottom: 12px;
}

.copy-btn {
  padding: 8px 16px;
  font-size: 13px;
  border: 1px solid #d0d0d0;
  background: #f8f8f8;
  color: #555;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: #e8f0fe;
  border-color: #3a7bd5;
  color: #3a7bd5;
}

#__fork {
  text-align: center;
  margin: 24px 0;
}

#__fork button {
  padding: 10px 24px;
  font-size: 14px;
  background: #3a7bd5;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#__fork button:hover {
  background: #2d62aa;
}

#features, #scenarios, #FAQ {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px;
}

#features h2, #scenarios h2, #FAQ h2 {
  font-size: 20px;
  color: #1a1a2e;
  margin-bottom: 12px;
}

#features p {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
}

#scenarios ul {
  padding-left: 20px;
}

#scenarios li {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 6px;
}

#FAQ dl {
  margin: 0;
}

#FAQ dt {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin-top: 16px;
  margin-bottom: 6px;
}

#FAQ dd {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
  margin-left: 0;
  margin-bottom: 4px;
}

@media (max-width: 480px) {
  #result-section {
    grid-template-columns: 1fr;
  }

  #app-title {
    font-size: 20px;
  }

  .tab-btn {
    padding: 8px 12px;
    font-size: 14px;
  }

  #input-value {
    font-size: 18px;
    padding: 10px 12px;
  }

  .result-value {
    font-size: 24px;
  }
}
