/* layout: 1 column card stack, pastel sky + gold accent, single theme by choice */
:root {
  --sky: #eaf7fc;
  --blue: #ccebf6;
  --blue2: #8ec8df;
  --ink: #426b80;
  --yellow: #fff2bd;
  --gold: #d8b64f;
  --white: #fff;
  --muted: #6f8f9e;
  --line: #dcecf1;
  --warn: #b0663c;
  --warnbg: #fff1e6;
  color-scheme:light;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  background:linear-gradient(145deg,#f5fbfd,#fff9e9 70%,#f1f9fc);
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;
  min-height:100vh;
}

button {
  font:inherit;
  cursor:pointer;
}

button:focus-visible {
  outline:3px solid #e3bf57;
  outline-offset:3px;
}

.wrap {
  width:min(760px,calc(100% - 28px));
  margin:0 auto;
  padding:26px 0 56px;
}

.top {
  text-align:center;
  padding:24px 16px 20px;
  background:linear-gradient(135deg,#e8f7fc,#fff9e5);
  border:1px solid #e1eff2;
  border-radius:28px;
  position:relative;
  overflow:hidden;
}

.top:before, .top:after {
  content:"✦";
  position:absolute;
  color:#e5c75f;
  font-size:30px;
  opacity:.65;
}

.top:before {
  left:8%;
  top:20px;
}

.top:after {
  right:9%;
  bottom:18px;
}

.kicker {
  letter-spacing:.18em;
  font-size:11px;
  color:#6d9bb0;
  font-weight:700;
}

.top h1 {
  font-size:clamp(25px,6vw,38px);
  line-height:1.35;
  margin:13px 0 8px;
  color:#426b80;
  text-wrap:balance;
}

.top p {
  margin:0;
  color:#68889a;
  font-size:14px;
  line-height:1.8;
}

.pills {
  display:flex;
  justify-content:center;
  gap:7px;
  flex-wrap:wrap;
  margin-top:17px;
}

.pill {
  background:#fff;
  border:1px solid #e8e6ce;
  border-radius:99px;
  padding:6px 11px;
  font-size:11px;
  color:#8a7638;
}

.panel {
  background:rgba(255,255,255,.94);
  border:1px solid var(--line);
  border-radius:24px;
  padding:clamp(20px,5vw,34px);
  margin-top:18px;
  box-shadow:0 10px 30px rgba(87,142,164,.07);
}

h2 {
  font-size:21px;
  margin:0 0 12px;
  color:#426b80;
}

h3 {
  font-size:17px;
  margin:28px 0 12px;
  color:#426b80;
}

.sub {
  font-size:13px;
  line-height:1.8;
  color:var(--muted);
}

.primary, .secondary {
  border:0;
  border-radius:999px;
  padding:14px 25px;
  font-weight:700;
  transition:.2s;
}

.primary {
  background:linear-gradient(90deg,#bfe5f2,#fff0b6);
  color:#426b80;
  box-shadow:0 5px 14px #cde6ec;
}

.primary:hover {
  transform:translateY(-2px);
}

.secondary {
  background:#f2f8fa;
  color:#55798b;
  border:1px solid #dcecf1;
}

.secondary:disabled {
  opacity:.4;
  cursor:default;
}

.center {
  text-align:center;
}

.start-actions {
  margin-top:24px;
}

.progress-head {
  display:flex;
  justify-content:space-between;
  font-size:12px;
  color:#6f8f9e;
  margin-bottom:9px;
  font-variant-numeric:tabular-nums;
}

.track {
  height:8px;
  background:#edf4f5;
  border-radius:20px;
  overflow:hidden;
}

.bar {
  height:100%;
  width:0;
  background:linear-gradient(90deg,#9ed3e6,#f2d982);
  transition:width .25s;
}

.axis {
  display:inline-block;
  margin:18px 0 10px;
  padding:6px 12px;
  border-radius:99px;
  background:#fff6d8;
  color:#8a7230;
  font-size:12px;
  font-weight:700;
}

.question {
  font-size:clamp(19px,4.5vw,24px);
  line-height:1.55;
  margin:7px 0 22px;
  text-wrap:balance;
}

.choices {
  display:grid;
  gap:10px;
}

.choice {
  width:100%;
  text-align:left;
  background:#f8fcfd;
  border:1px solid #dfedf1;
  border-radius:15px;
  padding:15px 16px;
  color:#4b7083;
  display:flex;
  align-items:flex-start;
  gap:12px;
  line-height:1.55;
  font-size:14px;
}

.choice:hover {
  background:#f1f9fc;
  border-color:#abd8e7;
}

.choice.on {
  border-color:#9bcfe0;
  background:#eef9fc;
}

.choice .num {
  flex:none;
  width:27px;
  height:27px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#e7f4f8;
  color:#55879b;
  font-size:12px;
  font-weight:700;
}

.nav {
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:22px;
}

.nav button {
  min-width:110px;
}

.result-name {
  font-size:clamp(27px,7vw,40px);
  margin:8px 0;
  color:#426b80;
}

.result-unit {
  color:#8d7433;
  font-weight:700;
  font-size:13px;
}

.type {
  display:inline-block;
  background:#fff4cc;
  color:#7f6a2c;
  border-radius:99px;
  padding:8px 16px;
  font-weight:800;
  letter-spacing:.12em;
  margin:14px 0;
}

.score-list {
  display:grid;
  gap:14px;
  margin:22px 0;
}

.score-row {
  display:grid;
  grid-template-columns:78px 1fr 42px;
  gap:10px;
  align-items:center;
  font-size:12px;
  font-variant-numeric:tabular-nums;
}

.score-track {
  height:9px;
  border-radius:20px;
  background:#eef4f5;
  overflow:hidden;
}

.score-fill {
  height:100%;
  background:linear-gradient(90deg,#a8d8e8,#f0d77d);
  border-radius:20px;
}

.flaws {
  display:grid;
  gap:10px;
}

.flaw {
  background:var(--warnbg);
  border-radius:14px;
  padding:12px 14px;
  font-size:13px;
  line-height:1.7;
  color:#7d4b2a;
}

.flaw b {
  display:block;
  font-size:12px;
  color:var(--warn);
  margin-bottom:2px;
}

.rank {
  display:grid;
  grid-template-columns:36px 1fr auto;
  align-items:center;
  gap:10px;
  padding:12px 0;
  border-bottom:1px solid #edf2f3;
}

.rank:last-child {
  border:0;
}

.rank-no {
  width:30px;
  height:30px;
  border-radius:50%;
  background:#fff5d4;
  color:#7f6a2c;
  display:grid;
  place-items:center;
  font-weight:800;
}

.rank small {
  display:block;
  color:#6f8a97;
  margin-top:3px;
}

.rank b {
  font-size:14px;
}

.rank-score {
  font-weight:800;
  color:#5f90a4;
  font-size:13px;
  font-variant-numeric:tabular-nums;
}

.worst {
  background:#f3f6f8;
  border-radius:14px;
  padding:12px 14px;
  font-size:13px;
  line-height:1.7;
  color:#58737f;
}

.disclaimer {
  font-size:11px;
  line-height:1.8;
  color:#7f95a0;
  margin-top:18px;
}

.hidden {
  display:none!important;
}

.footer {
  text-align:center;
  font-size:11px;
  line-height:1.9;
  color:#7f95a0;
  margin:20px 0;
}

.tag {
  font-size:11px;
  color:#8a7632;
  background:#fff8df;
  padding:5px 9px;
  border-radius:99px;
}

.actions {
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
  margin-top:23px;
}

#copyBox {
  width:100%;
  margin-top:12px;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  font:inherit;
  font-size:12px;
  color:var(--ink);
  background:#fff;
  resize:none;
}

@media (max-width:480px) {
  .wrap {
    width:calc(100% - 20px);
    padding-top:12px;
  }
  .top {
    padding:22px 12px;
  }
  .panel {
    padding:20px 16px;
  }
  .choice {
    padding:13px;
  }
  .score-row {
    grid-template-columns:70px 1fr 38px;
  }
}

@media (prefers-reduced-motion:reduce) {
  * {
    transition:none!important;
  }
}
