/* 天耶わんの貞操具タイプ診断：デザインC（ポップ） */
:root {
  --orange: #F67E12;
  --pale: #FFE2C4;
  --ink: #1A1A1A;
  --sub: #4D4A47;
  --deep: #A84A00;
  --paper: #FFFFFF;
  --pop: "Mochiy Pop One", "Hiragino Maru Gothic ProN", sans-serif;
  --round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--round); font-weight: 500; }
h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.app { position: relative; max-width: 430px; min-height: 100vh; min-height: 100svh; margin: 0 auto; overflow: hidden; }
.screen {
  position: relative; min-height: 100vh; min-height: 100svh;
  padding: 24px 24px calc(28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}
.screen > *:not(.blob) { position: relative; }
.blob { position: absolute; border-radius: 50%; pointer-events: none; }
.blob--orange { right: -80px; top: -70px; width: 330px; height: 330px; background: var(--orange); }
.blob--pale { background: var(--pale); }
.blob--cover { left: -70px; top: 330px; width: 180px; height: 180px; }
.blob--quiz { left: -90px; bottom: 90px; width: 260px; height: 260px; }
.blob--result { left: -110px; top: -120px; width: 330px; height: 330px; }

/* イヌ耳 */
.eared { position: relative; }
.ear { position: absolute; top: -56px; width: 64px; height: 80px; }
.ear--r { width: 68px; }
.tilt { transform: rotate(-2deg); }

/* ステッカー */
.sticker { background: var(--paper); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); }

/* ボタン */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; text-decoration: none; color: var(--ink); cursor: pointer;
}
.btn--primary {
  height: 56px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--orange); box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--pop); font-size: 18px;
}
.btn--primary:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn--sub {
  height: 52px; padding: 0 8px 2px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--paper); box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--round); font-weight: 900; font-size: 14px; line-height: 1;
}
.btn--sub:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-text {
  height: 44px; border: 0; background: transparent; cursor: pointer;
  font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 4px;
}
.tag {
  display: inline-flex; align-items: center; height: 30px; padding: 0 16px;
  background: var(--orange); border: 3px solid var(--ink); border-radius: 999px;
  font-family: var(--pop); font-size: 14px;
}

/* 表紙 */
.screen--cover { align-items: center; text-align: center; }
.screen--cover .eared { margin-top: 56px; }
.screen--cover .ear--l { left: 18px; }
.screen--cover .ear--r { right: 14px; }
.sticker--title { padding: 16px 20px 18px; }
.sticker__sub { display: block; font-weight: 900; font-size: 19px; line-height: 1.2; }
.sticker__main { display: block; margin-top: 4px; font-family: var(--pop); font-size: clamp(26px, 8.6vw, 33px); line-height: 1.2; }
.hero { width: 240px; height: 204px; margin-top: 14px; flex: none; }
.magnifier { display: block; width: 200px; height: 200px; margin-left: 22px; filter: drop-shadow(5px 5px 0 var(--ink)); }
.bob { animation: bob 3.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-8px) rotate(-3deg); } }
.lead { margin-top: 12px; font-size: 16px; font-weight: 700; line-height: 1.7; }
.chips { margin: 10px 0 24px; display: flex; gap: 8px; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px 2px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--pale);
  font-weight: 900; font-size: 13px; line-height: 1;
}
.age {
  margin-top: auto; width: 100%; background: var(--pale); border: 3px solid var(--ink);
  border-radius: 24px; padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 10px;
}
.age__q { font-size: 16px; font-weight: 900; }
.age__actions { display: flex; flex-direction: column; gap: 10px; }
.age__msg { padding-bottom: 10px; font-weight: 700; line-height: 1.7; }

/* 質問 */
.progress__label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 900; font-size: 14px; }
.progress__count { font-family: var(--pop); font-size: 16px; }
.progress__count small { font-size: 13px; }
.paws { margin-top: 8px; display: flex; justify-content: space-between; }
.paw { width: 22px; height: 20px; flex: none; transition: transform .2s; }
.paw--done { fill: var(--orange); stroke: var(--ink); stroke-width: 1.4; }
.paw--now { fill: var(--ink); transform: scale(1.25); }
.paw--todo { fill: #E6E2DE; }
.q-area { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 64px 0 34px; }
.q-area .ear--l { left: 34px; }
.q-area .ear--r { right: 30px; }
.bubble { position: relative; background: var(--paper); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 6px 6px 0 var(--ink); padding: 26px 20px 28px; scroll-margin: 72px 0 34px; }
.bubble__text { font-weight: 900; font-size: 22px; line-height: 1.6; word-break: auto-phrase; overflow-wrap: anywhere; }
.bubble__tail { position: absolute; left: 40px; bottom: -22px; }
.bubble__tag { position: absolute; right: 18px; bottom: -17px; }
.q-anim .bubble__text { animation: qin .28s ease-out; }
@keyframes qin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.opts { display: flex; flex-direction: column; gap: 12px; }
.opt {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 58px; padding: 0 16px 2px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--paper); box-shadow: 4px 4px 0 var(--ink); cursor: pointer;
  font-weight: 900; font-size: 16px; line-height: 1;
  transition: transform .12s, box-shadow .12s, background-color .12s;
}
.opt .check { display: none; flex: none; }
.opt[aria-pressed="true"] { background: var(--orange); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.opt[aria-pressed="true"] .check { display: block; }
@media (hover: hover) { .opt:hover { background: var(--pale); } .opt[aria-pressed="true"]:hover { background: var(--orange); } }
.btn-back {
  margin-top: 14px; align-self: flex-start; height: 44px; padding: 0 2px; border: 0; background: transparent;
  display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 700; font-size: 14px;
}

/* 鑑定中 */
.screen--loading { align-items: center; justify-content: center; text-align: center; gap: 14px; }
.screen--loading .magnifier { width: 150px; height: 150px; margin: 0 0 10px; }
.scan { animation: scan 1.2s ease-in-out infinite; }
@keyframes scan { 0%, 100% { transform: translateX(-16px) rotate(-10deg); } 50% { transform: translateX(16px) rotate(4deg); } }
.loading__title { font-family: var(--pop); font-weight: 400; font-size: 24px; }
.loading__sub { font-weight: 700; font-size: 15px; }

/* 結果 */
.screen--result { align-items: center; text-align: center; }
.r-kicker { font-weight: 900; font-size: 13px; }
.r-label { margin-top: 14px; font-weight: 900; font-size: 15px; }
.screen--result .eared { margin-top: 50px; max-width: 100%; }
.screen--result .ear--l { left: 14px; }
.screen--result .ear--r { right: 10px; }
/* 文字の大きさは app.js の fitName が名前の長さに合わせて決める */
.sticker--type {
  padding: 12px 22px; background: var(--orange); border-radius: 18px; box-shadow: 5px 5px 0 var(--ink);
  font-family: var(--pop); font-weight: 400; font-size: 34px; line-height: 1.25;
  word-break: keep-all; overflow-wrap: normal; text-wrap: balance;
}
.sticker--type.is-squeezed { overflow-wrap: anywhere; }
.pop { animation: pop .6s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes pop {
  0% { transform: rotate(-2deg) scale(.4); opacity: 0; }
  70% { transform: rotate(-2deg) scale(1.08); opacity: 1; }
  100% { transform: rotate(-2deg) scale(1); }
}
.hidden-badge {
  margin-top: 18px; display: inline-flex; align-items: center; height: 28px; padding: 0 14px 2px;
  border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 900; font-size: 13px; line-height: 1;
}
.talk { margin-top: 30px; width: 100%; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.talk__tag { margin-left: 14px; height: 28px; font-size: 13px; z-index: 1; position: relative; }
.talk__bubble {
  margin-top: -9px; width: 100%; background: var(--paper); border: 3px solid var(--ink);
  border-radius: 24px; box-shadow: 5px 5px 0 var(--ink); padding: 22px 18px 18px;
}
.talk__bubble p { font-weight: 900; font-size: 16px; line-height: 1.7; word-break: auto-phrase; overflow-wrap: anywhere; }
.btn--police {
  margin-top: 20px; height: 54px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--orange);
  font-weight: 900; font-size: 15px;
}
.r-desc { margin-top: 18px; width: 100%; font-size: 15px; line-height: 1.8; text-align: left; }

.meters { margin-top: 28px; width: 100%; text-align: left; }
.meters__title { display: flex; align-items: center; gap: 10px; font-family: var(--pop); font-weight: 400; font-size: 18px; }
.meters__bar { width: 8px; height: 22px; border: 2.5px solid var(--ink); border-radius: 3px; background: var(--orange); }
.meter-list { margin-top: 16px; display: flex; flex-direction: column; gap: 18px; }
.meter { display: flex; flex-direction: column; gap: 8px; }
.meter__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 900; font-size: 15px; }
.meter__val { color: var(--deep); }
.meter__track { position: relative; height: 18px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--paper); }
.meter__fill { position: absolute; top: 2px; bottom: 2px; left: 50%; right: 50%; background: var(--orange); transition: left .8s cubic-bezier(.2, 1, .3, 1), right .8s cubic-bezier(.2, 1, .3, 1); }
.meter__knob {
  position: absolute; top: 50%; left: 50%; width: 30px; height: 30px;
  border: 3px solid var(--ink); border-radius: 50%; background: var(--paper);
  transform: translate(-50%, -50%); display: grid; place-items: center;
  transition: left .8s cubic-bezier(.2, 1, .3, 1);
}
.meter__ends { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--sub); }
.meter--max .meter__fill { left: 0; right: 0; }
.meter--max .meter__knob { left: 100%; animation: shake .22s linear infinite; }
@keyframes shake {
  0%, 100% { transform: translate(-50%, -50%) rotate(0); }
  25% { transform: translate(-42%, -54%) rotate(10deg); }
  75% { transform: translate(-58%, -46%) rotate(-10deg); }
}
.meter--zero .meter__track { background: #F1EEEB; border-color: #B9B4AF; }
.meter--zero .meter__fill { display: none; }
.meter--zero .meter__knob { left: 0; border-color: #B9B4AF; background: #F1EEEB; }
.meter--zero .meter__knob svg { display: none; }
.meter--zero .meter__val { color: var(--sub); }

.r-actions { margin-top: 30px; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.r-actions__sub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.r-invite { font-weight: 900; font-size: 15px; }

/* 全タイプ一覧 */
.list-title { margin-top: 6px; font-family: var(--pop); font-weight: 400; font-size: 26px; }
.list-lead { margin-top: 10px; font-size: 14px; line-height: 1.75; color: var(--sub); }
.cards { list-style: none; margin: 20px 0 28px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 4px 4px 0 var(--ink); padding: 14px 16px 16px; }
.card--mine { background: var(--pale); }
.card--secret { background: #F4F1EE; }
.card__badge {
  display: inline-flex; align-items: center; height: 24px; margin-bottom: 8px; padding: 0 10px 2px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--orange); font-weight: 900; font-size: 12px; line-height: 1;
}
.card__name { font-family: var(--pop); font-weight: 400; font-size: 18px; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
/* 文節で改行出来るブラウザ（Chrome等）では文節単位、それ以外は記号の所で改行する */
@supports (word-break: auto-phrase) {
  .sticker--type, .card__name { word-break: auto-phrase; }
}
.card__catch { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--sub); }
.mini { margin-top: 12px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; align-items: center; font-size: 12px; font-weight: 700; }
.mini__bar { position: relative; height: 8px; border-radius: 999px; background: #EAE5E0; }
.mini__dot { position: absolute; top: 50%; width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 50%; background: var(--orange); transform: translate(-50%, -50%); }

.noscript { padding: 24px; font-weight: 700; }

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