/* 全ページ共通のデザイン（TOP・成長ページ・管理ページ） */
:root {
  --deep: #0b3d4f;
  --deep2: #12607a;
  --aqua: #1fb5c9;
  --foam: #eaf8fa;
  --ink: #17303a;
  --muted: #5d7480;
  --line: #d5e6ea;
  --warn: #ff7a59;
  --ok: #1c9a6c;
  --card: #ffffff;
  --bg: #f5fbfc;
  --wrap-w: 880px;
}
* {
  box-sizing: border-box;
}
/* hidden 属性は、display を指定したクラス（.login など）より弱い。必ず効くようにする */
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.7;
}
a {
  color: var(--deep2);
}
.wrap {
  max-width: var(--wrap-w, 880px);
  margin: 0 auto;
  padding: 0 16px;
}

/* ヒーロー */
.hero {
  background: linear-gradient(180deg, var(--deep), var(--deep2));
  color: #fff;
  padding: 40px 0 76px;
  position: relative;
  overflow: hidden;
}
.hero.compact {
  padding: 28px 0 64px;
}
.hero .eyebrow {
  font-size: 13px;
  letter-spacing: 0.12em;
  opacity: 0.8;
  margin: 0 0 8px;
}
.hero h1 {
  line-height: 1.35;
  margin: 0 0 12px;
  font-weight: 700;
}
.hero p {
  margin: 0;
  max-width: 34em;
  opacity: 0.92;
}
.wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 44px;
  display: block;
}

main {
  margin-top: -30px;
  padding-bottom: 48px;
  position: relative;
}
.stack {
  display: grid;
  gap: 16px;
}
.grid2 {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .grid2 {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(11, 61, 79, 0.06);
}
.card h2 {
  font-size: 17px;
  margin: 0 0 12px;
  line-height: 1.5;
}
.card h2 .en {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--aqua);
  margin-left: 8px;
  font-weight: 500;
}
.tag {
  font-size: 12px;
  background: var(--foam);
  color: var(--deep);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 500;
  display: inline-block;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  background: var(--deep);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  width: 100%;
  min-height: 48px;
  align-content: center;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}
.btn:hover {
  background: #0e4a5f;
}
.btn:disabled {
  background: #b7c6cc;
  cursor: not-allowed;
}
.btn.sub {
  background: var(--foam);
  color: var(--deep);
}
.btn.sub:hover {
  background: #d8f0f4;
}
.btn.warn {
  background: #fff1ed;
  color: #c2371a;
}
.btn.auto {
  width: auto;
}
.btn.sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 9px;
}

.state {
  text-align: center;
  padding: 48px 0;
  color: var(--muted);
}
.notice {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--muted);
}
.demo {
  background: #fff6d6;
  color: #7a5b00;
  font-size: 12px;
  text-align: center;
  padding: 6px;
}
footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 24px 16px 40px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 12px 0 4px;
}
label .req {
  color: var(--warn);
  margin-left: 4px;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 11px 12px;
  border: 1px solid #bcd3d9;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--aqua);
  border-color: var(--aqua);
}
input:disabled {
  background: #f0f5f6;
  color: var(--muted);
}
textarea {
  min-height: 84px;
  resize: vertical;
}
.hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.err {
  color: #c2371a;
  background: #fff1ed;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  margin-top: 12px;
}

/* 暗証番号の入力画面 */
.pin {
  max-width: 420px;
  margin: 24px auto 0;
  text-align: center;
}
.pin .pin-in {
  width: 100%;
  max-width: 260px;
  text-align: center;
  font-size: 26px;
  letter-spacing: 0.4em;
  height: 56px;
  margin: 8px auto 0;
}
.pin .pin-err {
  color: #c2371a;
  font-size: 14px;
  min-height: 1.6em;
  margin: 8px 0;
}
.pin .btn {
  max-width: 260px;
  margin: 0 auto;
}
.pin .help {
  font-size: 13px;
  color: var(--muted);
}

/* キーボード操作のときの枠（見やすさ） */
.btn:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(31, 181, 201, 0.55);
  outline-offset: 2px;
}
.tag,
.stat b,
.tile b,
td,
th {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   画面幅ごとの見た目（基準：520 / 960 / 1920）
   〜519 スマホ（縦）
   520〜 スマホ（横）・タブレット
   960〜 パソコン
   1920〜 大きなディスプレイ（全体を少し大きく表示）
   ============================================================ */
@media (min-width: 520px) {
  :root {
    --wrap-w: 760px;
  }
  .wrap {
    padding: 0 24px;
  }
  .hero {
    padding: 52px 0 88px;
  }
  .hero.compact {
    padding: 34px 0 72px;
  }
  .card {
    padding: 24px;
    border-radius: 20px;
  }
  .stack,
  .grid2 {
    gap: 20px;
  }
  .card h2 {
    font-size: 18px;
  }
  footer {
    font-size: 13px;
  }
}
@media (min-width: 960px) {
  :root {
    --wrap-w: 1120px;
  }
  .wrap {
    padding: 0 32px;
  }
  .hero {
    padding: 64px 0 104px;
  }
  .hero.compact {
    padding: 40px 0 84px;
  }
  .hero h1 {
    font-size: clamp(34px, 3.4vw, 46px);
  }
  .hero p {
    font-size: 17px;
  }
  main {
    margin-top: -44px;
  }
  .card {
    padding: 28px;
  }
  .card h2 {
    font-size: 19px;
    margin-bottom: 14px;
  }
  /* 成長ページ：カードを2列に並べる（最初のカードと、ひと言は横いっぱい） */
  .stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 24px;
  }
  .stack > :first-child,
  .stack > .thanks,
  .stack > p {
    grid-column: 1 / -1;
  }
  .steps {
    grid-template-columns: 1fr 1fr;
    column-gap: 36px;
  }
  .btn:hover {
    transform: translateY(-1px);
  }
}
@media (min-width: 1920px) {
  :root {
    --wrap-w: 1280px;
  }
  html {
    zoom: 1.25;
  }
}

/* 読み込み中の表示 */
.spin {
  display: inline-block;
  width: 26px;
  height: 26px;
  border: 3px solid var(--line, #d9e2ea);
  border-top-color: var(--deep2, #0b6e99);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin: 0 auto 10px;
  display: block;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spin {
    animation-duration: 2.4s;
  }
}
.busybar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 100;
  background: linear-gradient(
    90deg,
    transparent,
    var(--deep2, #0b6e99),
    transparent
  );
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: busy 1s ease-in-out infinite;
}
.busybar[hidden] {
  display: none;
}
@keyframes busy {
  from {
    background-position: -40% 0;
  }
  to {
    background-position: 140% 0;
  }
}

/* 機能が1つだけのとき：全体の最大幅を640pxにそろえる（文字は左寄せ。フッターだけ中央）。
   ページ側が <html class="solo"> を付けると有効になります。 */
:root.solo {
  --wrap-w: 640px;
}
.stack.one {
  grid-template-columns: minmax(0, 1fr);
}
