/* どんぐりコロコロ時刻表。文字は rem、高さは min-height+padding(UI設計ルール) */
:root {
  --main: #7a4b1e;       /* どんぐりの茶色 */
  --main-dark: #5a3510;
  --main-soft: #f6eee4;
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #5f6368;
  --line: #ddd3c6;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}
.hidden { display: none !important; }

header {
  background: var(--main);
  color: #fff;
  padding: 1rem;
  padding-top: calc(1rem + env(safe-area-inset-top));
  text-align: center;
}
header h1 { font-size: 1.4rem; font-weight: 800; line-height: 1.3; }
header .subTitle { font-size: 0.9rem; opacity: .9; }

main { max-width: 35rem; margin: 0 auto; padding: 1rem; }

.stopBar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.stopLabel { font-size: 1rem; font-weight: 700; color: var(--muted); }
#stopSel {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: 3rem;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0.6rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: 0.75rem;
  background: var(--card);
  color: var(--text);
}

.mapBtn {
  display: block;
  margin-top: 0.9rem;
  min-height: 3rem;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 0.9rem 1rem;
  border: 2px solid var(--main);
  border-radius: 0.9rem;
  background: var(--card);
  color: var(--main-dark);
  text-align: center;
  text-decoration: none;
}
.mapBtn:active { background: var(--main-soft); }

.fareLine { margin: 0.75rem 0 0.25rem; font-size: 1.05rem; text-align: center; }
.fareLine strong { font-size: 1.25rem; color: var(--main-dark); }

.nextCard {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 1rem;
  padding: 1.1rem;
  margin-top: 0.9rem;
  text-align: center;
}
.nextCard.first { border-color: var(--main); border-width: 3px; }
.nextCard .lead { font-size: 1.1rem; color: var(--muted); font-weight: 700; }
.nextCard .countdown { font-size: 3.2rem; font-weight: 900; color: var(--main-dark); line-height: 1.2; }
.nextCard .countdown small { font-size: 1.5rem; font-weight: 800; }
.nextCard.first .countdown { font-size: 4rem; }
.nextCard .depTime { font-size: 1.4rem; font-weight: 700; margin-top: 0.1rem; }
.nextCard .arr { font-size: 1.1rem; margin-top: 0.3rem; }
.nextCard .arr b { color: var(--main-dark); }

.noBus {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 1rem;
  padding: 1.6rem 1.1rem;
  margin-top: 0.9rem;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--muted);
}
.noBus .nextDay { display: block; margin-top: 0.6rem; color: var(--main-dark); font-size: 1.35rem; }

.bigBtn {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  min-height: 3.2rem;
  font-size: 1.3rem;
  font-weight: 800;
  padding: 1rem;
  border: none;
  border-radius: 0.9rem;
  background: var(--main);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}
.bigBtn:active { background: var(--main-dark); }

.backBtn {
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  font-size: 1.1rem;
  font-weight: 800;
  border: 2px solid var(--main);
  border-radius: 0.75rem;
  background: var(--card);
  color: var(--main-dark);
  cursor: pointer;
  font-family: inherit;
}

#ttView h2 { font-size: 1.25rem; margin: 0.9rem 0 0.2rem; text-align: center; }
.ttStop { text-align: center; color: var(--muted); font-weight: 700; margin-bottom: 0.6rem; }

/* 便が少ないので、1便ずつ「発車 → 行き先 着」を1行で見せる */
.ttRow {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.9rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}
.ttRow .dep { font-size: 1.6rem; font-weight: 900; color: var(--main-dark); }
.ttRow .dep small { font-size: 1rem; font-weight: 700; margin-left: 0.15rem; }
.ttRow .to { font-size: 1.05rem; }
.ttRow.passed { opacity: .45; }
.ttRow.next { border: 3px solid var(--main); background: var(--main-soft); }
.ttRow .tag {
  font-size: 0.85rem; font-weight: 800; color: #fff; background: var(--main);
  border-radius: 999px; padding: 0.1rem 0.6rem;
}

.dataNote { margin-top: 1.5rem; font-size: 0.8rem; color: var(--muted); text-align: center; }
.notice {
  margin-bottom: 0.75rem;
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #7a5b00;
  border-radius: 0.6rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
}

.brandCredit {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.5rem 1rem 1.25rem;
}
