h1 {
  font-size: 48px;
  margin: 20px 0 0 0;
}
h2 {
  margin: 15px;
}
body {
  display: flex;
  font-family: sans-serif;
  background-image: url('/static/images/tasks-back.png');
  background-size: cover;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  max-width: 350px;
  margin: 0 auto;
}
form {
  text-align: center;
  width: 100%;
}
input[type='submit'] {
  width: 90%;
  height: 40px;
  margin-top: 20px;
}
p {
  font-size: 15px;
  margin: 3px 0;
  width: 80%;
}
.rounded-button {
  box-shadow: 2px 2px 5px #88aa88;
  border-radius: 30px;
  padding: 5px 5px;
  background-color: white;
  color: navy;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  cursor: pointer;
  border: 1px solid navy;
}
.back-button {
  border-radius: 10px;
  padding: 0px 20px;
  background-color: #9ECDC2;
  border: none;
  color: white;
  text-align: center;
  display: inline-block;
  font-size: 16px;
  cursor: pointer;
}
.btn-back {
  margin-top: 20px;
}
.btn-top {
  margin-top: 10px;
  margin-bottom: 100px;
}

/* ===== 選択画面レイアウト（絞り込み+可変グリッド+ブランド折りたたみ） ===== */
/* PCでは幅に応じてグリッド列数が2→3→4と自動で増える */
body.wide {
  max-width: 760px;
}
.opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  width: 96%;
  margin: 12px auto 0;
}
.opt-grid .opt-btn,
.opt-grid input[type='submit'].opt-btn {
  width: 100%;
  height: auto;
  min-height: 46px;
  margin: 0;
  padding: 6px 4px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.25;
  display: flex;
  align-items: center;
  justify-content: center;
  word-break: break-word;
  font-family: inherit;
}
/* 検索絞り込み（スクロールしても上部に追従） */
.searchbar {
  position: sticky;
  top: 0;
  z-index: 5;
  width: 100%;
  padding: 8px 2%;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #cdd;
  box-sizing: border-box;
  text-align: center;
}
.searchbar input {
  width: 96%;
  font-size: 16px;
  padding: 8px 12px;
  border: 1.5px solid navy;
  border-radius: 10px;
  font-family: inherit;
  box-sizing: border-box;
}
.searchbar .count {
  font-size: 11.5px;
  color: #456;
  margin: 4px 2% 0;
  text-align: left;
}
/* ブランドごとの折りたたみ */
.task-groups {
  width: 96%;
  margin: 4px auto 0;
}
.task-groups .group {
  margin-top: 8px;
}
.ghead {
  width: 100%;
  text-align: left;
  font-size: 15px;
  font-weight: bold;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  border-left: 5px solid navy;
  background: #dde6f4;
  color: navy;
  cursor: pointer;
  box-shadow: 2px 2px 5px #88aa88;
  font-family: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}
.ghead .cnt {
  font-weight: normal;
  font-size: 12.5px;
  color: #56618a;
}
.gopen > .ghead {
  border-radius: 8px 8px 0 0;
}
.gbody {
  display: none;
  padding: 2px 6px 8px;
  border-left: 3px solid #8fa3d0;
  border-right: 1px solid #b9c4e0;
  border-bottom: 1px solid #b9c4e0;
  border-radius: 0 0 8px 8px;
  background: rgba(255, 255, 255, 0.55);
  box-sizing: border-box;
}
.gopen > .gbody {
  display: block;
}
.gopen > .ghead .arrow {
  transform: rotate(180deg);
}
.ghead .arrow {
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.15s;
}

/* timer.html 専用 */
.timer-button {
  box-shadow: 2px 2px 5px #88aa88;
  border-radius: 50%;
  padding: 30px 20px;
  background-color: none;
  border: none;
  color: navy;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 48px;
  cursor: pointer;
}

/* timer.html 入力行（ラベル幅を揃えて入力ボックスの左端を揃える） */
.timer-fields {
  display: inline-block;
  text-align: left;
}
.timer-fields .field-row {
  margin-top: 4px;
}
.timer-fields label {
  display: inline-block;
  width: 95px;
  font-size: 15px;
}
.timer-fields input {
  font-size: 15px;
  width: 100px;
}
