/* ===== 姓名判断 ===== */

.sm-phase { display: none; }
.sm-phase.active { display: block; }

/* --- 入力フォーム --- */
.sm-form-ttl { font-size: 16px; font-weight: 700; color: #1a1440; text-align: center; margin-bottom: 14px; }
.sm-form-ttl::before { content: '✍️ '; }
.sm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.sm-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sm-label { font-size: 12px; font-weight: 700; color: #6b60b0; letter-spacing: .06em; }
.sm-input {
  font-family: inherit; font-size: 20px; font-weight: 700; color: #1a1440; text-align: center;
  background: #f9f8ff; border: 1.5px solid #e0ddf8; border-radius: 12px;
  padding: 13px 8px; width: 100%; box-sizing: border-box; min-width: 0;
  appearance: none; -webkit-appearance: none; transition: border-color .18s;
}
.sm-input::placeholder { color: #c9c5ea; font-weight: 500; }
.sm-input:focus { outline: none; border-color: #7F77DD; }
.sm-err { font-size: 13px; color: #c0392b; background: #fdecea; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; line-height: 1.7; }

.sm-btn {
  display: block; width: 100%; font-family: inherit; font-size: 16px; font-weight: 700; color: #fff;
  background: #7F77DD; border: none; border-radius: 14px; padding: 17px; margin-top: 6px; cursor: pointer;
  letter-spacing: .04em; box-shadow: 0 4px 16px rgba(127,119,221,.32); transition: transform .18s, box-shadow .18s;
}
.sm-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(127,119,221,.42); }

.sm-note {
  font-size: 12px; color: #999; line-height: 1.8; margin-top: 16px; padding: 10px 14px;
  background: #f9f8ff; border-radius: 10px; border-left: 3px solid #AFA9EC;
}

/* --- 鑑定中 --- */
.sm-loading-card { text-align: center; padding: 56px 22px; }
.sm-loading-ring {
  width: 62px; height: 62px; margin: 0 auto 22px;
  border: 4px solid #e0ddf8; border-top-color: #7F77DD; border-radius: 50%;
  animation: smSpin 1s linear infinite;
}
@keyframes smSpin { to { transform: rotate(360deg); } }
.sm-loading-txt { font-size: 17px; font-weight: 700; color: #534AB7; margin-bottom: 8px; }
.sm-loading-sub { font-size: 13px; color: #999; line-height: 1.7; }

/* --- 本文の行ブロック --- */
.sm-line { display: block; text-wrap: pretty; }
.sm-line + .sm-line { margin-top: .85em; }

/* --- 名前と画数 --- */
.sm-name {
  display: flex; justify-content: center; align-items: stretch; gap: 8px 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, #eef0ff, #fdeef4); border-radius: 16px; padding: 18px 12px; margin-bottom: 14px;
}
.sm-name-grp { display: flex; gap: 5px; }
.sm-ch { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; background: #fff; border-radius: 12px; padding: 8px 6px 6px; min-width: 46px; box-shadow: 0 1px 4px rgba(83,74,183,.1); }
.sm-ch-c { font-size: 28px; font-weight: 700; color: #1a1440; line-height: 1.25; }
.sm-ch-n { font-size: 11px; font-weight: 700; color: #7F77DD; margin-top: 2px; }
.sm-ch.is-mei .sm-ch-n { color: #b0417a; }

.sm-rate { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.sm-rate-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #666; }
.sm-rate-row b { color: #E8A317; font-size: 15px; letter-spacing: 1px; font-weight: 400; }

/* --- 五格 --- */
.sm-kakus { display: flex; flex-direction: column; gap: 8px; }
.sm-kaku { background: #f9f8ff; border-radius: 12px; padding: 12px 14px; }
.sm-kaku.is-ten { background: #f6f6f8; }
.sm-kaku-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sm-kaku-name { flex: 1; font-size: 16px; font-weight: 700; color: #1a1440; line-height: 1.3; }
.sm-kaku-name small { display: block; font-size: 11px; font-weight: 400; color: #999; }
.sm-kaku-num { flex-shrink: 0; font-size: 22px; font-weight: 800; color: #534AB7; line-height: 1; }
.sm-kaku-num small { font-size: 11px; font-weight: 700; margin-left: 1px; }
.sm-badge { flex-shrink: 0; font-size: 12px; font-weight: 700; border-radius: 12px; padding: 4px 11px; line-height: 1.4; white-space: nowrap; }
.sm-badge.is-l3 { background: #E8A317; color: #fff; }
.sm-badge.is-l2 { background: #fde3ee; color: #b0417a; }
.sm-badge.is-l1 { background: #e3e0f9; color: #534AB7; }
.sm-badge.is-l0 { background: #e9ecf3; color: #55648c; }
.sm-badge.is-none { background: #ececf0; color: #888; font-size: 11px; }
.sm-kaku-body { font-size: 13px; color: #444; line-height: 1.8; text-wrap: pretty; }
.sm-kaku-kw { display: block; font-size: 13px; font-weight: 700; color: #534AB7; }

.sm-adv { margin-top: 12px; }
.sm-adv .aval { font-size: 13px; font-weight: 400; line-height: 1.85; color: #333; }
.sm-adv .akey { font-size: 11px; color: #7F77DD; font-weight: 700; margin-bottom: 8px; }

.sm-tip { background: #534AB7; border-radius: 14px; padding: 18px; margin-top: 18px; }
.sm-tip-ttl { font-size: 12px; color: rgba(255,255,255,.7); margin-bottom: 6px; letter-spacing: .08em; }
.sm-tip-body { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.8; text-wrap: pretty; }
.sm-small { font-size: 12px; color: #999; line-height: 1.8; margin-top: 12px; }

/* --- アコーディオン --- */
.sm-acc { margin-top: 22px; }
.sm-acc-btn {
  width: 100%; font-family: inherit; font-size: 14px; font-weight: 700; color: #534AB7;
  background: #f9f8ff; border: 1.5px solid #e0ddf8; border-radius: 12px; padding: 15px; cursor: pointer; transition: background .18s;
}
.sm-acc-btn:hover { background: #eeedfe; }
.sm-acc-body { margin-top: 12px; }
.sm-detail { background: #f9f8ff; border-radius: 12px; padding: 20px 18px; }
.sm-detail-ttl {
  font-size: 13px; font-weight: 700; color: #7F77DD; margin: 18px 0 8px; padding-left: 8px;
  border-left: 3px solid #7F77DD; letter-spacing: .04em;
}
.sm-detail-ttl:first-child { margin-top: 0; }
.sm-detail-text { font-size: 13px; color: #444; line-height: 2; }
.sm-detail-text + .sm-detail-text { margin-top: .85em; }

/* --- 文章を増やした分（強み・注意の箱、人生の流れ、三才、相性） --- */
.sm-kaku-pt { display: block; margin-top: 8px; padding: 8px 11px; border-radius: 9px; background: #fff; font-size: 12.5px; line-height: 1.75; color: #444; }
.sm-kaku-pt b { display: block; font-size: 11px; color: #b07a2a; letter-spacing: .04em; }
.sm-kaku-pt.is-care b { color: #55648c; }
.sm-box { font-size: 13px; color: #444; line-height: 1.85; border-radius: 12px; padding: 13px 15px; margin-top: 12px; border-left: 3px solid #7F77DD; background: #f9f8ff; }
.sm-box-key { display: block; font-size: 12px; font-weight: 700; color: #7F77DD; margin-bottom: 5px; letter-spacing: .04em; }
.sm-box.is-strong { background: #fff7e6; border-left-color: #E8A317; }
.sm-box.is-strong .sm-box-key { color: #b07a2a; }
.sm-box.is-care { background: #eef1f8; border-left-color: #8a97b8; }
.sm-box.is-care .sm-box-key { color: #55648c; }
.sm-box.is-love { background: #fdf1f6; border-left-color: #d98bb0; }
.sm-box.is-love .sm-box-key { color: #b0417a; }
.sm-match { background: #fdf1f6; border-radius: 12px; padding: 14px 15px; margin-top: 12px; }
.sm-match-ttl { font-size: 12px; font-weight: 700; color: #b0417a; margin-bottom: 9px; }
.sm-match-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sm-match-item { font-size: 13px; font-weight: 700; color: #1a1440; background: #fff; border-radius: 16px; padding: 6px 13px; }
.sm-match-note { font-size: 11.5px; color: #999; line-height: 1.75; margin-top: 9px; }
.sm-life { display: flex; flex-direction: column; gap: 8px; }
.sm-life-row { background: #f9f8ff; border-radius: 12px; padding: 12px 14px; }
.sm-life-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.sm-life-when { font-size: 15px; font-weight: 700; color: #1a1440; }
.sm-life-when small { font-size: 11px; font-weight: 400; color: #999; margin-left: 8px; }
.sm-life-stars { color: #E8A317; font-size: 14px; letter-spacing: 1px; }
.sm-life-body { font-size: 13px; color: #444; line-height: 1.8; text-wrap: pretty; }
.sm-sansai { display: flex; justify-content: center; align-items: center; gap: 8px; background: linear-gradient(135deg, #eef0ff, #fdeef4); border-radius: 14px; padding: 14px 10px; margin-bottom: 8px; }
.sm-sansai-el { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: #6b60b0; font-weight: 700; background: #fff; border-radius: 12px; padding: 7px 14px; }
.sm-sansai-el b { font-size: 22px; color: #1a1440; line-height: 1.3; }
.sm-sansai-ar { color: #AFA9EC; font-weight: 700; }
.sm-tip-sub { font-size: 13px; color: rgba(255,255,255,.85); line-height: 1.75; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.2); }

@media (max-width: 420px) {
  .sm-input { font-size: 18px; padding: 12px 4px; }
  .sm-ch { min-width: 38px; padding: 7px 3px 5px; }
  .sm-name { padding: 16px 8px; }
  .sm-ch-c { font-size: 24px; }
  .sm-kaku-num { font-size: 20px; }
}

/* 記事の一番下に置くシェアボタン */
#sm-share-bottom { margin: 28px 0 8px; }
#sm-share-bottom .sbtn, #sm-share-bottom .sbtn:hover { text-decoration: none; color: #fff; }

/* 見出しまわりの折り返し（1文字だけの行を作らない） */
#seimei-app .res-sub { text-wrap: balance; }
#seimei-app .res-name { white-space: nowrap; font-size: 26px; }
#seimei-app .hdr-sub { text-wrap: pretty; }
@media (max-width: 420px) {
  #seimei-app h2.hdr-ttl { font-size: 27px !important; }
}
@media (max-width: 380px) {
  #seimei-app h2.hdr-ttl { font-size: 24px !important; }
  #seimei-app .res-name { font-size: 23px; }
  #seimei-app .step { font-size: 12px; padding-left: 12px; padding-right: 12px; }
}
