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

#app {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

#calc-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #e91e7b;
  margin: 0 0 20px 0;
}

.input-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.date-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-row label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  min-width: 90px;
}

.date-input {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: Consolas, "Courier New", monospace;
  outline: none;
  transition: border-color 0.2s;
  min-height: 44px;
  color: #333;
  background: #fff;
}

.date-input:focus {
  border-color: #e91e7b;
}

.link-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: #fce4ec;
  color: #e91e7b;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
  min-height: 44px;
}

.link-btn:hover {
  background: #f8bbd0;
}

.error-text {
  color: #d93025;
  font-size: 0.85rem;
  min-height: 20px;
  margin-bottom: 8px;
}

.progress-area {
  margin-bottom: 20px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#progress-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #888;
}

.progress-percent {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e91e7b;
}

.progress-bar-track {
  width: 100%;
  height: 12px;
  background: #fce4ec;
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f48fb1, #e91e7b);
  border-radius: 6px;
  transition: width 0.4s ease;
}

.progress-hint {
  display: block;
  font-size: 0.75rem;
  color: #aaa;
  margin-top: 4px;
  text-align: right;
}

.result-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-card {
  background: #fdf2f7;
  border: 1px solid #f8bbd0;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.result-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #c2185b;
  margin-bottom: 4px;
}

.result-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #e91e7b;
  font-family: Consolas, "Courier New", monospace;
  word-break: break-all;
  min-height: 36px;
  line-height: 1.2;
}

.result-value-medium {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: #e91e7b;
  font-family: Consolas, "Courier New", monospace;
  word-break: break-all;
  min-height: 28px;
  line-height: 1.3;
}

.result-value-small {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #e91e7b;
  font-family: Consolas, "Courier New", monospace;
  word-break: break-all;
  min-height: 24px;
  line-height: 1.3;
}

.result-detail {
  display: block;
  font-size: 0.78rem;
  color: #ad1457;
  margin-top: 2px;
}

.result-row {
  display: flex;
  gap: 12px;
}

.result-half {
  flex: 1;
}

.result-main {
  background: linear-gradient(135deg, #fce4ec, #f8bbd0);
  border-color: #e91e7b;
}

.result-due {
  background: #e8f5e9;
  border-color: #a5d6a7;
}

.result-due .result-label {
  color: #2e7d32;
}

.result-due .result-value-medium {
  color: #2e7d32;
}

.result-countdown {
  background: #fff3e0;
  border-color: #ffcc80;
}

.result-countdown .result-label {
  color: #e65100;
}

.result-countdown .result-value-medium {
  color: #e65100;
}

.result-countdown .result-detail {
  color: #bf360c;
}

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

#features h2, #scenarios h2, #FAQ h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 8px 0;
}

#features p, #scenarios li, #FAQ dd {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
}

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

#scenarios li {
  margin-bottom: 8px;
}

#FAQ dl {
  margin: 0;
}

#FAQ dt {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-top: 12px;
}

#FAQ dd {
  margin: 4px 0 0 0;
}

#__fork {
  max-width: 520px;
  margin: 0 auto;
  padding: 8px 16px;
  text-align: center;
}

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

  .card {
    padding: 16px;
    border-radius: 8px;
  }

  #calc-title {
    font-size: 1.3rem;
    margin-bottom: 16px;
  }

  .result-value {
    font-size: 1.6rem;
  }

  .result-value-medium {
    font-size: 1.1rem;
  }

  .result-value-small {
    font-size: 1rem;
  }

  .date-row {
    flex-wrap: wrap;
  }

  .date-row label {
    min-width: 100%;
  }

  .result-row {
    flex-direction: column;
    gap: 12px;
  }
}
