/* Personal service additions on top of the corporate design (app.css copied from yng4check-corp 0.8.0). */
.topbar .who { gap: 6px; }
.brand .mark { font-family: var(--serif); font-weight: 700; }
.pr-intro h1 { font-size: 26px; margin-top: 8px; }
.pr-lead { margin-top: 8px; font-size: 14px; }
#start-form { margin-top: 18px; }
.dur { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dur-b { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font: inherit; cursor: pointer; color: var(--text); min-height: 72px; justify-content: center; }
.dur-b b { font-family: var(--serif); font-size: 22px; line-height: 1.1; }
.dur-b span { font-size: 12px; color: var(--muted); text-align: center; }
.dur-b[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-soft); }
.dur-b[aria-pressed="true"] span { color: var(--teal-hover); font-weight: 600; }
.pr-prof { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pr-age-err:empty { display: none; }
.pr-age-err { margin-top: 10px; }
#age-note { margin: 8px 0 16px; }
.pr-steps { margin-top: 18px; }
.pr-steps ol { list-style: decimal; padding-left: 20px; display: block; }
.pr-steps li { display: list-item; margin: 4px 0; }
.pr-intro > .faint:last-child { margin-top: 14px; }
.pr-foot { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; padding: 0 16px 40px; font-size: 13px; }
.pr-foot a { color: var(--muted); }

/* stress hero */
.sh { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.sh.high { background: #fff8e6; border-color: #ecd08a; border-left: 7px solid #d08a00; }
.sh-row { display: flex; gap: 20px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.sh-gauge { position: relative; width: 220px; max-width: 100%; flex: none; margin: 0 auto; }
.sg { width: 100%; height: auto; }
.sg path { fill: none; stroke-width: 18; stroke-linecap: butt; }
.sg-low { stroke: #9fd0e0; } .sg-mid { stroke: #e6dccd; } .sg-high { stroke: #f0b765; }
.sg-dot { fill: var(--text); stroke: #fff; stroke-width: 3; }
.sg-t { font-size: 10px; fill: var(--faint); }
.sh-num { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-family: var(--serif); font-size: 52px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.sh-num small { font-family: var(--sans); font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.sh-side { flex: 1 1 220px; min-width: 0; }
.sh-head { font-family: var(--serif); font-size: 19px; font-weight: 700; margin-top: 8px; }
.sh-text { font-size: 14px; color: #5f5450; margin-top: 6px; }
.sh-scale { display: flex; justify-content: space-between; gap: 6px; margin-top: 14px; font-size: 11px; color: var(--muted); }
.sh-scale span { flex: 1; text-align: center; padding: 3px 0; border-radius: 6px; }
.sh-scale span:nth-child(1) { background: #e6f3f7; } .sh-scale span:nth-child(2) { background: #f4efe7; } .sh-scale span:nth-child(3) { background: #fdf0d8; }
.sh.na .sh-head { margin-top: 6px; }

/* rating */
.rate { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.rate-q { font-weight: 700; font-size: 16px; text-align: center; }
.stars { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.star { width: 48px; height: 48px; border: 0; background: transparent; font-size: 36px; line-height: 1; color: #ddd2cc; cursor: pointer; padding: 0; border-radius: 10px; }
.star.on { color: #e7a321; }
.stars-ends { display: flex; justify-content: space-between; max-width: 290px; margin: 4px auto 0; font-size: 11px; color: var(--muted); }
.consent { margin-top: 14px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; font-size: 12.5px; color: #5f5450; line-height: 1.7; }
.consent p + p { margin-top: 4px; }
.rate-btns { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.rate-btns .btn { width: 100%; }
.rate-msg:empty { display: none; }
.rate-msg { font-size: 13px; color: var(--bad); text-align: center; margin-top: 6px; }
.rate-done { text-align: center; font-size: 14px; padding: 12px; background: var(--ok-bg); color: var(--ok); border-radius: 12px; }
.rate-done.muted { background: var(--surface-2); color: var(--muted); }

/* actions */
.pr-actions { display: flex; flex-direction: column; gap: 12px; }
.pr-cta { background: var(--teal-soft); border: 1px solid #bfe3ea; border-radius: var(--radius); padding: 16px 18px; }
.pr-cta p { font-size: 13px; color: #3d5a60; margin-top: 4px; }
.pr-cta-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pr-cta-btns .btn.teal { flex: 1 1 180px; }
.pr-saved { font-size: 14px; text-align: center; }
.pr-err { text-align: center; } .pr-err .btn { margin-top: 12px; }

/* auth */
.g-btn { gap: 10px; }
.g-logo { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; color: #4285f4; font-size: 13px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; margin-top: 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* history */
.big { font-size: 34px; font-weight: 700; line-height: 1.2; }
.hc-svg { width: 100%; height: auto; margin-top: 8px; }
.hc-low { fill: #eef7fa; } .hc-mid { fill: #faf7f2; } .hc-high { fill: #fdf3e1; }
.hc-line { fill: none; stroke: var(--teal-hover); stroke-width: 2.5; }
.hc-dot { fill: #fff; stroke: var(--teal-hover); stroke-width: 2; }
.hc-t { font-size: 10px; fill: var(--faint); }
.ht { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.ht th, .ht td { padding: 8px 6px; border-bottom: 1px solid var(--line-2); text-align: left; white-space: nowrap; }
.ht th { font-size: 12px; color: var(--muted); font-weight: 600; }
.bw { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.bw.low { background: #e3effb; color: #0b4f96; } .bw.moderate { background: #eef0f1; color: #4b5559; } .bw.high { background: #fff1d6; color: #7a4b00; }
.doc ul { padding-left: 20px; } .doc h2 { margin-top: 18px; }

@media (max-width: 420px) {
  .pr-intro h1 { font-size: 22px; }
  .sh-num { font-size: 46px; }
  .star { width: 44px; height: 44px; font-size: 32px; }
}

/* gifts */
.gf-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gf-plan { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px; border: 1.5px solid var(--line, #e6dcd6); border-radius: 14px; background: #fff; cursor: pointer; font: inherit; color: inherit; position: relative; }
.gf-plan.on { border-color: var(--teal, #2aa3b3); background: var(--teal-soft, #e8f6f8); box-shadow: 0 0 0 2px rgba(42,163,179,.18); }
.gf-m { font-weight: 700; font-size: 15px; }
.gf-p { font-size: 18px; font-weight: 800; }
.gf-x { font-size: 11px; color: var(--muted); }
.gf-note { font-size: 10px; font-weight: 700; color: #8a5a00; background: #fff1d6; border-radius: 999px; padding: 1px 6px; margin-top: 4px; white-space: nowrap; }
.gf-total .muted { display: block; font-size: 13px; }
.gf-qty select { max-width: 160px; }
.gf-total { font-size: 15px; }
.gf-notes { list-style: disc; padding-left: 20px; font-size: 13px; color: var(--muted); display: block; }
.gf-notes li { display: list-item; margin: 4px 0; }
.gf-oh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.gf-gifts { display: flex; flex-direction: column; gap: 10px; list-style: none; padding: 0; }
.gf-gift { border: 1px solid var(--line, #e6dcd6); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.gf-gh { display: flex; align-items: center; gap: 8px; }
.gf-act { display: flex; flex-wrap: wrap; gap: 8px; }
.gf-big { font-size: 22px; font-weight: 800; }
.gf-ask { background: #fff7e6; border: 1px solid #f1d9a6; border-radius: var(--radius); padding: 16px 18px; }

/* ---- face ID dialog ---- */
body.fx-open { overflow: hidden; }
.fx { position: fixed; inset: 0; z-index: 50; background: rgba(32, 26, 24, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.fx-box { background: #fff; border-radius: 18px; width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 12px; }
.fx-box h2 { margin: 0; font-size: 1.2rem; }
.fx-lead { margin: 0; font-size: .92rem; }
.fx-cam { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 52dvh; border-radius: 14px; overflow: hidden; background: #2a2422; }
.fx-cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.fx-oval { position: absolute; left: 50%; top: 47%; width: 62%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%); border: 3px solid rgba(255, 255, 255, .85); border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .28); pointer-events: none; }
.fx-icon { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: 2rem; font-weight: 700; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.fx-say { margin: 0; min-height: 1.6em; font-weight: 700; text-align: center; font-size: 1.05rem; }
.fx-steps { display: flex; justify-content: center; gap: 10px; list-style: none; margin: 0; padding: 0; }
.fx-steps li { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line, #e6dcd6); display: grid; place-items: center; font-weight: 700; color: #8a7d77; }
.fx-steps li.done { background: #2aa3b5; border-color: #2aa3b5; color: #fff; }
.fx-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.fx-btns .btn { min-width: 120px; }
.fx-consent { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; font-size: .93rem; line-height: 1.7; }
.chk { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.chk input { width: 20px; height: 20px; }
.face-login { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.face-login .small, .muted.small { font-size: .85rem; margin: 0; }
.btn.danger { color: #b3261e; }

/* Brand: RMJ logo + service name 顔ストレス年齢 (the name stays visible on phones; "YNG4check" is hidden there). */
.pr-brand { gap: 10px; }
.pr-logo { display: block; height: 24px; width: auto; flex: none; }
.pr-brand .pr-svc { color: var(--ink, #2a211e); font-weight: 700; font-size: 15px; }
@media (max-width: 560px) { .pr-brand .co { display: none; } .pr-brand .pr-svc { display: inline; font-size: 14px; } .pr-logo { height: 22px; } }

/* Why this score */
.sw { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.sw-title { font-family: var(--serif); font-size: 18px; margin: 0 0 6px; }
.sw-sum { margin: 0 0 12px; font-size: 14px; line-height: 1.75; }
.sw-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.sw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sw-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sw-n { font-weight: 700; font-size: 14px; }
.sw-e { font-size: 12px; color: var(--muted); white-space: nowrap; } .sw-e.up { color: #9a5a00; } .sw-e.down { color: #1f6f8b; }
.sw-bar { position: relative; height: 10px; background: #f1ece6; border-radius: 5px; margin: 5px 0 3px; overflow: hidden; }
.sw-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #b9aea6; }
.sw-fill { position: absolute; top: 0; bottom: 0; border-radius: 5px; } .sw-fill.up { background: #f0b765; } .sw-fill.down { background: #8ccbe0; } .sw-fill.flat { background: #d9cfc5; min-width: 4px; }
.sw-v { margin: 0; font-size: 12px; color: var(--muted); }
.sw-note { margin: 12px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.sw-acc { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 4px; }
.sw-acc summary { cursor: pointer; font-weight: 700; font-size: 14px; padding: 10px 0; color: var(--accent, #2aa3b3); }
.sw-body { font-size: 13.5px; line-height: 1.8; } .sw-body p { margin: 8px 0; }
.sw-items { margin: 4px 0 8px; padding-left: 1.2em; } .sw-items li { margin: 3px 0; }
.sw-sub { font-weight: 700; margin-top: 14px !important; }

/* Nickname field and the greeting after face confirmation */
.pr-nick { margin-top: 12px; } .pr-nick input { width: 100%; } .pr-nick .faint { margin: 6px 0 0; }
.pr-greet { text-align: center; padding: 40px 20px; }
.pr-greet-h { font-family: var(--serif); font-size: 24px; font-weight: 700; line-height: 1.5; margin: 0 0 10px; word-break: break-all; }
.pr-greet-t { margin: 0; color: var(--muted); }

/* Two-choice questions */
.pr-qs { margin-top: 14px; display: grid; gap: 12px; }
.pr-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.pr-q legend { font-size: 14px; font-weight: 700; padding: 0; margin-bottom: 8px; } .pr-q legend small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 4px; }
.pr-q-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pr-q-b { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 10px 6px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font: inherit; color: inherit; cursor: pointer; text-align: center; }
.pr-q-b b { font-size: 14px; line-height: 1.4; } .pr-q-b span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.pr-q-b[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-soft); } .pr-q-b[aria-pressed="true"] span { color: var(--teal-hover); }
.pr-qs .faint { margin: 0; }
.pr-q-b .nb { display: inline-block; font-style: normal; }

/* Saved answers (registered users) */
.pr-qsum { margin-top: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbf8f5; font-size: 14px; }
.pr-qsum-l { font-size: 12px; color: var(--muted); font-weight: 700; } .pr-qsum .btn { margin-left: auto; }

/* Stress type */
.stype-slot:empty { display: none; }
.st-wait { margin: 0; text-align: center; font-size: 13px; color: var(--muted); padding: 4px 0; }
.st { --g: #1f8a4c; --gs: #e7f5ec; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--g); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.st.g-relax { --g: #1f8a4c; --gs: #e7f5ec; } .st.g-hidden { --g: #c9a100; --gs: #fff7d1; } .st.g-mental { --g: #e07a1f; --gs: #fdeedd; } .st.g-max { --g: #c8372d; --gs: #fde9e6; }
.st-eyebrow { font-size: 12px; font-weight: 700; color: var(--muted); }
.st-group { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 8px; font-weight: 700; font-size: 14px; }
.st-group small { font-weight: 400; font-size: 12px; color: var(--muted); }
.st-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--g); flex: none; }
.st-name { font-family: var(--serif); font-size: 24px; line-height: 1.4; margin: 8px 0 6px; display: flex; align-items: baseline; gap: 10px; }
.st-no { font-family: var(--sans); font-size: 12px; font-weight: 700; color: #fff; background: var(--g); border-radius: 999px; min-width: 24px; height: 24px; display: inline-grid; place-items: center; padding: 0 6px; flex: none; transform: translateY(-3px); }
.st-text { margin: 0 0 8px; line-height: 1.8; }
.st-gap { margin: 0 0 10px; padding: 10px 12px; background: var(--gs); border-radius: 10px; font-size: 14px; line-height: 1.7; }
.st-hint { margin: 0; padding: 12px 14px; background: var(--gs); border-radius: 12px; line-height: 1.75; }
.st-hint b { display: block; font-size: 13px; color: var(--g); margin-bottom: 2px; }
.st-axes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0 0; }
.st-axes div { background: #f6f2ee; border-radius: 10px; padding: 8px 6px; text-align: center; } .st-axes dt { font-size: 11px; color: var(--muted); } .st-axes dd { margin: 2px 0 0; font-size: 13px; font-weight: 700; }
@media (max-width: 400px) { .st-axes { grid-template-columns: repeat(2, 1fr); } }
.st-note { margin: 12px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
