:root {
  --navy: #164A6E; --deep: #0F3049; --teal: #0E9B84; --teal-ink: #0E7C69;
  --bg: #F4F7F9; --ink: #182838; --sub: #4A6072; --line: #C9D6E0; --pale: #E8F0F6; --white: #fff;
  --err: #B3261E;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-size: 16px; line-height: 1.7;
}
a { color: var(--navy); }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px; }
.top { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--sub); margin-bottom: 12px; }
.top .brand { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; }
.card { background: var(--white); border-radius: 16px; padding: 20px 16px; box-shadow: 0 1px 3px rgba(15, 48, 73, .08); }
.ic {
  display: inline-block; width: 1.25em; height: 1.25em; flex: none; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
h1:focus, h2:focus { outline: none; }

.prog { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--sub); margin-bottom: 8px; }
.prog b { color: var(--navy); font-weight: 700; }
.bar { display: flex; gap: 4px; margin-bottom: 18px; }
.bar span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.bar span.on { background: var(--navy); }

.q { font-size: 20px; line-height: 1.5; margin: 0 0 4px; color: var(--deep); }
.note { font-size: 13px; color: var(--sub); margin: 0 0 14px; }
.op {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; text-align: left;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; margin: 0 0 10px;
  color: var(--ink); font: inherit; font-size: 15px; cursor: pointer;
}
.op .ic { color: var(--navy); width: 22px; height: 22px; }
.op .ck { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--navy); white-space: nowrap; visibility: hidden; }
.op[aria-pressed="true"] { border: 3px solid var(--navy); background: var(--pale); padding: 9px 12px; }
.op[aria-pressed="true"] .ck { visibility: visible; }
.op:focus-visible, .btn:focus-visible, .back:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--teal); outline-offset: 2px;
}
.err { color: var(--err); font-weight: 700; font-size: 14px; margin: 6px 0 0; }
.err:empty { margin: 0; }

.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.back { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--navy); font: inherit; font-size: 14px; padding: 10px 4px; cursor: pointer; }
.back.is-hidden { visibility: hidden; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px;
  border: 0; border-radius: 12px; background: var(--navy); color: #fff; font: inherit; font-size: 15px; font-weight: 700;
  padding: 12px 22px; cursor: pointer;
}
.btn.teal { background: var(--teal-ink); }
.btn[disabled] { opacity: .6; cursor: wait; }

textarea {
  width: 100%; min-height: 120px; border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  font: inherit; font-size: 16px; resize: vertical;
}
.count { font-size: 12px; color: var(--sub); text-align: right; margin: 4px 0 0; }

.result { background: var(--deep); color: #fff; border-radius: 14px; padding: 18px 16px; margin-bottom: 18px; }
.result .you { font-size: 13px; color: #BFE9DF; margin: 0; }
.result .name { display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 700; margin: 2px 0 4px; }
.result .name .ic { color: #7FD8C4; width: 28px; height: 28px; }
.result .line { font-size: 14px; color: #DCE7EF; margin: 0; }
.tips-h { font-size: 16px; color: var(--deep); margin: 0 0 10px; }
.tips { list-style: none; margin: 0; padding: 0; }
.tips li { display: flex; gap: 10px; background: var(--bg); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.tips .num { font-weight: 700; color: var(--teal-ink); min-width: 1.2em; }
.tips p { margin: 0; font-size: 15px; }
.tips a { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; margin-top: 2px; }

.notify { border-top: 2px dashed #9FB3C3; margin-top: 18px; padding-top: 16px; }
.notify > p { margin: 0 0 10px; font-size: 14px; }
.notify > p .ic { color: var(--navy); vertical-align: -0.2em; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; }
.small { font-size: 12px; color: var(--sub); margin: 8px 0 0; }
.done { background: var(--pale); border: 2px solid var(--navy); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.done p { margin: 0; }
.done p + p { margin-top: 6px; }

.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; font-size: 12px; color: var(--sub); margin: 20px 0 8px; }

.screen { animation: in .18s ease-out; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }
@media (max-width: 400px) { .row { flex-direction: column; } .row .btn { width: 100%; } }
