/* 元のシート (グレーの紙にマゼンタ1色刷り) をそのままWebにする */
:root {
  --pink: #FF34C1;
  --pink-deep: #e01ea6;
  --pink-pale: rgba(255, 52, 193, .16);
  --bg: #E2E3E5;
  --line: 4px;
  --round: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --num: Arial, "Helvetica Neue", Helvetica, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--pink);
  font-family: var(--round);
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.paper { max-width: 780px; margin: 0 auto; padding: 18px 16px 36px; }

/* -- 上の ✕✕✕✕✕ (1 / 3) ✕✕✕✕✕ -- */
.pagebar { display: flex; align-items: center; justify-content: center; gap: 12px; }
.xs {
  flex: 1;
  height: 24px;
  max-width: 190px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 24'%3E%3Cpath d='M5 3l18 18M23 3L5 21' stroke='%23FF34C1' stroke-width='5.6' stroke-linecap='round'/%3E%3C/svg%3E") left center / 20% 100% repeat-x;
}
.pill {
  flex: 0 1 46%;
  min-width: 132px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  text-align: center;
  font: 800 15px/1 var(--num);
  letter-spacing: .32em;
  padding: 9px 0 9px .32em;
  white-space: nowrap;
}

/* -- 左右の縦の帯 -- */
.frame { position: relative; margin-top: 20px; padding: 2px 34px 26px; }
.frame::before, .frame::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  border-radius: 6px;
  background: var(--pink);
}
.frame::before { left: 0; }
.frame::after { right: 0; }

.kicker { margin: 4px 0 0; text-align: center; font-size: 14px; font-weight: 800; letter-spacing: .5em; padding-left: .5em; }
.logo {
  margin: 0 0 20px;
  text-align: center;
  font-family: var(--mincho);
  font-weight: 800;
  font-size: clamp(46px, 12.5vw, 88px);
  line-height: 1.15;
  letter-spacing: -.01em;
}
.logo a { position: relative; display: inline-block; text-decoration: none; }
.logo .no { font-size: .74em; margin: 0 .02em; }
.logo .two { font-size: 1.2em; line-height: 1; margin: 0 .04em 0 .02em; }
.logo .tick { position: absolute; width: .44em; left: 55.5%; top: .02em; }

/* -- 問題の行 -- */
.row { margin: 0 0 14px; }
.qhead {
  background: var(--pink);
  color: #fff;
  text-align: center;
  font: 700 21px/1 var(--num);
  padding: 6px 0 5px;
  letter-spacing: .02em;
}
.qbody {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: var(--line) solid var(--pink);
  border-top: 0;
}
.opt {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "txt box" "res box";
  align-items: center;
  column-gap: 16px;
  padding: 14px 8px 14px 14px;
  margin: 0;
  border: 0;
  background: none;
  text-align: center;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.opt + .opt {
  grid-template-columns: auto 1fr;
  grid-template-areas: "box txt" "box res";
  padding: 14px 14px 14px 8px;
}
.opt .txt { grid-area: txt; font-size: 16px; line-height: 1.55; }
.opt .box { grid-area: box; position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; align-self: center; }
.opt .box b { font: 700 18px/1 var(--num); }
.opt .box::after {
  content: "";
  display: block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--pink);
  transition: background-color .15s;
}
.opt .box .tick { position: absolute; width: 40px; left: 2px; bottom: 6px; overflow: visible; animation: draw .28s ease-out both; }
.opt .box .tick path { stroke-dasharray: 60; stroke-dashoffset: 0; }
@keyframes draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

button.opt:hover .box::after, button.opt:focus-visible .box::after { background: var(--pink-pale); }
button.opt:focus-visible { outline: 3px dashed var(--pink); outline-offset: -6px; }
.opt.chosen .txt .m {
  background: linear-gradient(transparent 60%, rgba(255, 52, 193, .26) 0);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.answered .opt:not(.chosen) .txt, .done .opt:not(.chosen) .txt { opacity: .55; }
.answered button.opt { cursor: default; }
.answered button.opt:hover .box::after { background: none; }

.opt .res { grid-area: res; display: none; flex-direction: column; align-items: center; gap: 5px; margin-top: 8px; }
.answered .res, .done .res { display: flex; }
.pct { font-family: var(--mincho); font-size: 38px; line-height: 1; font-weight: 800; }
.pct small { font-size: .5em; margin-left: 1px; }
.bar { display: block; width: 100%; max-width: 190px; height: 10px; border: 2px solid var(--pink); }
.bar i { display: block; height: 100%; width: 0; background: var(--pink); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.done .opt .pct { font-size: 26px; }
.done .opt .bar { height: 8px; max-width: 150px; }

/* 回答後の下半分 */
.after { margin-top: 6px; animation: rise .3s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.verdict { margin: 14px 0 4px; text-align: center; font-size: 17px; }
.verdict b { font-size: 1.35em; background: linear-gradient(transparent 60%, rgba(255, 52, 193, .26) 0); padding: 0 .1em; }
.verdict .n { display: block; font-size: 13px; margin-top: 4px; opacity: .8; }
.bt { margin: 16px 0 6px; text-align: center; font-size: 14px; letter-spacing: .1em; }
.bt small { display: block; font-size: 11.5px; letter-spacing: 0; opacity: .8; margin-top: 2px; }

/* -- 性別・年代別の表 (左:男性 右:女性 / 縦:年代) -- */
.breakdown { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.breakdown th, .breakdown td { border: 2px solid var(--pink); padding: 7px 10px; text-align: center; vertical-align: middle; }
.breakdown thead th { background: var(--pink); color: #fff; font-size: 14px; padding: 5px; letter-spacing: .3em; }
.breakdown thead th:first-child { background: none; border-top-color: transparent; border-left-color: transparent; }
.breakdown tbody th { width: 5.2em; font-size: 13.5px; }
.breakdown td.me { background: var(--pink-pale); }
.breakdown td.me::before { content: "あなた"; display: block; font-size: 10px; letter-spacing: .1em; margin: -3px 0 2px; }
.split { display: block; height: 8px; background: rgba(255, 52, 193, .22); }
.split i { display: block; height: 100%; background: var(--pink); }
.ratio { display: block; margin-top: 4px; font-size: 15px; font-family: var(--num); font-weight: 700; white-space: nowrap; }
.ratio b { font-size: 10px; margin: 0 4px; vertical-align: 1px; }
.ratio em { font-style: normal; margin: 0 2px; }
.breakdown small { display: block; font-size: 11px; opacity: .75; }
.none { opacity: .45; }

/* -- ボタン -- */
.go {
  display: block;
  min-width: 220px;
  margin: 20px auto 0;
  padding: 14px 36px 14px calc(36px + .24em);
  border: 3px solid var(--pink);
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font: 800 17px/1.2 var(--round);
  letter-spacing: .24em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, transform .08s;
}
.go:hover { background: var(--pink-deep); border-color: var(--pink-deep); }
.go:active { transform: translateY(1px); }
.go:disabled { opacity: .5; cursor: default; }
.go.ghost { background: transparent; color: var(--pink); }
.go.ghost:hover { background: var(--pink-pale); }
.go.small { display: inline-block; min-width: 0; margin: 0; padding: 5px 12px; font-size: 13px; letter-spacing: .05em; border-width: 2px; }

/* -- はじめの画面 -- */
.lead { margin: 4px 0 18px; text-align: center; font-size: 17px; line-height: 1.8; }
.who { border: var(--line) solid var(--pink); }
.who-h { background: var(--pink); color: #fff; text-align: center; font-size: 14px; padding: 6px 0 5px; letter-spacing: .2em; }
.field { display: grid; grid-template-columns: 4.2em 1fr; align-items: center; gap: 10px; padding: 12px 16px; }
.field + .field { border-top: 2px solid var(--pink); }
.flabel { font-size: 15px; letter-spacing: .2em; }
.seg { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.seg button { display: inline-flex; align-items: center; gap: 7px; padding: 5px 2px; border: 0; background: none; font-size: 16px; font-weight: 700; cursor: pointer; }
.cb { position: relative; width: 22px; height: 22px; border: 3px solid var(--pink); flex: none; }
.seg button:hover .cb { background: var(--pink-pale); }
.seg .on .cb::after {
  content: "";
  position: absolute;
  left: -1px;
  bottom: 2px;
  width: 26px;
  height: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M6 21l9 10L37 3' fill='none' stroke='%23FF34C1' stroke-width='5.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.note { margin: 0; padding: 0 16px 12px; font-size: 12px; opacity: .8; font-weight: 500; }
.count { margin: 16px 0 0; text-align: center; font-size: 14px; }
.count b { font-family: var(--mincho); font-size: 22px; margin: 0 2px; }
.resume { margin-top: 18px; text-align: center; border: 2px dashed var(--pink); padding: 12px 10px 14px; }
.resume p { margin: 0; font-size: 15px; }
.resume .go { margin-top: 10px; }

/* -- 画面の切り替え (Googleのログインのように問題の部分だけ) -- */
.stage { position: relative; min-height: 260px; }
.stage::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 4px;
  background: linear-gradient(90deg, transparent 0, var(--pink) 30%, var(--pink) 70%, transparent 100%) -40% 0 / 40% 100% no-repeat;
  opacity: 0;
  transition: opacity .15s;
}
.stage.busy::before { opacity: 1; animation: sweep .9s linear infinite; }
.stage.busy { pointer-events: none; }
@keyframes sweep { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.slide.out { animation: out .2s ease-in forwards; }
.slide.in { animation: in .26s ease-out both; }
@keyframes out { to { opacity: 0; transform: translateX(-32px); } }
@keyframes in { from { opacity: 0; transform: translateX(32px); } }
@media (prefers-reduced-motion: reduce) {
  .slide.out, .slide.in, .after { animation-duration: .01s; }
  .bar i { transition: none; }
}

/* -- 結果 -- */
.summary { text-align: center; margin: -4px 0 16px; }
.summary .sl { margin: 0; font-size: 15px; letter-spacing: .3em; padding-left: .3em; }
.summary .big { margin: 0; line-height: 1; }
.summary .big b { font-family: var(--mincho); font-size: 92px; font-weight: 800; }
.summary .big span { font-size: 22px; margin-left: 6px; }
.rare { margin: 10px auto 0; font-size: 14px; line-height: 1.6; border: 2px dashed var(--pink); padding: 8px 12px; max-width: 520px; }
.rare .rq { font-family: var(--num); margin-right: 4px; }
.rare .rp { font-family: var(--mincho); font-size: 20px; margin-left: 6px; }
.share { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 24px; }
.share .go { margin: 0; min-width: 170px; }
.share.bottom { margin: 26px 0 0; }
.again-row .go { margin-top: 14px; }
.sheet .pagebar.inner { margin: 24px 0 18px; }
.done .qbody { border-bottom-width: 0; }
.more { border: var(--line) solid var(--pink); border-top: 2px dashed var(--pink); }
.more summary { list-style: none; cursor: pointer; text-align: center; font-size: 13px; padding: 6px 8px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+ "; }
.more[open] summary::before { content: "- "; }
.more summary .n { opacity: .75; font-size: 12px; }
.more .breakdown { width: calc(100% - 20px); margin: 2px 10px 12px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: var(--pink);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 10;
  animation: rise .2s ease both;
}

.foot { margin-top: 18px; text-align: center; font-size: 12px; font-weight: 500; line-height: 1.7; opacity: .9; }
.foot p { margin: 0; }

/* -- 管理 -- */
.atitle { text-align: center; font-size: 24px; letter-spacing: .3em; margin: 6px 0 18px; }
.ahead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ahead .atitle { margin: 6px 0 14px; }
.login { text-align: center; }
.login input { display: block; width: min(320px, 100%); margin: 0 auto; padding: 12px 14px; border: 3px solid var(--pink); background: #fff; color: var(--pink); font: 700 16px var(--round); outline: none; }
.err { font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.tile { border: var(--line) solid var(--pink); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tile span { font-size: 12.5px; }
.tile b { font-family: var(--mincho); font-size: 34px; line-height: 1.1; }
.tile em { font-style: normal; font-size: 12px; opacity: .8; }
.asub { margin: 26px 0 8px; font-size: 16px; border-bottom: 3px solid var(--pink); padding-bottom: 4px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .b1 { fill: rgba(255, 52, 193, .32); }
.chart .b2 { fill: var(--pink); }
.chart .axis { stroke: var(--pink); stroke-width: 2; }
.chart .ax { fill: var(--pink); font: 600 11px var(--round); text-anchor: middle; }
.chart .ax.r { text-anchor: end; }
.legend { font-size: 12px; margin: 4px 0 0; }
.legend i { display: inline-block; width: 12px; height: 12px; margin: 0 4px -1px 10px; }
.legend .l1 { background: rgba(255, 52, 193, .32); }
.legend .l2 { background: var(--pink); }
.atable { width: 100%; border-collapse: collapse; font-size: 13px; }
.atable th, .atable td { border: 2px solid var(--pink); padding: 5px 7px; text-align: center; }
.atable thead th { background: var(--pink); color: #fff; }
.atable.qs td { text-align: left; font-weight: 500; }
.atable.qs td.qa { text-align: right; }
.atable.qs td.sp { width: 120px; text-align: center; font-family: var(--num); white-space: nowrap; }
.atable.qs .split { margin-bottom: 3px; }
.comments { list-style: none; margin: 0; padding: 0; }
.comments li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 2px solid var(--pink-pale); font-size: 14px; }
.comments li a { font-family: var(--num); font-size: 12px; white-space: nowrap; }
.comments li span { flex: 1; font-weight: 500; word-break: break-word; }
.comments li.hidden span { text-decoration: line-through; opacity: .5; }
.comments li.none { justify-content: center; opacity: .6; }

/* -- スマホ -- */
@media (max-width: 600px) {
  .paper { padding: 12px 10px 28px; }
  .pagebar { gap: 8px; }
  .xs { height: 18px; }
  .pill { font-size: 13px; padding: 7px 0 7px .32em; }
  .frame { padding: 0 20px 22px; margin-top: 14px; }
  .frame::before, .frame::after { width: 8px; border-radius: 4px; }
  .kicker { font-size: 12px; letter-spacing: .35em; }
  .logo { margin-bottom: 14px; }
  .qhead { font-size: 18px; padding: 5px 0 4px; }
  .qbody { grid-template-columns: 1fr; }
  .opt, .opt + .opt {
    grid-template-columns: auto 1fr;
    grid-template-areas: "box txt" "box res";
    text-align: left;
    padding: 14px 12px;
    column-gap: 14px;
  }
  .opt + .opt { border-top: 2px solid var(--pink); }
  .opt .res { align-items: stretch; flex-direction: row-reverse; justify-content: flex-end; gap: 10px; }
  .opt .res .bar { align-self: center; max-width: none; flex: 1; }
  .pct { font-size: 30px; min-width: 2.5em; text-align: right; }
  .done .opt .pct { font-size: 22px; }
  .done .opt .txt { font-size: 14.5px; }
  .opt .txt br { display: none; }
  .breakdown th, .breakdown td { padding: 6px 5px; }
  .ratio { font-size: 13.5px; }
  .ratio b { margin: 0 2px; }
  .field { grid-template-columns: 1fr; gap: 4px; padding: 10px 12px; }
  .summary .big b { font-size: 76px; }
  .go { min-width: 200px; }
  .share .go { min-width: 0; flex: 1 1 40%; padding-left: 14px; padding-right: 14px; letter-spacing: .1em; }
  .more .breakdown { width: calc(100% - 12px); margin: 2px 6px 10px; }
}

/* 管理: 期間の切り替えと累計線 */
.tabs { display: inline-flex; border: 3px solid var(--pink); border-radius: 999px; overflow: hidden; margin: 2px 0 6px; }
.tabs a { padding: 6px 18px; font-size: 14px; text-decoration: none; }
.tabs a + a { border-left: 3px solid var(--pink); }
.tabs a.on { background: var(--pink); color: #fff; }
.ptotal { margin: 4px 0 6px; font-size: 13px; }
.ptotal b { font-family: var(--mincho); font-size: 18px; }
.chart .ax.l { text-anchor: start; }
.chart .cum { fill: none; stroke: #8a1a69; stroke-width: 2.5; stroke-linejoin: round; }
.legend .l3 { height: 3px; margin-bottom: 3px; background: #8a1a69; }

/* -- AI レビュー -- */
.ai { margin-top: 24px; }
.ai .qhead { font-family: var(--round); font-weight: 800; font-size: 17px; letter-spacing: .2em; padding: 8px 0 7px .2em; }
.ai-body { border: var(--line) solid var(--pink); border-top: 0; border-bottom: 0; padding: 14px 16px 4px; text-align: center; }
.ai-lead { margin: 0; font-size: 14.5px; line-height: 1.7; }
.ai-body .go { margin-top: 14px; }
.ai-note { min-height: 1em; margin: 10px 0 6px; font-size: 13px; }
.ai-out {
  border: var(--line) solid var(--pink);
  border-top: 2px dashed var(--pink);
  min-height: 160px;
  padding: 14px 18px;
  font-size: 15px;
  line-height: 27px;
  white-space: pre-wrap;
  word-break: break-word;
  background-image: repeating-linear-gradient(transparent 0 26px, rgba(255, 52, 193, .28) 26px 27px);
  background-position: 0 13px;
  background-origin: content-box;
}
.ai-ph { opacity: .5; }
.caret { display: inline-block; width: .55em; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--pink); animation: blink .9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 600px) {
  .ai-lead br { display: none; }
  .ai-out { padding: 12px 12px; font-size: 14.5px; }
}
.budget { margin: 0 0 10px; }
.bt2 { font-size: 14px; margin-bottom: 4px; }
.bt2 b { font-family: var(--mincho); font-size: 22px; }
.split.big { height: 14px; border: 2px solid var(--pink); }
.aact { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
