/* プリクラ風：ピンク・黄・水色、太い丸文字、黒い太縁とずらした影 */
:root {
  --ink: #1b1340;
  --sub: #5b5478;
  --paper: #ffffff;
  --pink: #ff3d9a;
  --pink-soft: #ffe1f0;
  --cyan: #19c2f0;
  --yellow: #ffe12b;
  --purple: #9b5cf6;
  --green: #12b981;
  --orange: #ff8a1f;
  --red: #e5213f;
  --line: 3px solid var(--ink);
  --pop: 4px 4px 0 var(--ink);
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.6;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle, var(--pink-soft) 3px, transparent 3.5px),
    radial-gradient(circle, #dff6fe 3px, transparent 3.5px);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
}

.num { font-variant-numeric: tabular-nums; }

/* ── 上の帯 ── */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px clamp(16px, 4vw, 32px);
  background: var(--pink);
  border-bottom: var(--line);
}
.logo {
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: .02em;
  -webkit-text-stroke: 6px var(--ink);
  paint-order: stroke fill;
}
.logo span { color: var(--yellow); }
.top nav { display: flex; flex-wrap: wrap; gap: 8px; }
.top nav[hidden], .top nav button[hidden] { display: none; }
.top nav a,
.top nav button {
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  border: var(--line);
  border-radius: 999px;
  padding: 4px 16px;
  text-decoration: none;
  cursor: pointer;
}
.top nav a[aria-current="page"] { background: var(--yellow); }
.top nav a:hover,
.top nav button:hover { translate: 0 -1px; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

main {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
  padding-block: 24px 72px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

h1, h2 { margin: 0; font-weight: 900; line-height: 1.25; text-wrap: balance; }
h1 { font-size: clamp(26px, 4vw, 34px); }
h2 { font-size: 20px; display: flex; align-items: center; gap: 8px; }
h1 mark {
  background: linear-gradient(transparent 58%, var(--yellow) 58%);
  color: inherit;
  padding-inline: 4px;
}

.headline { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 6px 20px; }
.headline p { margin: 0; color: var(--sub); font-size: 13px; }

.banner {
  background: var(--yellow);
  border: var(--line);
  border-radius: 12px;
  padding: 8px 14px;
  font-weight: 700;
}

/* ── 合計の3枚 ── */
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.total {
  border: var(--line);
  border-radius: 18px;
  box-shadow: var(--pop);
  padding: 12px 18px 14px;
  min-width: 0;
  background: var(--c);
  background-image: repeating-linear-gradient(135deg, rgb(255 255 255 / .22) 0 10px, transparent 10px 20px);
}
.total small { display: block; font-weight: 800; font-size: 14px; }
.total strong {
  display: block;
  font-weight: 900;
  font-size: clamp(30px, 4.6vw, 44px);
  line-height: 1.1;
  color: var(--paper);
  -webkit-text-stroke: 6px var(--ink);
  paint-order: stroke fill;
  overflow-wrap: anywhere;
}
.total em { font-style: normal; font-size: 12px; font-weight: 700; }

/* ── 要確認 ── */
.alerts {
  border: var(--line);
  border-color: var(--red);
  border-radius: 16px;
  background: #fff0f2;
  padding: 10px 16px;
}
.alerts h2 { color: var(--red); font-size: 16px; }
.alerts ul { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.alerts li { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.alerts a { color: var(--ink); font-weight: 800; }
.alerts span { color: var(--sub); min-width: 0; overflow-wrap: anywhere; }

/* ── サービスのカード ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
  background: var(--paper);
  border: 3px solid var(--c);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--c);
  transition: translate .12s, box-shadow .12s;
}
.card:hover { translate: -2px -2px; box-shadow: 6px 6px 0 var(--c); }
.card h3 { margin: 0; font-size: 17px; font-weight: 900; display: flex; align-items: center; gap: 8px; line-height: 1.3; }
.card h3 i {
  flex: none;
  font-style: normal;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 18px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c) 22%, white);
}
.card h3 span { min-width: 0; overflow-wrap: anywhere; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.trio div { min-width: 0; padding-inline: 8px; border-left: 2px dotted #cfc9e0; }
.trio div:first-child { padding-left: 0; border-left: 0; }
.trio dt { font-size: 11px; font-weight: 700; color: var(--sub); }
.trio dd { margin: 0; font-size: 17px; font-weight: 800; white-space: nowrap; }
.trio dd small { font-size: 10px; font-weight: 700; color: var(--sub); margin-left: 2px; }
.trend { display: flex; align-items: end; gap: 10px; margin-top: auto; }
.trend svg { flex: 1; min-width: 0; height: 44px; }
.trend .empty { flex: 1; font-size: 12px; color: var(--sub); align-self: center; }
.chip {
  flex: none;
  font-weight: 900;
  font-size: 14px;
  padding: 2px 10px;
  border: 2px solid currentColor;
  border-radius: 10px;
  background: var(--paper);
  white-space: nowrap;
}
.chip.up { color: var(--green); }
.chip.down { color: var(--red); }
.chip.flat { color: var(--sub); }
.sticker {
  position: absolute;
  top: -12px;
  right: -8px;
  rotate: 8deg;
  background: var(--red);
  color: var(--paper);
  font-weight: 900;
  font-size: 13px;
  padding: 3px 12px;
  border: var(--line);
  border-radius: 999px;
}

.quiet { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.quiet a {
  display: block;
  color: var(--sub);
  font-weight: 700;
  text-decoration: none;
  background: var(--paper);
  border: 2px dashed #bcb5d3;
  border-radius: 999px;
  padding: 2px 14px;
}
.note { color: var(--sub); font-size: 13px; margin: 0; }

/* ── ログイン ── */
.login { align-items: center; text-align: center; padding-block: 8vh; }
.login .box {
  max-width: 420px;
  width: 100%;
  background: var(--paper);
  border: var(--line);
  border-radius: 24px;
  box-shadow: 6px 6px 0 var(--pink);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login p { margin: 0; color: var(--sub); }
.btn {
  font: inherit;
  font-weight: 900;
  font-size: 16px;
  color: var(--ink);
  background: var(--yellow);
  border: var(--line);
  border-radius: 999px;
  box-shadow: var(--pop);
  padding: 10px 20px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { translate: -1px -1px; }
.btn.sub { background: var(--paper); box-shadow: none; font-size: 14px; }
.error { color: var(--red); font-weight: 800; }

/* ── 詳細 ── */
.back { color: var(--ink); font-weight: 800; }
.panels { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.panel {
  min-width: 0;
  background: var(--paper);
  border: 3px solid var(--c);
  border-radius: 16px;
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.panel h3 { margin: 0; font-size: 14px; font-weight: 800; color: var(--sub); }
.panel strong { font-size: 26px; font-weight: 900; line-height: 1.2; }
.panel strong small { font-size: 12px; color: var(--sub); margin-left: 6px; font-weight: 700; }
.panel svg { width: 100%; height: 70px; }
.panel footer { display: flex; justify-content: space-between; font-size: 11px; color: var(--sub); }
.table { overflow-x: auto; background: var(--paper); border: var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th, td { padding: 8px 12px; text-align: right; white-space: nowrap; }
th { font-size: 12px; color: var(--sub); background: var(--pink-soft); }
td { border-top: 2px dotted #e3deef; }
th:first-child, td:first-child { text-align: left; white-space: normal; min-width: 200px; }
td a { color: var(--ink); font-weight: 700; }
.ok { color: var(--green); font-weight: 800; }
.fail { color: var(--red); font-weight: 800; }

@media (prefers-reduced-motion: reduce) { .card { transition: none; } }

/* ── 入力とつなぐ ── */
.welcome, .form, .keybox, .ask {
  background: var(--paper);
  border: var(--line);
  border-radius: 16px;
  padding: 14px 16px;
}
.welcome { box-shadow: 6px 6px 0 var(--cyan); display: flex; flex-direction: column; gap: 12px; }
.welcome p { margin: 0; max-width: 62ch; }
.welcome .form { border: 0; padding: 0; }
.form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; }
.form[hidden] { display: none; }
.form label { display: flex; flex-direction: column; gap: 2px; flex: 1 1 220px; min-width: 0; font-size: 13px; font-weight: 800; }
.form label.narrow { flex: 0 1 110px; }
.form input, .form select {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 6px 10px;
  min-width: 0;
  width: 100%;
}
.form .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1 1 100%; }
.form .error, .headline .btn { margin: 0; }
.keybox { border-color: var(--green); box-shadow: 5px 5px 0 var(--green); display: flex; flex-direction: column; align-items: start; gap: 8px; }
.keybox h3 { margin: 6px 0 0; font-size: 16px; font-weight: 900; }
.keybox p { margin: 0; }
pre {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  background: #f4f1fb;
  border: 2px dotted #bcb5d3;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  align-self: stretch;
}
.ask { display: flex; flex-direction: column; gap: 8px; }
.ask summary { font-weight: 800; cursor: pointer; }
.ask[open] summary { margin-bottom: 8px; }
.ask .btn { margin-top: 8px; }
.link { font: inherit; font-weight: 800; color: var(--ink); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.link.danger { color: var(--red); }
td:last-child { text-align: right; }

/* ── 送り方の説明 ── */
.doc { max-width: 820px; }
.doc h2 { margin-top: 12px; }
.doc p, .doc li { max-width: 68ch; }
.doc p, .doc ul { margin: 0; }
.doc code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .92em; background: #f4f1fb; border-radius: 4px; padding: 1px 5px; }
.doc pre code { background: none; padding: 0; }
.doc th:first-child, .doc td:first-child { min-width: 0; white-space: nowrap; }
.doc td { white-space: normal; text-align: left; }
.doc th { text-align: left; }
