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

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 32px 24px;
}

#app-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  text-align: center;
  margin: 0 0 8px 0;
}

#app-subtitle {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
  margin: 0 0 28px 0;
}

.section {
  margin-bottom: 24px;
}

.section-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 10px;
}

#base-time-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.input-field {
  flex: 1;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  background: #f9fafb;
  color: #1f2937;
  box-sizing: border-box;
}

.input-field:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
  background: #3b82f6;
  color: #ffffff;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-primary:active {
  background: #1d4ed8;
}

.btn-outline {
  background: transparent;
  color: #3b82f6;
  border: 1px solid #3b82f6;
}

.btn-outline:hover {
  background: #eff6ff;
}

.btn-outline:active {
  background: #dbeafe;
}

#now-btn {
  width: 100%;
  font-size: 14px;
}

.toggle-row {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #3b82f6;
  margin-bottom: 16px;
}

.toggle-btn {
  flex: 1;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  background: #ffffff;
  color: #3b82f6;
  transition: background 0.2s, color 0.2s;
}

.toggle-btn.active {
  background: #3b82f6;
  color: #ffffff;
}

.toggle-btn:not(.active):hover {
  background: #eff6ff;
}

.units-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.unit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.unit-label {
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
}

.unit-input {
  width: 100%;
  text-align: center;
  min-width: 0;
}

.result-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 16px;
  background: #f0f9ff;
  border: 2px solid #3b82f6;
  border-radius: 10px;
  margin-bottom: 16px;
}

#result-date {
  font-size: 20px;
  font-weight: 700;
  color: #1e40af;
  font-family: "Courier New", Courier, monospace;
}

#result-time {
  font-size: 28px;
  font-weight: 700;
  color: #1e40af;
  font-family: "Courier New", Courier, monospace;
}

.action-row {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.action-row .btn {
  min-width: 120px;
}

.copied {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}

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

#__fork button {
  padding: 8px 24px;
  font-size: 13px;
  color: #6b7280;
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

#__fork button:hover {
  color: #3b82f6;
  border-color: #3b82f6;
}

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

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

#features p {
  font-size: 15px;
  line-height: 1.8;
  color: #4b5563;
  margin: 0;
}

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

#scenarios li {
  font-size: 15px;
  line-height: 1.8;
  color: #4b5563;
  margin-bottom: 6px;
}

#FAQ dl {
  margin: 0;
}

#FAQ dt {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 16px 0 6px 0;
}

#FAQ dd {
  font-size: 15px;
  line-height: 1.7;
  color: #6b7280;
  margin: 0 0 8px 0;
}

.page-info {
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
  padding: 20px 16px;
}

.page-info a {
  color: #3b82f6;
  text-decoration: none;
}

.page-info a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  #app {
    padding: 12px 8px;
  }

  .card {
    padding: 20px 14px;
  }

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

  #base-time-row {
    flex-direction: column;
  }

  .units-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #result-date {
    font-size: 16px;
  }

  #result-time {
    font-size: 22px;
  }

  .action-row {
    flex-direction: column;
  }

  .action-row .btn {
    min-width: auto;
  }
}
