@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

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

body {
  font-family: "Noto Sans JP", "メイリオ", Meiryo, sans-serif;
  background: #f0f8ff;
  color: #333;
  line-height: 1.6;
}

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

header {
  background: #fff;
  border-bottom: 2px solid #3CA1E9;
  padding: 12px 0;
  margin-bottom: 28px;
}
header .container { display: flex; align-items: center; gap: 10px; margin-bottom: 0; }
header h1 { font-size: .95rem; font-weight: 700; color: #3CA1E9; }

/* Steps */
.steps { display: flex; gap: 0; margin-bottom: 24px; border-radius: 8px; overflow: hidden; border: 1px solid #b3d8f5; }
.step { flex: 1; padding: 9px 4px; text-align: center; font-size: .72rem; background: #fff; color: #aaa; border-right: 1px solid #b3d8f5; }
.step:last-child { border-right: none; }
.step.active { background: #3CA1E9; color: #fff; font-weight: 700; }
.step.done { background: #dceefb; color: #3CA1E9; }

/* Cards */
.card { background: #fff; border-radius: 12px; padding: 22px; margin-bottom: 16px; box-shadow: 0 2px 12px rgba(60,161,233,.12); }
.card h2 { font-size: .95rem; margin-bottom: 14px; color: #3CA1E9; font-weight: 700; }

/* Upload zone */
.upload-zone {
  border: 2px dashed #90caf9;
  border-radius: 10px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: #f7fbff;
}
.upload-zone:hover, .upload-zone.dragover { border-color: #3CA1E9; background: #e3f2fd; }
.upload-zone input[type=file] { display: none; }
.upload-zone .icon { font-size: 2.2rem; margin-bottom: 10px; }
.upload-zone p { color: #777; font-size: .88rem; }

/* Forms */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: .78rem; color: #888; margin-bottom: 3px; }
.field input, .field select {
  width: 100%; padding: 8px 10px; border: 1px solid #b3d8f5; border-radius: 7px;
  font-size: .93rem; font-family: inherit; background: #fff;
}
.field input:focus, .field select:focus { outline: none; border-color: #3CA1E9; }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 130px; }

/* Rounding */
.rounding-box {
  border: 2px solid #b3d8f5;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .2s;
}
.rounding-box:hover { border-color: #3CA1E9; }
.rounding-box.selected { border-color: #3CA1E9; background: #e3f2fd; }
.rounding-box .badge {
  display: inline-block; font-size: .68rem; padding: 2px 8px;
  border-radius: 10px; margin-bottom: 6px;
}
.badge-up { background: #e3f2fd; color: #0277bd; }
.badge-down { background: #fff8e1; color: #f57f17; }
.badge-must { background: #ffebee; color: #c62828; }
.rounding-box .hours { font-size: 1.35rem; font-weight: 700; }
.rounding-box .amount { color: #3CA1E9; font-weight: 600; }

/* Alert */
.alert { padding: 10px 14px; border-radius: 7px; margin-bottom: 14px; font-size: .88rem; }
.alert-info { background: #e3f2fd; color: #0277bd; }
.alert-warn { background: #fff8e1; color: #e65100; }
.alert-error { background: #ffebee; color: #c62828; }
.alert-success { background: #e8f5e9; color: #2e7d32; }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 8px;
  font-size: .93rem; font-weight: 600; cursor: pointer;
  border: none; font-family: inherit; transition: opacity .15s;
}
.btn:hover:not(:disabled) { opacity: .85; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: #3CA1E9; color: #fff; }
.btn-secondary { background: #e3f2fd; color: #3CA1E9; }
.btn-success { background: #26a69a; color: #fff; }
.btn-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* Loading */
.loading { display: flex; align-items: center; gap: 10px; color: #999; }
.spinner {
  width: 18px; height: 18px;
  border: 3px solid #b3d8f5;
  border-top-color: #3CA1E9;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Preview */
.preview-img { max-width: 100%; border-radius: 8px; border: 1px solid #b3d8f5; margin-bottom: 10px; }

/* Table */
.rec-table { width:100%; border-collapse:collapse; font-size:.86rem; }
.rec-table th { background:#dceefb; padding:6px 5px; text-align:center; border:1px solid #b3d8f5; white-space:nowrap; color:#0277bd; font-weight:600; }
.rec-table td { padding:3px; border:1px solid #b3d8f5; }
.rec-table input { width:100%; border:none; padding:4px; font-size:.86rem; font-family:inherit; background:transparent; }
.rec-table input:focus { outline:1px solid #3CA1E9; border-radius:3px; background:#fff; }
.rec-table .del-btn { background:none; border:none; color:#e53935; cursor:pointer; font-size:.95rem; padding:2px 5px; }

/* Round chips */
.round-row { display:flex; gap:8px; margin-bottom:10px; align-items:center; flex-wrap:wrap; }
.round-chip { padding:5px 13px; border-radius:18px; border:2px solid #b3d8f5; cursor:pointer; font-size:.83rem; background:#fff; }
.round-chip.sel { border-color:#3CA1E9; background:#dceefb; font-weight:700; color:#0277bd; }
.round-chip.must { border-color:#e53935; background:#fff8f8; }

/* Hidden */
.hidden { display: none !important; }
