* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  margin: 0; padding: 16px; background: #f7f8fa; color: #222;
}
.container { max-width: 480px; margin: 0 auto; }
h1 { font-size: 1.4rem; text-align: center; }
.disclaimer {
  font-size: 0.75rem; color: #666; background: #fff8e1;
  padding: 10px; border-radius: 8px; line-height: 1.5;
}
form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
label { display: flex; flex-direction: column; font-size: 0.9rem; gap: 6px; }
input[type="text"], input[type="datetime-local"], select {
  padding: 12px; font-size: 1rem; border: 1px solid #ccc;
  border-radius: 8px; width: 100%;
}
button {
  padding: 14px; font-size: 1.05rem; background: #1a73e8; color: white;
  border: none; border-radius: 8px; cursor: pointer;
}
.result {
  margin-top: 20px; background: white; border-radius: 8px;
  padding: 16px; font-size: 0.95rem; line-height: 1.8;
}
.result.hidden { display: none; }
.result .total { font-size: 1.2rem; font-weight: bold; color: #1a73e8; }

select { background: white; }

/* 「往復にする」：横並びにして、チェック欄と文字を中央にそろえる */
.checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  font-size: 1rem;
}
.checkbox-label input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin: 0;
  flex-shrink: 0;
}
.result .notice {
  margin-top: 8px; padding: 8px 10px; background: #e8f5e9;
  border-radius: 6px; font-size: 0.85rem; line-height: 1.5;
}

.field { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; }
.field-title { font-size: 0.9rem; }
.time-row { display: flex; align-items: center; gap: 8px; }
.time-row select { flex: 1; min-width: 0; }
input[type="date"] {
  padding: 12px; font-size: 1rem; border: 1px solid #ccc;
  border-radius: 8px; width: 100%; background: white;
}
button.secondary {
  background: white; color: #1a73e8; border: 1px solid #1a73e8;
  padding: 10px; font-size: 0.95rem;
}
button.secondary:disabled { color: #aaa; border-color: #ccc; }
.waypoint-row { display: flex; gap: 8px; margin-bottom: 8px; }
.waypoint-row input { flex: 1; min-width: 0; }
.waypoint-row button {
  width: 48px; padding: 0; background: #f1f3f4; color: #444;
}
.result .warning {
  margin-top: 8px; padding: 8px 10px; background: #fff3e0;
  border: 1px solid #ffb74d; border-radius: 6px;
  font-size: 0.85rem; line-height: 1.5;
}

.field.hidden { display: none; }
