/* ド変態診断: 深夜のトランプ占い × キモかわ（2026-11-19 赤×紫×黄の配色 P2 を採用） */
:root {
  --bg: #1b0b22;
  --bg-2: #2b1238;
  --paper: #f6eefa;
  --paper-2: #eadcf2;
  --ink: #1d1222;
  --ink-soft: #5a4866;
  --red: #e5354b;
  --acid: #e3ff45;
  --line: #5b2c72;
  --on-dark: #f6e9f4;
  --on-dark-soft: #d2b9d6;
  --display: 'Dela Gothic One', 'Hiragino Kaku Gothic StdN', 'Yu Gothic', sans-serif;
  --body: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Yu Gothic', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg fill='%23ffffff' fill-opacity='.035' font-size='34' font-family='serif'%3E%3Ctext x='14' y='44'%3E%E2%99%A0%3C/text%3E%3Ctext x='96' y='70' transform='rotate(18 96 70)'%3E%E2%99%A5%3C/text%3E%3Ctext x='30' y='128' transform='rotate(-14 30 128)'%3E%E2%99%A3%3C/text%3E%3Ctext x='110' y='146'%3E%E2%99%A6%3C/text%3E%3C/g%3E%3C/svg%3E");
  color: var(--on-dark);
  font-family: var(--body);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, ul, ol { margin: 0; }
p, li { text-wrap: pretty; line-break: strict; }
.q-text, .r-name, .r-copy, .card-name, .logo-sub, .note, .match-name, .secret-label, .block-h { word-break: auto-phrase; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 18px calc(48px + env(safe-area-inset-bottom));
  min-height: 100dvh;
}
.screen { display: flex; flex-direction: column; gap: 16px; }

/* 見出し */
.logo {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(52px, 17vw, 78px);
  line-height: 1.05;
  letter-spacing: .01em;
  text-align: center;
  color: var(--acid);
  text-shadow: 4px 4px 0 var(--red);
  transform: rotate(-2deg);
}
.logo-s { font-size: clamp(38px, 12vw, 52px); }
.logo-sub { text-wrap: balance; text-align: center; color: var(--on-dark-soft); font-weight: 700; font-size: 16px; }
.gate-suits { display: flex; justify-content: center; gap: 18px; font-size: 26px; line-height: 1; margin-top: 8px; }
.gate-suits span:nth-child(1) { color: var(--on-dark); }
.gate-suits span:nth-child(2) { color: var(--red); }
.gate-suits span:nth-child(3) { color: #3fae86; }
.gate-suits span:nth-child(4) { color: #f0993a; }

/* 紙 */
.paper {
  background: var(--paper);
  color: var(--ink);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 0 0 2px var(--ink), 6px 6px 0 0 var(--red);
}
.gate-body p + p { margin-top: 10px; }
.gate-age { text-align: center; font-weight: 700; color: var(--acid); margin-top: 6px; }
.note { text-wrap: balance; font-size: 14px; line-height: 1.7; color: var(--on-dark-soft); text-align: center; }

/* ボタン */
.btn {
  appearance: none;
  width: 100%;
  min-height: 58px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 900;
  font-size: 18px;
  line-height: 1.35;
  cursor: pointer;
  transition: transform .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.btn:focus-visible, .choice:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }
.btn-primary { background: var(--red); color: #fff; border-color: var(--ink); box-shadow: 0 5px 0 0 #8f1626; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 1px 0 0 #8f1626; }
.btn-line { background: transparent; color: var(--on-dark); border-color: var(--on-dark-soft); }
.btn-line:hover { background: rgba(255, 255, 255, .07); }
.btn-ghost { background: transparent; color: var(--on-dark-soft); min-height: 48px; font-size: 16px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.btn-ghost:hover { color: var(--on-dark); }
.btn[disabled] { opacity: .35; cursor: default; }

/* 質問 */
.quiz-head { display: flex; flex-direction: column; gap: 8px; }
.quiz-count { font-family: var(--display); font-size: 34px; line-height: 1; color: var(--acid); }
.quiz-total { font-size: 18px; color: var(--on-dark-soft); }
.bar { height: 10px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--acid); border-radius: 99px; transition: width .25s ease; }
.q-card { min-height: 172px; display: flex; align-items: center; }
.q-text { font-size: 22px; font-weight: 900; line-height: 1.6; outline: none; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  appearance: none;
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 56px;
  padding: 10px 18px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: var(--bg-2);
  color: var(--on-dark);
  font: inherit; font-weight: 700; font-size: 18px; text-align: left;
  cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease, transform .12s ease;
}
.choice:hover { border-color: var(--on-dark-soft); }
.choice:active { transform: scale(.985); }
.choice .dot { flex: none; border-radius: 50%; background: var(--red); }
.choice[data-v="5"] .dot { width: 26px; height: 26px; }
.choice[data-v="4"] .dot { width: 20px; height: 20px; margin: 0 3px; opacity: .85; }
.choice[data-v="3"] .dot { width: 14px; height: 14px; margin: 0 6px; opacity: .6; background: var(--on-dark-soft); }
.choice[data-v="2"] .dot { width: 20px; height: 20px; margin: 0 3px; background: transparent; border: 3px solid var(--on-dark-soft); }
.choice[data-v="1"] .dot { width: 26px; height: 26px; background: transparent; border: 3px solid var(--on-dark-soft); }
.choice[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--acid); }

/* カード */
.card-stage { perspective: 1200px; display: flex; justify-content: center; padding: 6px 0 2px; }
.card {
  position: relative;
  width: min(78vw, 320px);
  aspect-ratio: 5 / 7;
  border-radius: 22px;
  background: var(--paper);
  color: var(--suit, var(--ink));
  box-shadow: 0 0 0 3px var(--ink), 0 18px 40px rgba(0, 0, 0, .55);
  overflow: hidden;
}
.card-idx { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; font-family: var(--display); }
.card-idx b { font-weight: 400; font-size: 34px; }
.card-idx i { font-style: normal; font-size: 26px; margin-top: 2px; }
.card-idx.tl { top: 12px; left: 14px; }
.card-idx.br { bottom: 12px; right: 14px; transform: rotate(180deg); }
.card-idx.joker b { font-size: 15px; writing-mode: vertical-rl; letter-spacing: .08em; }
.card-art { position: absolute; inset: 15% 15% 27% 15%; border-radius: 14px; background: var(--paper-2); overflow: hidden; display: grid; place-items: center; }
.card-art img, .card-art svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-name {
  position: absolute; left: 19%; right: 19%; bottom: 5.5%;
  min-height: 19%;
  display: block;
  font-family: var(--display); font-size: clamp(16px, 5vw, 21px); line-height: 1.3;
  text-align: center; text-wrap: balance; color: var(--ink);
}
.chunk { display: inline-block; }
.card-name { align-content: center; }
.card.reveal { animation: flip .9s cubic-bezier(.2, .8, .2, 1) both; }
.card-shot { width: min(86%, 340px); aspect-ratio: 5 / 7; filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .55)); }
.card-shot img { width: 100%; height: 100%; display: block; }
.card-shot img:not([src]) { visibility: hidden; }
.card-shot.reveal { animation: flip .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes flip {
  0% { transform: rotateY(180deg) scale(.7); opacity: 0; }
  55% { opacity: 1; }
  100% { transform: rotateY(0) scale(1); opacity: 1; }
}

/* 結果 */
.result-lead { text-align: center; font-weight: 900; color: var(--on-dark-soft); letter-spacing: .2em; }
.r-name { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 9.5vw, 42px); line-height: 1.25; text-align: center; color: var(--acid); text-wrap: balance; outline: none; }
.r-copy { text-align: center; font-weight: 900; font-size: 19px; }
.r-copy .chunk:first-child::before { content: '「'; } .r-copy .chunk:last-child::after { content: '」'; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip { padding: 6px 14px; border-radius: 99px; border: 2px solid var(--on-dark-soft); font-weight: 900; font-size: 15px; line-height: 1.4; }
.chip.hot { background: var(--acid); color: var(--ink); border-color: var(--acid); }
.block { display: flex; flex-direction: column; gap: 10px; }
.block-h { font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.4; color: #8a2bd8; }
.tier { padding-top: 10px; border-top: 2px dashed #d3b8e6; }
.tier b { font-weight: 900; }
.aru li { position: relative; padding-left: 1.5em; font-weight: 700; }
.aru li + li { margin-top: 8px; }
.aru li::before { content: '◆'; position: absolute; left: 0; color: var(--red); font-size: .8em; top: .2em; }
.match-row + .match-row { margin-top: 14px; padding-top: 14px; border-top: 2px dashed #d3b8e6; }
.match-tag { display: inline-block; font-size: 14px; font-weight: 900; background: var(--ink); color: var(--paper); border-radius: 6px; padding: 1px 9px; }
.match-name { font-family: var(--display); font-size: 19px; line-height: 1.4; margin-top: 4px; }

.secret { display: flex; flex-direction: column; gap: 16px; padding: 18px 12px; margin: 8px -6px 0; border: 2px dashed var(--acid); border-radius: 22px; }
.secret-label { text-align: center; font-weight: 900; color: var(--acid); font-size: 16px; }
.traits li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline; }
.traits li + li { margin-top: 12px; padding-top: 12px; border-top: 2px dashed #d3b8e6; }
.traits .rank { font-family: var(--display); font-size: 28px; line-height: 1; color: var(--red); }
.traits .t-name { font-weight: 900; font-size: 19px; }
.traits .t-text { grid-column: 2; }
.meter + .meter { margin-top: 12px; }
.meter-top { display: flex; justify-content: space-between; font-weight: 900; font-size: 16px; }
.meter-bar { height: 12px; border-radius: 99px; background: var(--paper-2); box-shadow: inset 0 0 0 2px var(--ink); overflow: hidden; }
.meter-bar i { display: block; height: 100%; background: var(--red); }

.share { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.share-h { font-family: var(--display); font-weight: 400; font-size: 24px; text-align: center; color: var(--acid); }

/* 図鑑 */
.z-suit { margin-top: 14px; }
.z-suit-h { margin: 0; }
.z-banner { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; width: 100%; min-height: 128px; padding: 14px 0 14px 16px; border: 0; border-radius: 18px; background: var(--band); color: #fff; text-align: left; font: inherit; cursor: pointer; box-shadow: 0 0 0 2px var(--ink), 5px 5px 0 0 var(--red); overflow: hidden; }
.z-banner:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }
.z-banner:active { transform: translate(2px, 2px); box-shadow: 0 0 0 2px var(--ink), 3px 3px 0 0 var(--red); }
.z-b-txt { display: grid; grid-template-columns: auto 1fr; align-items: baseline; justify-items: start; column-gap: 8px; row-gap: 2px; min-width: 0; }
.z-b-title, .z-b-more { grid-column: 1 / -1; }
.z-b-glyph { font-size: 24px; line-height: 1; }
.z-b-type { font-family: var(--display); font-weight: 400; font-size: 23px; line-height: 1.3; }
.z-b-title { font-weight: 700; font-size: 15px; line-height: 1.45; }
.z-b-title span { display: inline-block; }
.z-b-more { margin-top: 6px; padding: 4px 12px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 900; font-size: 15px; line-height: 1.5; }
.z-banner[aria-expanded="true"] .z-b-more { background: var(--acid); }
.z-b-art { display: flex; align-items: flex-end; }
.z-b-art .z-pic { width: 56px; height: 56px; border-radius: 12px; box-shadow: 0 0 0 2px var(--ink); }
.z-b-art .z-pic:nth-child(1) { transform: rotate(-8deg) translateX(18px); }
.z-b-art .z-pic:nth-child(2) { width: 72px; height: 72px; z-index: 1; transform: translateY(-6px); }
.z-b-art .z-pic:nth-child(3) { transform: rotate(8deg) translateX(-18px); }
.z-b-art-one .z-pic:nth-child(1) { width: 72px; height: 72px; transform: rotate(-6deg); }
.z-suit .z-list { margin-top: 10px; }
@media (max-width: 400px) {
  .z-b-art .z-pic { width: 50px; height: 50px; }
  .z-b-art .z-pic:nth-child(2) { width: 66px; height: 66px; }
}
@media (max-width: 360px) {
  .z-banner { grid-template-columns: 1fr; justify-items: start; padding: 14px 16px; }
  .z-b-art { order: -1; justify-self: center; padding-top: 4px; }
}
.z-list { padding: 10px; display: grid; gap: 8px; }
.z-list li { display: grid; grid-template-columns: 84px 1fr; column-gap: 12px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 14px; }
.z-pic { position: relative; width: 84px; height: 84px; border-radius: 12px; background: #fff; overflow: hidden; box-shadow: 0 0 0 2px rgba(29,18,34,.85); }
.z-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.z-pic-glyph { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--display); font-size: 40px; color: var(--suit, #7a2ea0); }
.z-pic-secret { background: #2a1638; }
.z-pic-secret .z-pic-glyph { color: #e6c6f5; }
.z-num { position: absolute; left: 4px; top: 4px; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 13px; background: var(--suit); color: #fff; font-family: var(--display); font-size: 16px; line-height: 26px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.z-txt { display: grid; gap: 2px; min-width: 0; }
.z-name { font-weight: 900; line-height: 1.45; }
.z-on-light { color: var(--ink); }
.z-on-light .z-copy { color: var(--ink); }
.z-on-dark { color: #fff; }
.z-on-dark .z-copy { color: #fff; }
.z-copy { font-size: 15px; line-height: 1.55; }

@media (min-width: 700px) {
  .app { padding-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .card.reveal, .card-shot.reveal { animation: none; }
  .btn, .choice, .bar i { transition: none; }
}

/* 紫のグラデーションの地（P2） */
body { background-image: linear-gradient(180deg, rgba(52, 18, 74, .95) 0%, rgba(27, 11, 34, 0) 520px), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg fill='%23ffffff' fill-opacity='.035' font-size='34' font-family='serif'%3E%3Ctext x='14' y='44'%3E%E2%99%A0%3C/text%3E%3Ctext x='96' y='70' transform='rotate(18 96 70)'%3E%E2%99%A5%3C/text%3E%3Ctext x='30' y='128' transform='rotate(-14 30 128)'%3E%E2%99%A3%3C/text%3E%3Ctext x='110' y='146'%3E%E2%99%A6%3C/text%3E%3C/g%3E%3C/svg%3E"); background-repeat: no-repeat, repeat; }

/* いつものAIに聞く */
.ask-ai { margin-top: 14px; padding: 20px 16px 10px; border-radius: 22px; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 6px 6px 0 0 #8a2bd8; display: flex; flex-direction: column; gap: 12px; }
.ask-h { font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.4; word-break: auto-phrase; }
.ask-tip { position: relative; background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.ask-tip::after { content: ''; position: absolute; left: 34px; bottom: -9px; border: 9px solid transparent; border-bottom: 0; border-top-color: var(--ink); }
.ask-tip b { font-size: 16px; }
.ask-tip span { font-size: 14px; color: #e6dcea; line-height: 1.6; }
.ask-q { font-weight: 900; font-size: 17px; line-height: 1.6; padding-top: 10px; border-top: 2px dashed #d3b8e6; word-break: auto-phrase; }
.ask-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ask-btn { min-height: 64px; border-radius: 14px; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-family: var(--body); cursor: pointer; transition: transform .12s ease, filter .12s ease; }
.ask-btn b { font-size: 17px; font-weight: 900; line-height: 1.1; }
.ask-btn span { font-size: 14px; font-weight: 700; }
.ask-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.ask-btn:focus-visible { outline: 3px solid #8a2bd8; outline-offset: 3px; }
.ask-btn.chatgpt { background: #111111; }
.ask-btn.claude { background: #a8482b; }
.ask-btn.gemini { background: linear-gradient(110deg, #3f5bd8 0%, #8a3fd1 55%, #d9622f 100%); }
.ask-next { -webkit-appearance: none; appearance: none; background: none; border: 0; padding: 8px 12px; font-family: var(--body); color: var(--ink-soft); align-self: center; cursor: pointer; }
.ask-next:hover { color: var(--ink); }

/* 入口：簡易診断としっかり診断 */
.modes { display: grid; gap: 14px; }
.mode {
  appearance: none; width: 100%; text-align: left; cursor: pointer; font: inherit;
  display: grid; gap: 6px; padding: 18px 18px 16px;
  border-radius: 20px; border: 2px solid var(--ink);
  background: var(--paper); color: var(--ink);
  box-shadow: 6px 6px 0 0 var(--mode-c, var(--red));
  transition: transform .12s ease, box-shadow .12s ease;
}
.mode:hover { transform: translate(-1px, -1px); }
.mode:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 0 var(--mode-c, var(--red)); }
.mode:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }
.mode-quick { --mode-c: var(--acid); }
.mode-full { --mode-c: var(--red); }
.mode-tag { justify-self: start; font-weight: 900; font-size: 14px; padding: 3px 12px; border-radius: 99px; background: var(--ink); color: var(--paper); }
.mode-h { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.3; }
.mode-for { font-weight: 700; font-size: 16px; line-height: 1.6; }
.mode-get { font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
.mode-go {
  margin-top: 6px; display: block; text-align: center; font-weight: 900; font-size: 17px;
  padding: 12px 14px; border-radius: 999px; border: 2px solid var(--ink);
}
.mode-quick .mode-go { background: var(--acid); color: var(--ink); }
.mode-full .mode-go { background: var(--red); color: #fff; }

/* 簡易診断の結果 */
.qk-h { text-align: center; font-family: var(--display); font-weight: 400; font-size: clamp(24px, 7vw, 32px); line-height: 1.35; color: var(--on-dark); text-wrap: balance; }
.qk-h:focus { outline: none; }
.qk-glyph { display: block; font-family: serif; font-size: 56px; line-height: 1.1; color: var(--suit); }
.qk-sub { display: block; font-size: .62em; color: var(--acid); }
.qk-trait { font-weight: 900; font-size: 18px; line-height: 1.6; margin-bottom: 10px; }
.qk-trait b { color: #8a2bd8; }
.qk-cands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 10px; }
.qk-cand { position: relative; display: grid; justify-items: center; gap: 4px; padding: 8px 6px 10px; border-radius: 12px; border: 3px solid var(--suit); background: #fffaf1; overflow: hidden; }
.qk-cand img { width: 100%; aspect-ratio: 1; object-fit: cover; mix-blend-mode: multiply; }
.qk-cand-n { font-family: var(--display); font-weight: 400; font-size: 18px; color: var(--suit); }
.qk-cand-q { font-weight: 900; font-size: 15px; letter-spacing: .1em; }
.qk-joker { font-weight: 900; font-size: 15px; text-align: center; color: #8a2bd8; }
.qk-cta { display: grid; gap: 12px; }
.qk-cta-lead { text-align: center; font-weight: 700; font-size: 16px; line-height: 1.7; color: var(--on-dark); text-wrap: balance; }
