/* unanai.com 2026-10 renewal — "うなぴ" sticker-pop design system.
 * Mobile first. Pastel fills + ink outlines + offset "sticker" shadows.
 * Themes: default (cream day) / .theme-night (tarot) / .theme-sky (seiza). */

:root {
  --cream: #fff7ec;
  --cream-2: #fff0dc;
  --paper: #ffffff;
  --ink: #3a2a2a;
  --ink-soft: #6e5a5a;
  --line: #3a2a2a;
  --mint: #bfe9d6;
  --mint-2: #8fd9b9;
  --pink: #ff9bb8;
  --pink-2: #ffc9d8;
  --butter: #ffe08a;
  --lav: #c9b8ff;
  --sky: #a9ddf5;
  --peach: #ffc7a6;
  --deep: #c92e63;
  --bg: var(--cream);
  --surface: var(--paper);
  --text: var(--ink);
  --muted: var(--ink-soft);
  --shadow: 0 5px 0 var(--line);
  --shadow-sm: 0 3px 0 var(--line);
  --radius: 24px;
  --radius-sm: 14px;
  --wrap: 1080px;
  --tabbar-h: 64px;
  --font-body: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Meiryo", system-ui, sans-serif;
  --font-pop: "Mochiy Pop One", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(rgba(58, 42, 42, .07) 1.4px, transparent 1.6px);
  background-size: 22px 22px;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}
img, svg, canvas { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--deep); }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-pop); font-weight: 400; line-height: 1.4; letter-spacing: .01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 6.4vw, 2.6rem); }
h2 { font-size: clamp(1.25rem, 4.8vw, 1.75rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; border-radius: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--butter); border: 2px solid var(--line); padding: 8px 14px; border-radius: 12px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 32px, 720px); margin-inline: auto; }
.small { font-size: .86rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line);
}
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--font-pop); font-size: 1.35rem; line-height: 1; }
.logo img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); background: var(--mint); object-fit: cover; }
.logo small { display: block; font-family: var(--font-body); font-size: .68rem; font-weight: 700; color: var(--muted); margin-top: 3px; letter-spacing: .02em; }
.topnav { display: none; gap: 6px; }
.topnav a { text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 999px; border: 2px solid transparent; }
.topnav a:hover, .topnav a[aria-current="page"] { border-color: var(--line); background: var(--butter); }
.topbar__chip { color: var(--ink); font-size: .78rem; font-weight: 700; border: 2px solid var(--line); border-radius: 999px; padding: 4px 10px; background: var(--paper); text-decoration: none; white-space: nowrap; }

/* ---------- bottom tab bar (mobile app feel) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--paper);
  border-top: 2px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabbar__in { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 560px; margin: 0 auto; height: var(--tabbar-h); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; font-size: .7rem; font-weight: 700; color: var(--muted); position: relative; }
.tabbar svg { width: 26px; height: 26px; }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"] .tabbar__ico { background: var(--butter); border-color: var(--line); transform: translateY(-3px); }
.tabbar__ico { display: grid; place-items: center; width: 44px; height: 30px; border-radius: 999px; border: 2px solid transparent; transition: transform .2s; }
.theme-night .tabbar { background: #26214d; }
.theme-night .tabbar a { color: #cfc6f0; }
.theme-night .tabbar a[aria-current="page"] { color: #fff3e6; }
.theme-night .tabbar a[aria-current="page"] .tabbar__ico { background: #5a4fa8; border-color: #fff3e6; }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; }
  .topbar__chip { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--pink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 26px;
  font-family: var(--font-pop); font-size: 1.05rem; line-height: 1.2; color: var(--ink);
  text-decoration: none; cursor: pointer;
  background: var(--btn-bg);
  border: 2.5px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, filter .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.btn--mint { --btn-bg: var(--mint-2); }
.btn--butter { --btn-bg: var(--butter); }
.btn--lav { --btn-bg: var(--lav); }
.btn--sky { --btn-bg: var(--sky); }
.btn--ghost { --btn-bg: var(--paper); }
.btn--lg { min-height: 60px; font-size: 1.2rem; padding: 14px 32px; }
.btn--sm { min-height: 42px; font-size: .92rem; padding: 8px 16px; box-shadow: var(--shadow-sm); }
.btn--block { width: 100%; }
.linkish { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; font-weight: 700; }

/* ---------- surfaces ---------- */
.card {
  background: var(--surface);
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card + .card { margin-top: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; border: 2px solid var(--line); border-radius: 999px; padding: 3px 12px; background: var(--butter); line-height: 1.5; }
.chip--mint { background: var(--mint); } .chip--pink { background: var(--pink-2); } .chip--lav { background: var(--lav); } .chip--sky { background: var(--sky); }
.section { padding: 28px 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section__head h2 { margin: 0; }
.section__head a { font-weight: 700; font-size: .92rem; }
.kicker { display: inline-block; font-weight: 700; font-size: .82rem; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }

/* speech bubble */
.bubble {
  position: relative; display: inline-block; max-width: 100%;
  background: var(--paper); border: 2.5px solid var(--line); border-radius: 20px;
  padding: 10px 16px; font-weight: 700; line-height: 1.5; box-shadow: var(--shadow-sm);
}
.bubble::after {
  content: ""; position: absolute; left: 28px; bottom: -12px; width: 18px; height: 18px;
  background: var(--paper); border-right: 2.5px solid var(--line); border-bottom: 2.5px solid var(--line);
  transform: rotate(45deg) skew(8deg, 8deg); border-bottom-right-radius: 4px;
}
.bubble.is-pop { animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.85); } to { transform: scale(1); } }

/* ---------- home hero ---------- */
.hero { position: relative; padding: 18px 0 8px; }
.hero__grid { display: grid; gap: 14px; grid-template-areas: "copy" "stage" "cta"; }
.hero__copy { grid-area: copy; } .hero__stage { grid-area: stage; } .hero__cta { grid-area: cta; }
.hero__stage {
  position: relative; aspect-ratio: 4 / 3; width: 100%; padding: 0; font: inherit; color: inherit; cursor: pointer;
  margin: 0 auto; border: 2.5px solid var(--line); border-radius: 32px; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #fff 0, transparent 40%), linear-gradient(180deg, #c8ecff 0%, #bfe9d6 70%, #a6dcc6 100%);
  box-shadow: var(--shadow);
  touch-action: manipulation;
}
.hero__stage img.hero__fallback { position: absolute; inset: 4% 0 0; width: 100%; height: 96%; object-fit: contain; transition: opacity .5s; }
.hero__stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity .6s; }
.hero__stage.is-3d canvas { opacity: 1; }
.hero__stage.is-3d img.hero__fallback { opacity: 0; }
.hero__bubble { position: absolute; left: 12px; top: 12px; max-width: 52%; z-index: 2; pointer-events: none; font-size: .95rem; }
.hero__bubble { margin: 0; }
.hero__stage { cursor: pointer; }
.hero__hint { position: absolute; right: 12px; bottom: 12px; z-index: 2; font-size: .8rem; font-weight: 700; color: var(--ink); background: rgba(255,255,255,.9); border: 2px solid var(--line); border-radius: 999px; padding: 6px 12px; min-height: 36px; cursor: pointer; }
.hero__stage:not(.is-3d) img.hero__fallback { animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
.hero__copy h1 { margin-bottom: .3em; }
.hero__copy h1 .hl { background: linear-gradient(transparent 58%, var(--butter) 58%); padding: 0 .1em; }
.hero__lead { font-weight: 700; color: var(--muted); margin-bottom: 0; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero__cta .btn--lg { flex: 1 1 auto; }
.hero__date { font-weight: 700; font-size: .9rem; }
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr 1fr; grid-template-areas: "copy stage" "cta stage"; align-items: end; column-gap: 40px; }
  .hero__cta { align-self: start; }
  .hero__stage { aspect-ratio: 1 / 1; align-self: center; }
}

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  min-height: 168px; padding: 14px; text-decoration: none; overflow: hidden;
  border: 2.5px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  background: var(--tile-bg, var(--paper)); transition: transform .15s, box-shadow .15s;
}
.tile:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.tile:hover { transform: translateY(-2px) rotate(-.4deg); }
.tile h3 { margin: 0; font-size: 1.05rem; position: relative; z-index: 1; }
.tile p { margin: 0; font-size: .8rem; font-weight: 700; color: var(--ink); position: relative; z-index: 1; line-height: 1.5; }
.tile img { position: absolute; right: -10px; bottom: -8px; width: 58%; max-width: 150px; pointer-events: none; }
.tile__go { position: relative; z-index: 1; align-self: flex-start; font-size: .78rem; font-weight: 700; background: var(--paper); border: 2px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.tile--wide { grid-column: 1 / -1; min-height: 130px; }
.tile--wide img { width: 36%; max-width: 170px; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, 1fr); } .tile { min-height: 210px; } .tile--wide { grid-column: span 2; } }

/* ---------- ranking ---------- */
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rank-item a { display: grid; grid-template-columns: 44px 56px 1fr auto; align-items: center; gap: 10px; text-decoration: none; background: var(--surface); border: 2.5px solid var(--line); border-radius: 18px; padding: 8px 12px 8px 8px; box-shadow: var(--shadow-sm); }
.rank-item a:hover { background: #fffdf8; }
.rank-no { font-family: var(--font-pop); font-size: 1.15rem; text-align: center; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); }
.rank-item:nth-child(1) .rank-no { background: var(--butter); }
.rank-item:nth-child(2) .rank-no { background: #e6e9f2; }
.rank-item:nth-child(3) .rank-no { background: var(--peach); }
.rank-ico { width: 56px; height: 56px; border-radius: 14px; border: 2px solid var(--line); background: var(--cream-2); object-fit: cover; }
.rank-name { font-weight: 700; line-height: 1.35; }
.rank-name small { display: block; font-weight: 500; font-size: .78rem; color: var(--muted); }
.rank-meter { font-size: .8rem; font-weight: 700; white-space: nowrap; }
.rank-item.is-mine a { background: var(--pink-2); }
.rank-item.is-top a { padding-block: 12px; }
.rank-item.is-top .rank-ico { width: 72px; height: 72px; }
.rank-item.is-top a { grid-template-columns: 44px 72px 1fr auto; }
.rank-reveal .rank-item { animation: rise .45s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* sign grid */
.sign-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sign-grid a { display: flex; flex-direction: column; align-items: center; text-decoration: none; background: var(--surface); border: 2.5px solid var(--line); border-radius: 18px; padding: 8px 4px 10px; box-shadow: var(--shadow-sm); font-weight: 700; font-size: .9rem; line-height: 1.3; text-align: center; }
.sign-grid a:active { transform: translateY(3px); box-shadow: none; }
.sign-grid img { width: 72%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 2px solid var(--line); background: var(--cream-2); margin-bottom: 4px; }
.sign-grid small { font-weight: 500; font-size: .7rem; color: var(--muted); }
.sign-grid a.is-mine { background: var(--pink-2); }
@media (min-width: 700px) { .sign-grid { grid-template-columns: repeat(6, 1fr); } }

/* type grid / carousel */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 700px) { .type-grid { grid-template-columns: repeat(4, 1fr); } }
.type-card { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 2.5px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); }
.type-card img { aspect-ratio: 1; object-fit: cover; background: var(--cream-2); border-bottom: 2px solid var(--line); }
.type-card b { font-family: var(--font-pop); font-weight: 400; font-size: .95rem; padding: 8px 10px 0; line-height: 1.4; }
.type-card span { font-size: .75rem; font-weight: 700; color: var(--muted); padding: 0 10px 10px; line-height: 1.45; }
.type-card.is-mine { background: var(--pink-2); }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 42%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 14px; margin: 0 -16px; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; }
@media (min-width: 700px) { .scroller { grid-auto-columns: 22%; } }

/* ---------- mini tarot (home) ---------- */
.mini-tarot { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.flip { display: block; perspective: 900px; width: 120px; aspect-ratio: 7 / 12; cursor: pointer; border: 0; padding: 0; background: none; }
.flip__inner { display: block; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3, 1.3, .5, 1); }
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }
.flip__face { display: block; position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px; border: 2.5px solid var(--line); overflow: hidden; box-shadow: var(--shadow-sm); background: #241f4a; }
.flip__face img { width: 100%; height: 100%; object-fit: cover; }
.flip__front { transform: rotateY(180deg); }
.flip__front.is-reversed img { transform: rotate(180deg); }
.mini-tarot__result h3 { margin-bottom: .2em; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .field .label { font-weight: 700; font-size: .9rem; }
select, input[type="text"], input[type="date"], textarea {
  font: inherit; font-weight: 700; color: var(--ink); background: var(--paper);
  border: 2.5px solid var(--line); border-radius: 14px; padding: 10px 12px; min-height: 48px; width: 100%;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 0; min-width: 0; }

/* chips (radio pills) */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { cursor: pointer; border: 2px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: .9rem; min-height: 44px; }
.pill[aria-pressed="true"], .pill.is-on { background: var(--butter); box-shadow: var(--shadow-sm); }

/* ---------- result blocks ---------- */
.fortune-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .fortune-grid { grid-template-columns: 1fr 1fr; } }
.fortune { border: 2.5px solid var(--line); border-radius: 18px; padding: 14px 16px; background: var(--paper); }
.fortune h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: .3em; }
.fortune p { margin: 0; }
.fortune--love { background: #fff0f5; } .fortune--work { background: #effaf5; } .fortune--money { background: #fffbe9; } .fortune--social { background: #f3f0ff; }
.lucky { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .lucky { grid-template-columns: repeat(4, 1fr); } }
.lucky div { border: 2px dashed var(--line); border-radius: 16px; padding: 10px 12px; background: var(--paper); }
.lucky span { display: block; font-size: .75rem; font-weight: 700; color: var(--muted); }
.lucky b { display: flex; align-items: center; gap: 6px; font-size: 1rem; line-height: 1.4; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.stars { letter-spacing: .1em; color: var(--deep); }
.unapi-say { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.unapi-say img { width: 64px; height: 64px; border-radius: 50%; border: 2.5px solid var(--line); background: var(--mint); object-fit: cover; }
.unapi-say .bubble::after { left: -11px; bottom: 18px; transform: rotate(135deg) skew(8deg, 8deg); }

/* trait bars */
.bars { display: grid; gap: 12px; }
.bar { display: grid; gap: 4px; }
.bar__labels { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; }
.bar__track { position: relative; height: 18px; border: 2px solid var(--line); border-radius: 999px; background: var(--paper); overflow: hidden; }
.bar__fill { position: absolute; inset: 0 auto 0 0; background: var(--mint-2); border-right: 2px solid var(--line); border-radius: 999px; transition: width 1s cubic-bezier(.3, 1.2, .5, 1); }
.bar__name { font-size: .78rem; color: var(--muted); font-weight: 700; text-align: center; }

/* ---------- shindan ---------- */
.quiz { min-height: 60vh; display: grid; align-content: start; gap: 18px; }
.quiz__progress { position: relative; height: 22px; border: 2.5px solid var(--line); border-radius: 999px; background: var(--paper); }
.quiz__progress i { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(45deg, var(--mint-2) 0 10px, var(--mint) 10px 20px); border-radius: 999px; transition: width .4s; }
.quiz__eel { position: absolute; top: 50%; width: 40px; height: 40px; transform: translate(-50%, -55%); transition: left .4s; border-radius: 50%; border: 2px solid var(--line); background: var(--mint); object-fit: cover; }
.quiz__count { font-weight: 700; font-size: .9rem; color: var(--muted); display: flex; justify-content: space-between; }
.quiz__q { font-family: var(--font-pop); font-size: clamp(1.2rem, 5vw, 1.6rem); line-height: 1.55; min-height: 3.2em; margin: 6px 0 0; outline: none; }
.scale { border: 0; margin: 0; padding: 0; }
.scale__btns { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin: 6px 0 4px; }
.scale__btn { flex: none; border-radius: 50%; border: 2.5px solid var(--line); background: var(--paper); cursor: pointer; padding: 0; transition: transform .12s, background .2s; display: grid; place-items: center; font-weight: 700; color: transparent; }
.scale__btn:active { transform: scale(.9); }
.scale__btn[data-v="1"], .scale__btn[data-v="7"] { width: 42px; height: 42px; }
.scale__btn[data-v="2"], .scale__btn[data-v="6"] { width: 36px; height: 36px; }
.scale__btn[data-v="3"], .scale__btn[data-v="5"] { width: 32px; height: 32px; }
.scale__btn[data-v="4"] { width: 28px; height: 28px; }
.scale__btn[data-v="1"], .scale__btn[data-v="2"], .scale__btn[data-v="3"] { background: #eae6ff; }
.scale__btn[data-v="5"], .scale__btn[data-v="6"], .scale__btn[data-v="7"] { background: #e3f7ee; }
.scale__btn.is-selected { background: var(--pink) !important; box-shadow: var(--shadow-sm); }
.scale__ends { display: flex; justify-content: space-between; font-weight: 700; font-size: .82rem; }
.scale__ends span:first-child { color: #5a4aa8; } .scale__ends span:last-child { color: #1f7a57; }
@media (min-width: 420px) {
  .scale__btn[data-v="1"], .scale__btn[data-v="7"] { width: 54px; height: 54px; }
  .scale__btn[data-v="2"], .scale__btn[data-v="6"] { width: 46px; height: 46px; }
  .scale__btn[data-v="3"], .scale__btn[data-v="5"] { width: 40px; height: 40px; }
  .scale__btn[data-v="4"] { width: 34px; height: 34px; }
}
.quiz__react { min-height: 2.4em; }
.quiz__nav { display: flex; justify-content: space-between; align-items: center; }
.thinking { display: grid; place-items: center; gap: 14px; padding: 40px 0; text-align: center; }
.thinking img { width: 180px; animation: wobble 1s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }

/* ---------- type page ---------- */
.type-hero { display: grid; gap: 16px; align-items: center; }
.type-hero__art { position: relative; border: 2.5px solid var(--line); border-radius: 32px; overflow: hidden; background: var(--cream-2); box-shadow: var(--shadow); }
.type-hero__art img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.type-hero__code { position: absolute; left: 12px; top: 12px; }
.type-hero h1 { margin-bottom: .2em; }
.type-hero__catch { font-weight: 700; font-size: 1.1rem; }
@media (min-width: 800px) { .type-hero { grid-template-columns: 1fr 1.1fr; gap: 36px; } }
.my-result { background: var(--pink-2); }
.aruaru { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.aruaru li { background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px 8px 40px; position: relative; font-weight: 700; }
.aruaru li::before { content: "わかる"; position: absolute; left: 6px; top: 50%; transform: translateY(-50%) rotate(-8deg); font-size: .58rem; background: var(--butter); border: 1.5px solid var(--line); border-radius: 6px; padding: 0 3px; line-height: 1.5; }
.compat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compat a { display: grid; grid-template-columns: 56px 1fr; gap: 8px; align-items: center; text-decoration: none; background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 8px; font-weight: 700; font-size: .85rem; line-height: 1.35; }
.compat img { width: 56px; height: 56px; border-radius: 12px; border: 2px solid var(--line); object-fit: cover; }
.compat small { display: block; font-size: .72rem; color: var(--muted); }
.dl { display: grid; gap: 12px; }
.dl div { border-left: 6px solid var(--mint-2); padding: 2px 0 2px 12px; }
.dl dt { font-weight: 700; font-size: .85rem; color: var(--muted); }
.dl dd { margin: 0; font-weight: 700; }

/* ---------- omikuji (daily) ---------- */
.kuji-stage { display: grid; place-items: center; gap: 10px; padding: 8px 0; }
.kuji-box { width: min(260px, 70vw); cursor: pointer; background: none; border: 0; padding: 0; }
.kuji-box img { width: 100%; border-radius: 50%; border: 2.5px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.kuji-box.is-shaking img { animation: shake .7s ease-in-out 2; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg) translateY(-4px); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-8deg) translateY(-6px); } 80% { transform: rotate(6deg); } }
.kuji-paper { position: relative; text-align: center; background: #fffdf6; border: 2.5px solid var(--line); border-radius: 18px; padding: 22px 18px 18px; box-shadow: var(--shadow); overflow: hidden; }
.kuji-paper::before { content: ""; position: absolute; inset: 8px; border: 2px dashed rgba(201, 46, 99, .35); border-radius: 12px; pointer-events: none; }
.kuji-level { font-family: var(--font-pop); font-size: clamp(2.2rem, 12vw, 3.6rem); line-height: 1.1; color: var(--deep); margin: 4px 0 8px; }
.kuji-paper.is-in { animation: unroll .7s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes unroll { from { transform: scaleY(.1) translateY(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
.streak { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 80; }

/* ---------- tarot (night) ---------- */
.theme-night {
  --bg: #1d1a3a; --surface: #2a2552; --text: #fff3e6; --muted: #d6cff5; --line: #fff3e6;
  --shadow: 0 5px 0 #0e0c22; --shadow-sm: 0 3px 0 #0e0c22;
  color-scheme: dark;
  background-image: radial-gradient(rgba(255, 243, 230, .16) 1px, transparent 1.4px), radial-gradient(rgba(255, 224, 138, .12) 1px, transparent 1.4px);
  background-size: 40px 40px, 67px 67px; background-position: 0 0, 20px 30px;
}
.theme-night .topbar { border-bottom-color: #4b4390; }
.theme-night .logo small { color: var(--muted); }
.theme-night .btn { color: var(--ink); border-color: var(--ink); box-shadow: 0 5px 0 #0e0c22; }
.theme-night .btn--ghost { --btn-bg: #fff3e6; }
.theme-night .card { border-color: #6a5fc0; }
.theme-night .pill { background: #2a2552; color: var(--text); border-color: #8d82d8; }
.theme-night .pill[aria-pressed="true"] { background: var(--butter); color: var(--ink); border-color: var(--ink); }
.theme-night .bubble { color: var(--ink); }
.theme-night a:hover { text-decoration-color: var(--butter); }
.theme-night :focus-visible { outline-color: var(--butter); }
.theme-night select, .theme-night textarea, .theme-night input { background: #fff3e6; }
.tarot-stage {
  position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 70vh; min-height: 420px;
  border-radius: 28px; overflow: hidden; border: 2.5px solid #6a5fc0;
  background: radial-gradient(ellipse at 50% 110%, #5a4fa8 0%, #2a2552 45%, #15122e 100%);
  touch-action: pan-y;
}
.tarot-stage__deck { pointer-events: none; position: absolute; left: 50%; top: 36%; width: 110px; transform: translate(-50%, -50%) rotate(-4deg); border-radius: 10px; border: 3px solid var(--butter); box-shadow: 6px 6px 0 #0e0c22; animation: bob 3.2s ease-in-out infinite; }
.tarot-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.tarot-stage__ui { position: absolute; left: 0; right: 0; bottom: 14px; display: grid; justify-items: center; gap: 8px; z-index: 2; padding: 0 14px; text-align: center; pointer-events: none; }
.tarot-stage__ui > * { pointer-events: auto; }
.tarot-stage__msg { font-weight: 700; background: rgba(21, 18, 46, .78); border: 2px solid #8d82d8; border-radius: 999px; padding: 6px 16px; font-size: .92rem; }
.tarot-stage__top { position: absolute; left: 14px; right: 14px; top: 12px; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 8px; pointer-events: none; font-weight: 700; font-size: .85rem; }
.tarot-stage__top > * { pointer-events: auto; }
.tarot-flat { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 70px 12px 110px; }
.tarot-flat button { aspect-ratio: 7 / 12; border-radius: 6px; border: 1.5px solid #8d82d8; background: #241f4a url("/tarot/assets/img/cards/card-back.webp") center / cover; cursor: pointer; padding: 0; transition: transform .2s; }
.tarot-flat button:hover, .tarot-flat button:focus-visible { transform: translateY(-4px); }
.tarot-flat button[aria-pressed="true"] { outline: 3px solid var(--butter); transform: translateY(-6px); }
.reading-card { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; }
.reading-card img { width: 110px; border-radius: 10px; border: 2px solid var(--line); }
.reading-card img.is-reversed { transform: rotate(180deg); }
.reading-card__pos { font-size: .8rem; font-weight: 700; color: var(--butter); margin: 0; }
.reading-card__name { font-family: var(--font-pop); font-size: 1.15rem; margin: 0 0 .3em; }
.reading-card__name small { font-family: var(--font-body); font-size: .8rem; font-weight: 700; color: var(--muted); margin-left: 6px; }
.reading-list { display: grid; gap: 16px; }
.journal { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.journal li { border: 2px solid #6a5fc0; border-radius: 14px; padding: 8px 12px; font-size: .9rem; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.guide { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; }
.guide img { width: 76px; height: 76px; border-radius: 50%; border: 2px solid #8d82d8; object-fit: cover; background: #2a2552; }

/* ---------- seiza sky ---------- */
.theme-sky .sky-hero {
  position: relative; overflow: hidden; color: #fff8ef;
  background: linear-gradient(180deg, #2b2a6b 0%, #5d55a8 52%, #f0a8c0 100%);
  border-bottom: 2.5px solid var(--line);
}
.sky-hero canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; pointer-events: none; }
.sky-hero__in { position: relative; z-index: 1; padding: 26px 0 30px; }
.sky-hero h1 { text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.sky-hero p { font-weight: 700; }
.sky-hero .chip { color: var(--ink); }
.sign-hero { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: center; }
.sign-hero img { width: 132px; height: 132px; border-radius: 50%; border: 3px solid #fff8ef; background: var(--cream-2); object-fit: cover; box-shadow: 0 5px 0 rgba(0, 0, 0, .25); }
.sign-hero h1 { margin: 0; }
.rankbadge { display: inline-flex; align-items: baseline; gap: 4px; font-family: var(--font-pop); background: var(--butter); color: var(--ink); border: 2.5px solid var(--line); border-radius: 999px; padding: 2px 14px; box-shadow: var(--shadow-sm); }
.rankbadge b { font-size: 1.6rem; font-weight: 400; line-height: 1.2; }
.pair-hero { display: flex; align-items: center; justify-content: center; gap: 4px; }
.pair-hero img { width: 112px; height: 112px; border-radius: 50%; border: 3px solid #fff8ef; background: var(--cream-2); object-fit: cover; }
.pair-hero__heart { font-size: 2rem; animation: beat 1.2s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.level { display: inline-block; font-family: var(--font-pop); font-size: 1.4rem; padding: 2px 18px; border: 2.5px solid var(--line); border-radius: 999px; background: var(--butter); color: var(--ink); box-shadow: var(--shadow-sm); }
.pair-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pair-links a { display: flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 700; font-size: .82rem; background: var(--paper); border: 2px solid var(--line); border-radius: 12px; padding: 4px 6px; line-height: 1.3; }
.pair-links img { width: 32px; height: 32px; border-radius: 50%; flex: none; object-fit: cover; border: 1.5px solid var(--line); }
@media (min-width: 700px) { .pair-links { grid-template-columns: repeat(6, 1fr); } }
.picker { display: grid; gap: 14px; }
.picker .sign-grid button { display: flex; flex-direction: column; align-items: center; background: var(--surface); border: 2.5px solid var(--line); border-radius: 18px; padding: 6px 2px 8px; box-shadow: var(--shadow-sm); font-weight: 700; font-size: .82rem; cursor: pointer; line-height: 1.3; }
.picker .sign-grid button img { width: 70%; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--line); object-fit: cover; margin-bottom: 2px; }
.picker .sign-grid button[aria-pressed="true"] { background: var(--pink-2); transform: translateY(2px); box-shadow: none; }

/* ---------- share ---------- */
.share { display: grid; gap: 10px; }
.share__row { display: flex; flex-wrap: wrap; gap: 8px; }
.share__preview { width: min(240px, 60vw); border-radius: 18px; border: 2.5px solid var(--line); box-shadow: var(--shadow); margin: 6px auto; }
.btn--x { --btn-bg: #fff; } .btn--line { --btn-bg: #c6f2c9; }

/* ---------- prose / faq ---------- */
.prose { font-size: 1rem; }
.prose h2 { margin-top: 1.6em; font-size: 1.3rem; }
.prose h3 { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose table { border-collapse: collapse; width: 100%; font-size: .92rem; margin-bottom: 1em; display: block; overflow-x: auto; }
.prose th, .prose td { border: 2px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--butter); }
.prose .card, .prose section { margin-bottom: 18px; }
.faq details { background: var(--surface); border: 2.5px solid var(--line); border-radius: 18px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 700; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-family: var(--font-pop); font-size: 1.3rem; }
.faq details[open] summary::after { content: "−"; }
.faq details > div, .faq details > p { padding: 0 16px 14px; margin: 0; }
.crumbs { font-size: .82rem; font-weight: 700; padding-top: 12px; }
.crumbs a { text-decoration: none; }
.crumbs span[aria-hidden] { margin: 0 4px; color: var(--muted); }
.page-head { padding: 22px 0 6px; }
.page-head__art { width: 120px; float: right; margin: -6px 0 6px 10px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; z-index: 90; background: var(--ink); color: #fff; font-weight: 700; padding: 10px 18px; border-radius: 999px; transition: .25s; pointer-events: none; white-space: nowrap; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- footer ---------- */
.footer { margin-top: 40px; border-top: 2.5px solid var(--line); background: var(--surface); padding: 26px 0 30px; font-size: .88rem; }
.footer__brand { font-family: var(--font-pop); font-size: 1.15rem; margin-bottom: 6px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0; font-weight: 700; }
.footer p { margin-bottom: .6em; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s, transform .5s; }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* reserve space for client-rendered blocks (avoid layout shift) */
#rank-list:empty { min-height: 1040px; }
#home-rank:empty { min-height: 290px; }
.fortune p:empty { min-height: 5.4em; }
#sign-lead:empty { min-height: 3.6em; }
#w-text:empty { min-height: 7.2em; }
#f-risk:empty, #f-care:empty { min-height: 1.8em; }
.lucky b:empty { min-height: 1.4em; }
