* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f5;
  color: #333;
  min-height: 100vh;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

h1 {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
  color: #222;
}

.subtitle {
  text-align: center;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 20px;
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: #444;
  border-left: 4px solid #e67e22;
  padding-left: 8px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 5px;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: #e67e22;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-primary {
  flex: 1;
  padding: 14px;
  background: #e67e22;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #d35400;
}

.btn-secondary {
  padding: 14px 20px;
  background: #eee;
  color: #555;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #ddd;
}

.result {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  text-align: center;
}

.result.hidden {
  display: none;
}

.verdict {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 8px;
}

.verdict.urgent {
  background: #fdecea;
  color: #c0392b;
  border: 2px solid #e74c3c;
}

.verdict.wait {
  background: #eaf4fd;
  color: #1a6fa8;
  border: 2px solid #3498db;
}

.breakdown {
  text-align: left;
  background: #f9f9f9;
  border-radius: 8px;
  padding: 14px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}

.breakdown-row:last-child {
  border-bottom: none;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 4px;
  padding-top: 10px;
}

.breakdown-row .label {
  color: #555;
}

.breakdown-row .value {
  color: #222;
}

.diff-positive {
  color: #c0392b;
  font-weight: 700;
}

.diff-negative {
  color: #1a6fa8;
  font-weight: 700;
}

.history-section {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

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

.history-header h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #444;
}

.btn-clear {
  padding: 6px 12px;
  background: #fff;
  color: #e74c3c;
  border: 1px solid #e74c3c;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-clear:hover {
  background: #e74c3c;
  color: #fff;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 12px;
  border-left: 4px solid #ccc;
}

.history-item.urgent-item {
  border-left-color: #e74c3c;
}

.history-item.wait-item {
  border-left-color: #3498db;
}

.history-item .h-date {
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 4px;
}

.history-item .h-verdict {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.history-item .h-verdict.urgent {
  color: #c0392b;
}

.history-item .h-verdict.wait {
  color: #1a6fa8;
}

.history-item .h-detail {
  font-size: 0.8rem;
  color: #555;
}

.empty-history {
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
  padding: 16px 0;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.2rem;
  }

  .verdict {
    font-size: 1.25rem;
  }
}
