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

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

.container {
  max-width: 480px;
  margin: 0 auto;
}

h1 {
  font-size: 1.6rem;
  text-align: center;
  color: #2d6a9f;
  margin-top: 16px;
}

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

/* 入力エリア */
.input-area {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

.input-area label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: #444;
}

.input-row {
  display: flex;
  gap: 10px;
}

input[type="number"] {
  flex: 1;
  padding: 12px 14px;
  border: 2px solid #c9d8e8;
  border-radius: 8px;
  font-size: 1.1rem;
  outline: none;
  transition: border-color 0.2s;
}

input[type="number"]:focus {
  border-color: #2d6a9f;
}

button#advise-btn {
  padding: 12px 20px;
  background: #2d6a9f;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

button#advise-btn:hover {
  background: #245c8a;
}

/* 提案結果 */
.result {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease;
}

.result.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.temp-display {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  color: #2d6a9f;
  margin-bottom: 14px;
}

.advice-box {
  border-top: 2px solid #e8f0f8;
  padding-top: 14px;
}

.advice-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin-bottom: 6px;
}

.advice-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 10px;
}

.advice-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.advice-item {
  background: #e8f0f8;
  color: #2d6a9f;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* 履歴 */
.history-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

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

.clear-btn {
  background: none;
  border: 1px solid #ccc;
  color: #888;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-btn:hover {
  border-color: #e55;
  color: #e55;
}

.history-list {
  list-style: none;
}

.history-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
  gap: 8px;
}

.history-list li:last-child {
  border-bottom: none;
}

.h-temp {
  font-weight: 700;
  color: #2d6a9f;
  min-width: 48px;
}

.h-advice {
  flex: 1;
  color: #333;
}

.h-date {
  color: #aaa;
  font-size: 0.78rem;
  white-space: nowrap;
}

.no-history {
  text-align: center;
  color: #bbb;
  font-size: 0.85rem;
  padding: 12px 0;
}

@media (max-width: 375px) {
  h1 { font-size: 1.3rem; }
  .temp-display { font-size: 1.8rem; }
}
