/* 開発途中版（完成度 約1/4）のスタイル。完成版 app/src/styles.css の該当部分のみを抜き出したもの。 */
* {
  box-sizing: border-box;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  background: #f2f4f7;
  color: #1a2433;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.stage-badge {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #55627a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 6px;
  z-index: 50;
  letter-spacing: 0.04em;
}

.screen {
  max-width: 900px;
  margin: 0 auto;
  padding: 44px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100vh;
}

/* ---------- ヘッダー ---------- */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.top-bar-left {
  flex: 1 1 260px;
  min-width: 0;
}

.site-name {
  font-size: 24px;
  font-weight: 800;
}

.top-date {
  font-size: 15px;
  color: #55627a;
}

.top-bar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: 0 0 auto;
}

.wbgt-chip {
  font-size: 20px;
  font-weight: 800;
  border-radius: 999px;
  padding: 8px 18px;
  background: #ff9600;
  color: #fff;
  white-space: nowrap;
}

.env-sub {
  font-size: 13px;
  color: #55627a;
  text-align: right;
}

/* ---------- 操作部 ---------- */
.top-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: 8px 0;
}

.pill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
  flex: 1;
  max-height: 620px;
}

.pill {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  border-radius: 32px;
  min-height: 110px;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
  padding: 12px 18px;
  text-align: center;
}

.pill:active {
  transform: scale(0.98);
}

.pill-icon {
  font-size: 34px;
}

.pill-red {
  background: #d93a35;
}

.pill-blue {
  background: #2f80ed;
}

.pill-green {
  background: #27a05a;
}

.pill-orange {
  background: #f2711c;
}

/* 未実装のボタンは淡くし、開発中であることを示す */
.pill-todo {
  opacity: 0.55;
}

.todo-tag {
  position: absolute;
  top: 14px;
  right: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: #55627a;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
}

.timer-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  border: 3px solid #2f80ed;
  border-radius: 999px;
  min-height: 84px;
  font-size: 24px;
  font-weight: 700;
  padding: 10px 18px;
}

.timer-pill strong {
  font-size: 44px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #2f80ed;
}

.timer-pill-note {
  font-size: 13px;
  color: #8a93a5;
  font-weight: 400;
  width: 100%;
  text-align: center;
}

/* ---------- カード・記録 ---------- */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* display 指定が hidden 属性を上書きしないようにする */
.card[hidden] {
  display: none;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #55627a;
}

.log-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  background: #f7f9fc;
  border-radius: 10px;
  padding: 10px 14px;
}

.note {
  font-size: 13px;
  color: #8a93a5;
}

/* ---------- モーダル ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 16px;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.numberpad-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.numberpad-display {
  font-size: 40px;
  font-weight: 800;
  text-align: center;
  min-height: 52px;
}

.numberpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pad-btn {
  font-size: 30px;
  font-weight: 700;
  padding: 16px 0;
  border: none;
  border-radius: 12px;
  background: #eef1f6;
}

.pad-ok {
  background: #0d84ff;
  color: #fff;
}

.pad-ok:disabled {
  opacity: 0.4;
}

.pad-clear {
  background: #ffe3e0;
}

.btn-text {
  background: none;
  border: none;
  color: #0d64c8;
  font-size: 16px;
  padding: 8px;
}

.btn-primary {
  background: #0d84ff;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 700;
  padding: 14px;
}

.todo-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 16px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .timer-pill strong {
    font-size: 34px;
  }

  .pill {
    font-size: 20px;
  }

  .pill-icon {
    font-size: 28px;
  }
}
