:root {
  --blue: #08285f;
  --blue2: #1262c4;
  --orange: #9f0b2a;
  --red2: #d1122e;
  --red-dark: #7a0016;
  --bg: #fff3e3;
  --text: #0b2559;
  --border-line: #d8e1ef;
  --pink: #e85b72;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
}
button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.app {
  max-width: 960px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px;
  --hero-radial-x: 20%;
  background:
    radial-gradient(circle at var(--hero-radial-x) 0%, rgba(255,255,255,.9), rgba(255,255,255,0) 34%),
    linear-gradient(135deg, #fff7ec 0%, #ffe7c8 45%, #fff3e3 100%);
  position: relative;
  overflow: hidden;
}
.app::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(135deg, rgba(8,40,95,.05) 25%, transparent 25%),
    linear-gradient(225deg, rgba(8,40,95,.04) 25%, transparent 25%);
  background-size: 36px 36px;
  opacity: .45;
}
.header {
  background: linear-gradient(135deg, var(--blue), #0c3f91);
  color: #fff;
  border-radius: 18px;
  padding: 18px 22px;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(8,40,95,.22);
  border: 2px solid rgba(255,255,255,.18);
  position: relative;
  z-index: 1;
}
.header-balls {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
  z-index: -1;
}
.hball-x { position: absolute; animation: hball-x linear forwards; }
.hball-y { animation: hball-y ease-in forwards; }
.hball-y-dink { animation: hball-y-dink linear forwards; }
.hball-y-drive { animation: hball-y-drive linear forwards; }
.hball-img { display: block; animation: hball-rot linear forwards; }
@keyframes hball-x   { from{transform:translateX(0)} to{transform:translateX(var(--tx))} }
@keyframes hball-y   { from{transform:translateY(0)} to{transform:translateY(var(--ty))} }
@keyframes hball-y-dink {
  0%   { transform: translateY(0); animation-timing-function: ease-out; }
  50%  { transform: translateY(var(--ty)); animation-timing-function: ease-in; }
  100% { transform: translateY(0); }
}
@keyframes hball-y-drive {
  0%   { transform: translateY(0); animation-timing-function: ease-out; }
  22%  { transform: translateY(var(--ty-peak)); animation-timing-function: cubic-bezier(.5,0,1,.6); }
  100% { transform: translateY(var(--ty)); }
}
@keyframes hball-rot { from{transform:rotate(0deg)} to{transform:rotate(var(--rot))} }
.header h1 {
  margin: 0;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
}
.header-logo {
  display: block;
  width: min(760px, 88vw);
  height: auto;
}
.header-title-text {
  display: block;
  font-size: clamp(20px, 4vw, 36px);
  line-height: 1.2;
  letter-spacing: -.02em;
}
.promo-banner {
  margin-top: 14px;
  padding: 0;
  background: transparent;
  position: relative;
  z-index: 1;
}
.promo-banner .vnl-promo-img {
  display: block;
  width: min(100%, 480px);
  height: auto;
  margin: 0 auto;
}
.promo-banner:not(.start-promo) {
  display: none;
}
.promo-banner > .vnl-promo-text {
  display: none;
}
.promo-banner > .vnl-promo-fallback {
  display: none;
  margin: 0;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--red-dark), var(--orange) 58%, var(--red2));
  color: #fff;
  text-align: center;
  font-weight: 800;
  line-height: 1.5;
}
.start-promo {
  margin: 16px auto 0;
  width: 100%;
  max-width: none;
}
.mobile-start-promo {
  display: none;
}
.result-promo {
  margin-top: 24px;
}
.card {
  background: rgba(255,255,255,.97);
  border-radius: 22px;
  margin-top: 16px;
  padding: 24px;
  box-shadow: 0 14px 36px rgba(8,40,95,.12);
  border: 2px solid rgba(255,255,255,.8);
  position: relative;
  z-index: 1;
}
.start-title { font-size: clamp(30px, 7vw, 58px); line-height: 1.08; margin: 0 0 14px; color: var(--blue); letter-spacing: -.03em; }
.start-title strong { color: var(--orange); }
.lead { font-weight: 600; line-height: 1.85; margin: 0; color: #183c78; }
.primary-btn {
  width: 100%;
  margin-top: 24px;
  border: 0;
  background: linear-gradient(135deg, var(--orange), var(--red2));
  color: #fff;
  padding: 18px;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 0 var(--red-dark), 0 16px 28px rgba(176,0,32,.24);
  transform: translateY(0);
  transition: transform .12s ease, box-shadow .12s ease;
}
@media (hover: hover) {
  .primary-btn:hover { transform: translateY(4px); box-shadow: 0 6px 0 var(--red-dark), 0 10px 18px rgba(176,0,32,.22); }
}
.primary-btn:active { transform: translateY(4px); box-shadow: 0 6px 0 var(--red-dark), 0 10px 18px rgba(176,0,32,.22); }
.question-head { display: flex; justify-content: space-between; font-weight: 700; color: var(--blue); margin-bottom: 12px; letter-spacing: .02em; }
.progress { height: 12px; background: #dfe9f7; border-radius: 999px; overflow: hidden; margin-bottom: 24px; box-shadow: inset 0 2px 4px rgba(8,40,95,.12); }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--orange), var(--red2)); width: 0%; transition: .25s; border-radius: 999px; }
.question-text { font-size: clamp(24px, 5vw, 38px); line-height: 1.35; margin: 0 0 22px; color: var(--blue); letter-spacing: -.02em; }
#question.question-enter {
  animation: question-enter .18s ease-out both;
}
#question.question-leave {
  animation: question-leave .12s ease-in both;
}
@keyframes question-enter {
  from { opacity: .72; }
  to { opacity: 1; }
}
@keyframes question-leave {
  from { opacity: 1; }
  to { opacity: .74; }
}
.answers {
  display: grid;
  grid-auto-rows: 1fr;
  gap: 12px;
}
.answer-btn {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  border: 2px solid #d7e3f3;
  background: linear-gradient(180deg, #fff, #f8fbff);
  border-radius: 18px;
  padding: 17px 18px;
  text-align: left;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  box-shadow: 0 6px 0 #c7d7eb;
  transform: translateY(0);
  transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
  user-select: none;
}
.answer-btn:focus {
  outline: none;
}
.answer-btn:focus-visible {
  outline: 3px solid rgba(18,98,196,.35);
  outline-offset: 3px;
}
.answer-btn:active {
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: 0 6px 0 #c7d7eb;
  transform: translateY(0);
}
.answer-btn.is-selected {
  border-color: var(--orange);
  background: #fff4f6;
  box-shadow: 0 7px 0 #e58a98;
}
@media (hover: hover) and (pointer: fine) {
  .answer-btn:hover { border-color: var(--orange); background: #fff4f6; transform: translateY(-1px); box-shadow: 0 7px 0 #e58a98; }
}
.back-btn, .restart-btn {
  display: block;
  margin: 18px auto 0;
  background: transparent;
  border: 0;
  color: var(--blue);
  text-decoration: underline;
  font-weight: 800;
  cursor: pointer;
}
.result-hero {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 18px;
  align-items: center;
  background: linear-gradient(135deg, #fff, #fff4f6);
  border-color: rgba(176,0,32,.22);
}
.youare { font-size: clamp(18px, 4vw, 32px); font-weight: 900; margin: 0; white-space: nowrap; }
.position-name { font-weight: 900; line-height: 1.08; margin: 4px 0; letter-spacing: -.02em; }
.type-name { font-size: clamp(16px, 2.6vw, 22px); font-weight: 700; margin: 8px 0; }
.position-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.position-icon-img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  display: block;
}
.section-title {
  background: linear-gradient(135deg, var(--blue), #174da0);
  color: #fff;
  border-radius: 999px;
  padding: 9px 18px;
  display: inline-block;
  font-weight: 800;
  margin-bottom: 16px;
  box-shadow: 0 6px 14px rgba(8,40,95,.16);
}
.features { display: grid; gap: 14px; }
.feature { border-bottom: 1px dashed #b9c6d8; padding-bottom: 14px; }
.feature:last-child { border-bottom: 0; padding-bottom: 0; }
.feature h3 {
  margin: 0 0 6px;
  font-size: 20px;
  position: relative;
  width: fit-content;
}
.feature h3::after {
  content: "";
  position: absolute;
  bottom: 0px;
  left: -3px;
  right: -3px;
  height: 5px;
  background: linear-gradient(
    90deg,
    rgba(159,11,42,.9),
    rgba(159,11,42,.55) 38%,
    rgba(159,11,42,.82) 66%,
    rgba(159,11,42,.65)
  );
  border-radius: 2px;
  transform: rotate(-.4deg);
  filter: blur(.5px);
  clip-path: inset(0 100% 0 0);
}
.chalk-active .feature h3::after {
  animation: chalk-draw .55s cubic-bezier(.4,0,.2,1) forwards;
}
.chalk-active .feature:nth-child(1) h3::after { animation-delay: 0s; }
.chalk-active .feature:nth-child(2) h3::after { animation-delay: .22s; }
.chalk-active .feature:nth-child(3) h3::after { animation-delay: .44s; }
@keyframes chalk-draw {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}
.feature p { margin: 0; font-weight: 700; line-height: 1.7; }
.watch-point {
  margin: 0;
  color: #183c78;
  font-weight: 700;
  line-height: 1.85;
}
.position-description {
  color: #183c78;
  font-weight: 700;
  line-height: 1.85;
}
.position-description p { margin: 0; }
.position-description p + p { margin-top: 12px; }
.same-title {
  background: linear-gradient(135deg, var(--blue), #174da0);
  color: #fff;
  text-align: center;
  border-radius: 999px;
  padding: 11px;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 24px;
  box-shadow: 0 6px 14px rgba(8,40,95,.16);
}
.groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.group {
  border: 2px solid #c8d7ea;
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #f7fbff);
  box-shadow: 0 8px 18px rgba(8,40,95,.08);
}
.group.women { border-color: #f1b3bf; }
.group.haikyu { border-color: #e58a98; }
.group-label {
  width: fit-content;
  margin: -24px auto 12px;
  padding: 5px 14px;
  border-radius: 6px;
  background: var(--blue2);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.women .group-label { background: var(--pink); }
.haikyu .group-label { background: var(--orange); }
.players { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.players.one { grid-template-columns: 1fr; }
.player img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center top;
  border-radius: 14px;
  background: #e9eef6;
  display: block;
  box-shadow: 0 6px 14px rgba(8,40,95,.14);
}
.player-name {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  margin-top: 8px;
}
.player-desc {
  font-size: 12px;
  line-height: 1.6;
  margin-top: 6px;
  text-align: center;
  color: #35518a;
  padding: 0 4px;
}
.haikyu-promo {
  margin: 18px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(8, 40, 95, 0.18);
  text-align: center;
}
.haikyu-promo-banner {
  text-align: center;
  margin-top: 24px;
  padding: 22px 12px 0;
  border-top: 1px solid rgba(8, 40, 95, 0.18);
}
.haikyu-promo-banner .haikyu-logos {
  margin-top: 0;
}
.haikyu-logos {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 20px;
  margin-top: 0;
}
.haikyu-logo-tv { order: 1; }
.haikyu-logo-movie { order: 2; }
@media (min-width: 761px) {
  .haikyu-logos { gap: 12px 32px; }
}
.haikyu-logo {
  display: block;
  width: min(44%, 220px);
  max-width: 220px;
  height: auto;
}
.haikyu-support {
  margin: 16px 0 0;
  color: var(--orange);
  font-size: clamp(28px, 6.5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  text-align: center;
  white-space: nowrap;
}
.haikyu-support-sub {
  margin: 10px 0 0;
  color: var(--orange);
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 800;
  line-height: 1.65;
  text-align: center;
  white-space: normal;
}
.haikyu-credit {
  margin: 12px 0 0;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  color: rgba(11, 37, 89, 0.55);
}
.haikyu-promo-banner .haikyu-credit {
  margin-top: 14px;
  padding-top: 0;
  border-top: 0;
}
.note { text-align: center; font-size: 12px; color: #666; margin-top: 4px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.footer-box { border: 1px solid var(--border-line); border-radius: 12px; padding: 18px; text-align: center; background: #fff; }
.share-card .footer-box { margin: 0; }
.share-lead { margin: 8px 0 0; color: #35518a; font-weight: 700; line-height: 1.6; }
.share-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.share-buttons-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.share-buttons button {
  margin: 0;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.share-btn {
  border-radius: 999px;
  color: #fff;
  padding: 12px 16px;
  white-space: nowrap;
}
.share-btn-x { background: #1da1f2; }
.share-btn-line { background: #06c755; }
button.share-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  color: #fff;
  background-color: var(--orange);
  background-image: linear-gradient(135deg, var(--orange), var(--red2));
  box-shadow: 0 5px 0 var(--red-dark);
  transition: transform .12s ease, box-shadow .12s ease;
}
button.share-copy-btn svg {
  display: block;
  flex-shrink: 0;
}
button.share-copy-btn:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 var(--red-dark);
}
.share-btn:active { transform: translateY(1px); }
.watch-btn { background: linear-gradient(135deg, var(--orange), var(--red2)); color: #fff; border: 0; border-radius: 999px; padding: 13px 24px; font-weight: 800; margin-top: 12px; width: 100%; box-shadow: 0 7px 0 var(--red-dark); }
.hidden { display: none !important; }
#toast.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 32px);
  transform: translateX(-50%) translateY(10px);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
  padding: 8px 12px;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity .2s ease, transform .2s ease;
  max-width: min(92vw, 520px);
  text-align: center;
}
#toast.toast.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (max-width: 760px) {
  #toast.toast {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
  }
}
#ball-anim {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: linear-gradient(135deg, var(--blue), #0c3f91);
  overflow: hidden;
  pointer-events: none;
}
#ball-anim.out { animation: banim-out .4s ease-in forwards; }
#ball-anim .bx {
  position: absolute;
  top: 0;
  left: 0;
  animation: banim-x 2s linear forwards;
}
#ball-anim .by { animation: banim-y 2s linear forwards; }
#ball-anim .bsq {
  transform-origin: center bottom;
  animation: banim-sq 2s linear forwards;
}
#ball-anim img {
  display: block;
  width: clamp(70px, 12vw, 110px);
  height: clamp(70px, 12vw, 110px);
  animation: banim-rot 2s linear forwards;
}
@keyframes banim-out { to { opacity: 0; } }
@keyframes banim-x {
  from { transform: translateX(-120px); }
  to   { transform: translateX(calc(100vw + 120px)); }
}
@keyframes banim-y {
  0%        { transform: translateY(6vh);  animation-timing-function: ease-in; }
  26%       { transform: translateY(62vh); animation-timing-function: ease-out; }
  40%       { transform: translateY(30vh); animation-timing-function: ease-in; }
  54%       { transform: translateY(62vh); animation-timing-function: ease-out; }
  65%       { transform: translateY(46vh); animation-timing-function: ease-in; }
  74%       { transform: translateY(62vh); }
  100%      { transform: translateY(62vh); }
}
@keyframes banim-sq {
  0%, 24%   { transform: scaleX(1)    scaleY(1); }
  26%       { transform: scaleX(1.14) scaleY(0.82); }
  30%, 52%  { transform: scaleX(1)    scaleY(1); }
  54%       { transform: scaleX(1.08) scaleY(0.90); }
  57%, 72%  { transform: scaleX(1)    scaleY(1); }
  74%       { transform: scaleX(1.04) scaleY(0.96); }
  77%, 100% { transform: scaleX(1)    scaleY(1); }
}
@keyframes banim-rot {
  from { transform: rotate(0deg); }
  to   { transform: rotate(900deg); }
}
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .5s ease;
}
#loader img {
  width: min(160px, 40vw);
  height: auto;
  animation: loader-pulse .6s ease-out forwards;
}
#loader.fade-out {
  opacity: 0;
  pointer-events: none;
}
@keyframes loader-pulse {
  from { transform: scale(1); }
  to   { transform: scale(1.12); }
}
.site-footer {
  margin-top: 28px;
  padding: 16px 8px 8px;
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(11, 37, 89, 0.55);
  position: relative;
  z-index: 1;
}
.site-footer p { margin: 0; }
.site-footer p + p { margin-top: 6px; }
@media (min-width: 761px) {
  .app { --hero-radial-x: 50%; }
  #start { text-align: center; }
}
@media (max-width: 760px) {
  .result-hero { grid-template-columns: 1fr; }
  .youare { font-size: clamp(15px, 4.4vw, 18px); }
  .position-icon-img { width: 180px; height: 180px; }
  .type-name { font-size: clamp(14px, 4.2vw, 18px); line-height: 1.4; }
  #result .lead { font-size: 15px; line-height: 1.7; }
  .groups { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .header { border-radius: 0; margin: -16px -16px 12px; }
  .header-logo { width: min(90vw, 390px); }
  .header-title-text { font-size: clamp(18px, 5vw, 24px); }
  .promo-banner:not(.start-promo) { display: block; }
  .promo-banner { margin-top: 12px; }
  .promo-banner .vnl-promo-img {
    width: min(100%, 420px);
  }
  .start-promo { display: none; }
  .mobile-start-promo { display: block; }
}
.q-ball {
  position: fixed;
  pointer-events: none;
  z-index: 2;
  animation: qball-fly linear forwards;
}
@keyframes qball-fly {
  from { transform: translate(0,0) rotate(0deg); opacity: var(--op); }
  75%  { opacity: var(--op); }
  to   { transform: translate(var(--tx),var(--ty)) rotate(var(--rot)); opacity: 0; }
}
.type-cursor {
  display: inline-block;
  font-weight: 400;
  animation: cursor-blink .65s step-end infinite;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.pos-dooon {
  animation: pos-dooon .65s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes pos-dooon {
  0%   { transform: scale(2.4); opacity: 0; filter: blur(3px); }
  55%  { transform: scale(.93); opacity: 1; filter: blur(0); }
  75%  { transform: scale(1.06); }
  90%  { transform: scale(.98); }
  100% { transform: scale(1); }
}
.typename-in {
  animation: typename-in .6s ease-out both;
}
@keyframes typename-in {
  from { opacity: 0; letter-spacing: .15em; }
  to   { opacity: 1; letter-spacing: 0; }
}
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .45s ease, transform .45s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.grp-reveal { opacity: 0; }
.reveal.visible .grp-reveal { animation: grp-in .5s ease-out both; }
.plr-reveal { opacity: 0; }
.reveal.visible .plr-reveal { animation: plr-in .4s ease-out both; }
.haikyu-logo-reveal { opacity: 0; }
.reveal.visible .haikyu-logo-reveal { animation: logo-in .6s ease-out both; }
@keyframes grp-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes plr-in {
  from { opacity: 0; transform: scale(.88) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes logo-in {
  from { opacity: 0; transform: scale(.92) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
#result .position-name {
  display: block;
  font-size: clamp(27px, 8vw, 48px) !important;
  line-height: 1.08 !important;
  color: var(--orange) !important;
  font-weight: 900 !important;
  letter-spacing: -.04em !important;
  margin: 6px 0 10px !important;
}
