/* Tool-specific reset + styles (cream/ink palette, matching existing site) */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: #f7f3ea;
  color: #1c1a17;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: 1rem;
  line-height: 1.6;
}
.ad { text-align: center; margin: 1rem auto; min-height: 60px; }
.back-link { display: inline-block; font-size: 0.9rem; color: #6f695f; text-decoration: none; margin-bottom: 0.75rem; }
.back-link:hover { color: #1c1a17; }
main { max-width: 720px; margin: 0 auto; padding: 2rem 0; }
h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.subtitle { color: #6f695f; font-size: 0.95rem; margin-bottom: 1.5rem; }
.field { margin-bottom: 1.25rem; }
label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.4rem; }
input[type="number"], select {
  width: 100%; padding: 0.6rem 0.8rem; font-size: 1rem; border: 1px solid #ddd;
  border-radius: 6px; background: #fff; font-family: inherit; color: #1c1a17;
}
select { cursor: pointer; }
input[type="number"]::-webkit-inner-spin-buttons { opacity: 0; }
input[type="number"]:hover::-webkit-inner-spin-buttons { opacity: 1; }
.controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; margin-bottom: 1.5rem; }
.controls .field { margin-bottom: 0; flex: 1; min-width: 140px; }
.controls .field label { font-size: 0.8rem; }
.grind-hint {
  flex: 1 1 100%; min-width: 140px; font-size: 0.85rem; color: #6f695f;
  margin-top: 0.25rem;
}
.grind-hint span { font-weight: 600; color: #1c1a17; }
.error-banner {
  margin-top: 1rem; padding: 0.75rem 1rem; background: #fdecea; color: #5a1a1a; border: 1px solid #f5c6c6; border-radius: 6px; font-size: 0.9rem;
}
.error-banner.hidden { display: none; }
.timer-display {
  text-align: center; margin: 1.5rem 0; padding: 1.5rem; background: #fff;
  border: 1px solid #eee; border-radius: 12px;
}
.timer-time { font-size: 3rem; font-weight: 700; font-family: 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace; letter-spacing: 0.02em; }
.timer-stage { font-size: 1.1rem; font-weight: 600; color: #6f695f; margin-top: 0.4rem; }
.timer-time.long { font-size: 2.5rem; }
.progress { margin: 1.25rem 0; }
.progress-track, .progress-overall-track {
  height: 6px; border-radius: 3px; background: #eee; overflow: hidden; margin-bottom: 0.5rem;
}
.progress-fill, .progress-overall-fill { height: 100%; border-radius: 3px; background: #2d2a25; transition: width 0.2s ease; width: 0%; }
.progress-overall-fill { background: #6f695f; }
.actions { display: flex; gap: 0.75rem; margin: 1.25rem 0; flex-wrap: wrap; }
.actions button {
  flex: 1; padding: 0.6rem 0.9rem; font-size: 0.95rem; font-weight: 500;
  border: 1px solid #ddd; border-radius: 6px; cursor: pointer; background: #fff; font-family: inherit; color: #1c1a17;
}
.actions button:hover:not(:disabled) { background: #f0edea; }
.actions button:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: #1c1a17; color: #f7f3ea; border-color: #1c1a17; }
.btn-primary:hover:not(:disabled) { background: #2d2a25; }
.stage-info {
  margin: 1rem 0; padding: 0.85rem 1rem; background: #fff; border: 1px solid #eee; border-radius: 10px;
  font-size: 0.95rem; color: #1c1a17; text-align: center;
}
.stage-list { list-style: none; margin: 1rem 0; }
.stage-item {
  display: flex; align-items: baseline; gap: 0.6rem; padding: 0.7rem 0.9rem;
  background: #fff; border: 1px solid #eee; border-radius: 8px; margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.stage-item.active { border-color: #1c1a17; background: #fdfbf7; }
.stage-item.active .stage-name { color: #1c1a17; font-weight: 700; }
.stage-item.complete { opacity: 0.55; }
.stage-item .stage-name { flex: 1; min-width: 90px; }
.stage-item .stage-duration { font-family: 'SF Mono', Consolas, monospace; font-variant-numeric: tabular-nums; }
.stage-item .stage-water { color: #6f695f; margin-left: auto; }
.stage-item .stage-instruction { flex: 1 1 100%; color: #6f695f; font-size: 0.85rem; margin-top: 0.2rem; }
.tips h2 { font-size: 1.25rem; font-weight: 600; margin: 2rem 0 1rem; }
.tips dl dt { font-weight: 600; margin: 1rem 0 0.3rem; font-size: 0.95rem; }
.tips dl dd { color: #6f695f; font-size: 0.9rem; margin-bottom: 0.5rem; }
footer { text-align: center; margin-top: 2rem; font-size: 0.8rem; color: #6f695f; }

@media (max-width: 600px) {
  body { padding: 0.75rem; }
  main { padding: 1rem 0; }
  h1 { font-size: 1.35rem; margin-bottom: 0.35rem; }
  .subtitle { font-size: 0.85rem; margin-bottom: 0.75rem; }
  .controls { flex-direction: column; }
  .controls .field, .controls .grind-hint { min-width: 100%; }
  .timer-time { font-size: 2.2rem; }
  .timer-time.long { font-size: 1.6rem; }
  .actions { flex-wrap: wrap; }
  .tips h2 { margin: 1.25rem 0 0.6rem; font-size: 1.1rem; }
  .tips dl dt { margin: 0.75rem 0 0.2rem; font-size: 0.9rem; }
  .tips dl dd { font-size: 0.85rem; margin-bottom: 0.4rem; }
  footer { margin-top: 1.25rem; }
}
