/* 相性診断（部屋の種類 aisho）。テーマ色は1色 #be3a6e（白い文字と 5.22:1・地の #fafaf8 と 5.00:1・淡い地 #fdf2f6 と 4.78:1）
   12問の画面は精神年齢診断と同じ部品（.opt-card など）を使い、色だけこの中で差し替える
   ボタンはどれも 44px 以上。320px の幅でも横にはみ出さない */
.ai-page, .ai-land { --c-seishin: #be3a6e; --c-seishin-t: #fdf2f6; --ai: #be3a6e; --ai-t: #fdf2f6; }
.ai-btn { background: var(--ai); }
.ai-eyebrow { color: var(--ai); }
.ai-back { margin-top: 14px; }
.ai-page .linklike, .ai-land .linklike { min-height: 44px; }
.ai-back-top { margin-top: 12px; }
.ai-quiz .opt-card { padding: 14px; }
.ai-make .field input:focus, .ai-page .field input:focus { border-color: var(--ai); }

/* 作る前・答える前の決まり文句（枠で囲む） */
.ai-sees { background: var(--ai-t); border: 1.5px solid color-mix(in srgb, var(--ai) 35%, #fff); border-radius: 16px; padding: 14px 16px; display: grid; gap: 6px; margin-top: 14px; }
.ai-sees h2 { font-size: 16px; }
.ai-sees p { font-size: 14.5px; color: var(--ink2); }
.ai-sees .ai-self { font-weight: 700; color: var(--ink); }
.ai-count-line { font-size: 15px; color: var(--ink2); }
.ai-count-line b { font-family: var(--f-round); font-size: 18px; color: var(--ink); margin: 0 2px; }
.ai-foot { margin-top: 22px; display: grid; gap: 4px; }
.ai-foot a { color: var(--ink2); font-weight: 700; }

/* ふたりの画面 */
.ai-result { padding-top: 16px; }
.ai-result .rcard .num { display: flex; align-items: baseline; }
.ai-num { font-variant-numeric: tabular-nums; }
.ai-again { margin-top: 14px; }
.ai-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; font-weight: 700; color: var(--ink2); }
.ai-key { display: inline-block; width: 16px; height: 16px; border-radius: 50%; margin-left: 6px; vertical-align: -3px; }
.ai-key:first-child { margin-left: 0; }
.ai-key.a { background: var(--ai); }
.ai-key.b { background: #fff; border: 3px solid var(--ai); }
.ai-axes { display: grid; gap: 10px; }
.ai-axis { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 10px; display: grid; gap: 6px; min-width: 0; }
.ai-axis-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ai-axis-head b { font-family: var(--f-round); font-size: 15.5px; }
.ai-word { flex: none; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink2); background: #fff; white-space: nowrap; }
.ai-word.d0 { background: var(--ai); border-color: var(--ai); color: #fff; }
.ai-word.d1 { background: var(--ai-t); border-color: var(--ai-t); color: var(--ai); }
.ai-word.role { border-style: dashed; border-color: var(--ai); color: var(--ai); }
.ai-word.pos { background: var(--ai-t); border-color: var(--ai-t); color: var(--ai); }
.ai-track { padding: 14px 13px; }
.ai-line { position: relative; height: 4px; border-radius: 2px; background: var(--line); }
.ai-tick { position: absolute; top: 50%; width: 2px; height: 12px; margin-left: -1px; transform: translateY(-50%); background: #d4d4ce; border-radius: 1px; }
.ai-dot { position: absolute; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; }
.ai-dot.a { width: 16px; height: 16px; background: var(--ai); z-index: 2; }
.ai-dot.b { width: 26px; height: 26px; background: #fff; border: 3px solid var(--ai); z-index: 1; }
.ai-ends { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.ai-ends span:last-child { text-align: right; }
.ai-point { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--ai); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; }
.ai-point b { font-family: var(--f-round); font-size: 17px; }
.ai-point .ai-who { font-size: 14px; font-weight: 700; color: var(--ai); }
.ai-point p { font-size: 15px; color: var(--ink2); }
.ai-point.comp { border-left-style: dashed; }
.ai-plain { font-size: 15px; color: var(--ink2); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ai-mirror { margin-top: 18px; }
.ai-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; font-size: 15px; cursor: pointer; }
.ai-check input { width: 22px; height: 22px; accent-color: var(--ai); flex: none; }
.ai-page .invite { margin-top: 0; }
.ai-check { padding: 0 2px; }
.ai-confirm { margin-top: 6px; }
.ai-cta .btn { margin-top: 2px; }

/* 作った人の画面 */
.ai-callout { border-color: var(--ai); margin-top: 14px; }
.ai-keep-key { margin-top: 16px; } /* 鍵を保存できなかったときの自分用のリンク（「もう一度読む」の下にも出る） */
.ai-closed { font-weight: 700; color: var(--ai); }
.ai-mine-note { margin-top: 12px; font-size: 15px; color: var(--ink2); background: var(--ai-t); border-radius: 14px; padding: 12px 14px; }
.ai-empty { margin-top: 14px; font-size: 15px; color: var(--ink2); background: #fff; border: 1.5px dashed var(--line); border-radius: 14px; padding: 14px; }
.ai-rank-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ai-rank-head h2 { font-size: 21px; }
.ai-sort { margin-top: 0; }
.ai-sort button { min-height: 44px; padding: 5px 14px; }
.ai-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ai-row { display: grid; gap: 6px; }
.ai-row-line { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 6px; }
.ai-row-main { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: "rank name pct" "rank band band"; column-gap: 8px; row-gap: 0; align-items: center; min-height: 60px; padding: 10px 12px; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; min-width: 0; }
.ai-row-main:hover { border-color: color-mix(in srgb, var(--ai) 45%, #fff); }
.ai-rank { grid-area: rank; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-round); font-weight: 800; font-size: 14px; color: #fff; }
.ai-rank:empty { visibility: hidden; }
.top1 .ai-rank, .top2 .ai-rank, .top3 .ai-rank { background: var(--ai); }
.ai-row-name { grid-area: name; font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ai-row-pct { grid-area: pct; font-family: var(--f-round); font-size: 22px; font-weight: 800; color: var(--ai); font-variant-numeric: tabular-nums; }
.ai-row-band { grid-area: band; font-size: 13px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ai-row-more { min-height: 44px; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; font-size: 20px; font-weight: 800; color: var(--ink2); cursor: pointer; line-height: 1; }
.ai-row-more[aria-expanded="true"] { border-color: var(--ai); color: var(--ai); }
.ai-row-menu { background: #fff; border: 1.5px solid #f1c5cf; border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; font-size: 14.5px; color: var(--ink2); }
.ai-summary h2 { display: grid; gap: 2px; }
.ai-sum-n { font-size: 14px; font-weight: 700; color: var(--ink2); font-family: var(--f-body); }
.ai-facts .fact.wide { grid-column: 1 / -1; }
.ai-facts .ai-big { font-size: 30px; color: var(--ai); font-variant-numeric: tabular-nums; }
.ai-accept-state { font-size: 15.5px; }
.ai-accept-state b { color: var(--ai); }
.ai-accept-state.off b { color: var(--ink2); }
.ai-until { margin-top: 18px; }

/* 入口 /aisho/ */
.ai-land .ai-hero { padding: 22px 0 6px; display: grid; gap: 14px; }
.ai-land .ai-hero h1 { font-size: clamp(28px, 7.6vw, 36px); }
.ai-land .ai-hero .rcard { --tc: var(--ai); }
.ai-land .ai-hero .rcard .num { font-size: clamp(76px, 24vw, 108px); }
.ai-land .sn-points b { color: var(--ai); }
.ai-land .steps li::before { background: var(--ai); }
.ai-axis-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ai-axis-list li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; display: grid; gap: 2px; font-size: 14px; color: var(--ink2); }
.ai-axis-list b { font-family: var(--f-round); font-size: 15.5px; color: var(--ink); }
.ai-axis-list .ai-side { display: inline-block; }
.ai-axis-list em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--ai); }
.ai-bands { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ai-bands li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: baseline; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 14.5px; }
.ai-bands li b { font-family: var(--f-round); color: var(--ai); font-variant-numeric: tabular-nums; }
.ai-mine-list { display: grid; gap: 8px; }
.ai-mine-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 10px 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; text-decoration: none; font-weight: 700; }
.ai-mine-list a span:last-child { color: var(--ai); flex: none; }
.ai-land .how-link { min-height: 44px; display: inline-flex; align-items: center; }
/* 背の低いスマホ（320×568 の小さいスマホ・横向き）: 「リンクを作る」が1画面目に入るように、見本のカードと間を少し詰める（app.css の .sn-intro と同じ）
   幅でもしぼる（ノートパソコンの低い窓では詰めない）。横向きのスマホは高さ500px以下で見る */
@media (max-height: 640px) and (max-width: 600px), (orientation: landscape) and (max-height: 500px) {
  .ai-land .ai-hero { padding-top: 14px; gap: 10px; }
  .ai-land .ai-hero .rcard .eb { margin-top: 8px; }
  .ai-land .ai-hero .rcard .num { font-size: clamp(56px, 17vw, 76px); }
}

@media (max-width: 360px) {
  .ai-row-main { grid-template-columns: 26px minmax(0, 1fr) auto; padding: 10px; }
  .ai-rank { width: 24px; height: 24px; font-size: 13px; }
  .ai-row-pct { font-size: 20px; }
  .ai-bands li { grid-template-columns: 64px minmax(0, 1fr); }
}
