/* The simulated app (xiaoya/appsim.py, templates/app*.html). Phone first and phone only:
   on a wide screen it is a phone-wide column. The diary pages inside it are styled by
   css/diary.css, the same file the pictures in LINE are drawn with. */
:root {
  --paper: #FBF6EC; --card: #FFFDF8; --ink: #3B332B; --muted: #8C8173; --line: #EBE1CF;
  --green: #5FA36A; --green-d: #3E7D4B; --coral: #EE8566; --coral-d: #B4512F; --mustard: #EDBE55; --sky: #6F9FCB;
  --cream: #FFF3D9; --pink: #FDE9E2; --mint: #EAF3EC;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #F1E9D8; color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.xa { max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: var(--paper); position: relative; }

.xa-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 8px; background: rgba(251, 246, 236, .94); backdrop-filter: blur(8px); }
.xa-top .b { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--green-d); letter-spacing: .06em; }
.xa-top svg { width: 22px; height: 22px; display: block; }
.xa-top em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--coral-d); background: var(--pink); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.xa-ghost { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 3px 14px; font-size: 13px; }

.xa-view { padding: 4px 16px calc(176px + var(--bottom)); min-height: 60vh; }
.xa-view.plain { padding-bottom: calc(92px + var(--bottom)); }
.xa-view.loading { opacity: .55; transition: opacity .15s; }
.xa-view h2 { font-family: var(--serif); font-weight: 700; font-size: 18px; margin: 24px 0 10px; display: flex; align-items: baseline; gap: 8px; }
.xa-view h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; align-self: center; }
.xa-view h2 small { font-family: var(--sans); font-weight: 500; font-size: 11px; color: var(--muted); }
.xa-empty { color: var(--muted); font-size: 14.5px; margin: 6px 2px; }
.xa-fine { color: var(--muted); font-size: 11.5px; line-height: 1.6; margin: 10px 2px 0; }

.xa-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.xa-card h3 { margin: 0 0 6px; font-size: 15px; }
.xa-card p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.xa-card .k { font-size: 13px; color: var(--muted); }
.xa-card .big { font-family: var(--serif); font-weight: 900; font-size: 30px; line-height: 1.25; }
.xa-card .big small { font-family: var(--sans); font-weight: 500; font-size: 14px; margin-left: 4px; }
.xa-card .big s { text-decoration: none; color: var(--muted); font-size: 22px; }
.xa-card .big i { font-style: normal; font-family: var(--sans); font-weight: 500; font-size: 16px; color: var(--muted); margin: 0 6px; }

.xa-hello { display: flex; align-items: center; gap: 14px; margin: 6px 0 4px; }
.xa-hello .face { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--cream); border: 3px solid var(--card); box-shadow: 0 4px 14px rgba(48, 36, 24, .12); display: grid; place-items: center; font-size: 30px; flex: none; }
.xa-hello .face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xa-hello h1 { font-family: var(--serif); font-weight: 900; font-size: 24px; line-height: 1.25; margin: 0; }
.xa-hello p { margin: 0; font-size: 13.5px; color: var(--muted); }
.xa-ahead { background: var(--pink); color: var(--coral-d); font-weight: 700; border-radius: 14px; padding: 9px 14px; margin-top: 12px; font-size: 14.5px; }

.xa-next { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.xa-next .xa-card:only-child { grid-column: span 2; }
.xa-next .big { font-size: 25px; color: var(--coral-d); white-space: nowrap; }
.xa-next .in { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.xa-next .sleeping { background: #EEF4FA; border-color: #D6E4F1; }
.xa-next .sleeping .big { color: var(--sky); font-variant-numeric: tabular-nums; }

.xa-card.need { background: var(--cream); border: 0; margin-top: 16px; }
.xa-prog { display: grid; grid-template-columns: 5.6em 1fr auto; align-items: center; gap: 10px; margin-top: 8px; font-size: 13.5px; }
.xa-prog .track { display: flex; gap: 4px; }
.xa-prog .track i { flex: 1; height: 10px; border-radius: 5px; background: #F3E3BD; }
.xa-prog .track i.on { background: var(--mustard); }
.xa-prog.done .track i { background: var(--green); }
.xa-prog b { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.xa-card.need .hint { color: var(--ink); font-size: 13px; }

.xa-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.xa-tiles span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: 14.5px; font-weight: 700; }
.xa-line { list-style: none; margin: 12px 0 0; padding: 2px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.xa-line li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.xa-line li:last-child { border-bottom: 0; }
.xa-line i { font-style: normal; width: 1.4em; text-align: center; flex: none; }
.xa-line span { flex: 1; min-width: 0; }
.xa-line img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: none; }
.xa-line em { font-style: normal; font-size: 12px; color: var(--muted); flex: none; }

.xa-list { list-style: none; margin: 0; padding: 6px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.xa-list li { position: relative; padding: 6px 0 6px 18px; font-size: 14.5px; line-height: 1.55; }
.xa-list li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.xa-list.age li::before { background: var(--sky); }
.xa-tries { list-style: none; margin: 0; padding: 0; counter-reset: xa; }
.xa-tries li { counter-increment: xa; position: relative; background: var(--mint); border-radius: 14px; padding: 10px 14px 10px 44px; margin-bottom: 8px; font-size: 14.5px; line-height: 1.55; }
.xa-tries li::before { content: counter(xa); position: absolute; left: 12px; top: 11px; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; font-size: 13px; line-height: 22px; text-align: center; }

/* 擔心的事: the three buttons on 今天, and the screen each one opens (app_concern.html) */
.xa-hint { color: var(--muted); font-size: 13px; margin: -6px 2px 10px; }
.xa-worries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.xa-worries.two { grid-template-columns: repeat(2, 1fr); }
.xa-worries button { border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 12px 4px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 4px 12px rgba(48, 36, 24, .05); }
.xa-worries button:active { transform: scale(.97); background: var(--cream); }
.xa-worries i { font-style: normal; font-size: 24px; line-height: 1.25; }
.xa-worries span { font-size: 14px; font-weight: 700; }
.xa-back { border: 0; background: none; color: var(--green-d); font-weight: 700; padding: 6px 2px 2px; font-size: 14.5px; }
.xa-hello.worry .face { background: var(--mint); }
.xa-hello .k { font-size: 12px; font-weight: 700; color: var(--green-d); letter-spacing: .1em; }
.xa-card.now { background: var(--cream); border: 0; margin-top: 12px; }
.xa-card.now ul { list-style: none; margin: 0; padding: 0; }
.xa-card.now li { position: relative; padding: 4px 0 4px 18px; font-size: 14.5px; line-height: 1.55; }
.xa-card.now li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--mustard); }
.xa-list.doctor { background: var(--pink); border-color: #F6D5CA; }
.xa-list.doctor li::before { background: var(--coral-d); }
.xa-src { margin: 14px 2px 0; font-size: 12.5px; color: var(--muted); }
.xa-src summary { font-weight: 700; padding: 4px 0; }
.xa-src ul { list-style: none; margin: 4px 0 0; padding: 0; }
.xa-src li { padding: 6px 0; border-top: 1px dashed var(--line); line-height: 1.5; }
.xa-src b { display: block; color: var(--ink); }
.xa-src a { color: var(--green-d); margin-left: 6px; white-space: nowrap; }

/* the record buttons and the tabs: fixed where the thumb is */
.xa-bar, .xa-tabs { position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 6; }
.xa-bar { bottom: calc(60px + var(--bottom)); display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 10px 12px 10px; background: linear-gradient(180deg, rgba(251, 246, 236, 0), var(--paper) 26%); }
.xa-bar button { border: 1px solid var(--line); background: var(--card); border-radius: 18px; padding: 8px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 0; box-shadow: 0 6px 16px rgba(48, 36, 24, .08); }
.xa-bar button:active { transform: scale(.96); background: var(--cream); }
.xa-bar i { display: block; color: #fff; }
.xa-bar i svg { display: block; width: 32px; height: 32px; }
.xa-bar .i-wake, .xa-bar .awake .i-sleep { display: none; }
.xa-bar .awake .i-wake { display: block; }
.xa-bar span { font-size: 12.5px; font-weight: 700; }
.xa-bar .more { background: var(--green-d); border-color: var(--green-d); color: #fff; }
.xa-bar button.awake { background: #EEF4FA; border-color: #D6E4F1; }
.xa-tabs { bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: calc(60px + var(--bottom)); padding-bottom: var(--bottom); background: var(--card); border-top: 1px solid var(--line); }
.xa-tabs button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; color: var(--muted); }
.xa-tabs i { display: block; filter: grayscale(1); opacity: .55; }
.xa-tabs i svg { display: block; width: 26px; height: 26px; }
.xa-tabs span { font-size: 11.5px; }
.xa-tabs button.on { color: var(--green-d); font-weight: 700; }
.xa-tabs button.on i { filter: none; opacity: 1; }

/* sheets */
.xa-shade { position: fixed; inset: 0; background: rgba(48, 36, 24, .34); z-index: 8; }
.xa-sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; max-height: 86vh; overflow-y: auto; z-index: 9; background: var(--paper); border-radius: 24px 24px 0 0; padding: 8px 18px calc(18px + var(--bottom)); box-shadow: 0 -10px 40px rgba(48, 36, 24, .22); animation: xa-up .18s ease-out; }
@keyframes xa-up { from { transform: translate(-50%, 24px); opacity: .6; } to { transform: translate(-50%, 0); opacity: 1; } }
.xa-sheet .grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 12px; }
.xa-sheet h3 { font-family: var(--serif); font-size: 18px; margin: 0 0 10px; }
.xa-sheet .said { white-space: pre-line; font-size: 16px; line-height: 1.7; margin: 0 0 10px; }
.xa-sheet .said b { font-size: 18px; }
.xa-sheet img.shot { display: block; width: 100%; border-radius: 16px; margin: 0 0 12px; }
.xa-sheet video { display: block; width: 100%; border-radius: 16px; margin: 0 0 12px; background: #2B241D; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.chips button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 15px; font-size: 14.5px; }
.chips button:active { background: var(--cream); }
.chips button.undo { color: var(--coral-d); border-color: #F3C9BB; }
.xa-btn { display: block; width: 100%; border: 0; border-radius: 14px; background: var(--green-d); color: #fff; font-weight: 700; padding: 11px 16px; font-size: 15.5px; }
.xa-btn.quiet { background: #EFE6D4; color: var(--ink); font-weight: 500; }
.xa-btn[disabled] { opacity: .55; }
.xa-sheet form { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: center; margin: 0 0 12px; }
.xa-sheet form label { grid-column: span 2; font-size: 13px; color: var(--muted); }
.xa-sheet form .xa-btn { width: auto; padding: 9px 16px; }
.xa-sheet form .two { display: flex; align-items: center; gap: 8px; }
.xa-sheet form .two b { font-weight: 500; color: var(--muted); flex: none; }
.xa-sheet form .two input { flex: 1; }
/* two clocks do not leave room for a button beside them: it goes underneath */
.xa-sheet form.wide { grid-template-columns: 1fr; }
.xa-sheet form.wide label { grid-column: auto; }
.xa-sheet form.wide .xa-btn { width: 100%; }
.xa-sheet #fb-form { grid-template-columns: 1fr; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 9px 12px; font-size: 16px; min-width: 0; }
textarea { resize: vertical; }
.xa-sheet .ok { color: var(--green-d); font-weight: 700; }

/* first launch */
.xa-onboard { position: fixed; inset: 0; z-index: 12; overflow-y: auto; background: var(--paper); padding: calc(28px + env(safe-area-inset-top, 0px)) 20px calc(28px + var(--bottom)); max-width: 480px; margin: 0 auto; }
.xa-onboard .logo svg { width: 64px; height: 64px; display: block; margin: 0 auto 6px; }
.xa-onboard h1 { font-family: var(--serif); font-weight: 900; font-size: 25px; text-align: center; margin: 0 0 10px; }
.xa-onboard > p { font-size: 14.5px; color: var(--muted); margin: 0 0 6px; }
.xa-onboard .card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin-top: 16px; }
.xa-onboard h2 { font-family: var(--serif); font-size: 18px; margin: 0 0 4px; }
.xa-onboard .card p { font-size: 13.5px; color: var(--muted); margin: 0 0 10px; }
.xa-onboard .chips button { background: var(--green-d); color: #fff; border-color: var(--green-d); font-weight: 700; padding: 9px 16px; }
.xa-onboard label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.xa-onboard label input, .xa-onboard label select { margin-top: 4px; }
.xa-onboard .note { text-align: center; color: var(--coral-d); font-weight: 700; min-height: 1.6em; margin-top: 14px; }

.xa-toast { position: fixed; left: 50%; bottom: calc(190px + var(--bottom)); transform: translateX(-50%); z-index: 14; background: rgba(48, 36, 24, .9); color: #fff; border-radius: 22px; padding: 8px 18px; font-size: 14px; width: max-content; max-width: 86vw; text-align: center; white-space: pre-line; line-height: 1.55; box-shadow: 0 6px 18px rgba(48, 36, 24, .25); }

/* 日記 */
.xa-seg { display: grid; grid-template-columns: repeat(3, 1fr); background: #EFE6D4; border-radius: 12px; padding: 3px; margin: 6px 0 14px; }
.xa-seg button { border: 0; background: none; border-radius: 10px; padding: 6px 0; font-size: 14.5px; color: var(--muted); }
.xa-seg button.on { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 1px 4px rgba(48, 36, 24, .1); }
.xa-issue { margin: 0 -16px; }
.xa-issue .xy-issue { max-width: none; padding-bottom: 6px; }
.xa-card.film { margin-bottom: 14px; }
.xa-card.film h3 small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.xa-card.film video { display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; background: #2B241D; margin: 6px 0 10px; }
.xa-card.film .state { color: var(--coral-d); font-weight: 700; }

/* 成長 */
.xa-card.chart { margin-bottom: 12px; }
.xa-card.chart svg { display: block; width: 100%; height: auto; margin: 6px 0 2px; overflow: visible; }
.xa-card.chart polyline { fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.xa-card.chart circle { fill: var(--card); stroke: var(--green-d); stroke-width: 2.2; }
.xa-firsts { margin-left: 6px; }

/* 我的 */
.xa-card.baby { background: var(--green-d); border: 0; color: #fff; margin-top: 6px; }
.xa-card.baby h1 { font-family: var(--serif); font-weight: 900; font-size: 26px; margin: 0; line-height: 1.3; }
.xa-card.baby p { color: #E6F2E8; }
.xa-people { list-style: none; margin: 0; padding: 2px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.xa-people li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.xa-people li:last-child { border-bottom: 0; }
.xa-people em { font-style: normal; font-size: 11px; color: var(--green-d); background: var(--mint); border-radius: 999px; padding: 0 8px; }
.xa-people span { margin-left: auto; font-size: 13px; color: var(--muted); }
.xa-card .xa-btn { margin-top: 10px; }
.xa-link { display: block; margin-top: 8px; padding: 8px 10px; background: #F3ECDD; border-radius: 10px; font-size: 12px; word-break: break-all; user-select: all; -webkit-user-select: all; }
.xa-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.xa-plans ul { margin: 6px 0 0; padding-left: 1.1em; font-size: 13px; color: var(--muted); }
.xa-plans .pro { background: var(--cream); border-color: #F1DFAF; }
.xa-plans .big { font-size: 24px; }

/* 提醒通知 (push.py): the card's data-state says which parts show. */
.xa-remind { list-style: none; margin: 10px 0 0; padding: 0; }
.xa-remind li { padding: 9px 0; border-top: 1px dashed var(--line); }
.xa-remind label { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.xa-remind input { width: 18px; height: 18px; accent-color: var(--green-d); }
.xa-remind span { display: block; margin: 2px 0 0 26px; font-size: 12.5px; color: var(--muted); }
.xa-push [data-for] { display: none; }
.xa-push .state { color: var(--ink); font-size: 13.5px; margin-top: 10px; }
.xa-push[data-state="off"] [data-for="off"], .xa-push[data-state="on"] [data-for="on"],
.xa-push[data-state="ios"] [data-for="ios"], .xa-push[data-state="unsupported"] [data-for="unsupported"],
.xa-push[data-state="denied"] [data-for="denied"], .xa-push[data-state="none"] [data-for="none"] { display: block; }

/* Test accounts (2026-11-17, main.js): the consent tick, the join screen, 我的's number,
   invitations and 「刪除資料」. Only added rules: the page from before them is unchanged. */
.xa-onboard label.agree { display: flex; align-items: flex-start; gap: 8px; color: var(--ink); font-size: 13.5px; margin: 4px 0 12px; }
.xa-onboard label.agree input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--green-d); }
.xa-onboard label.agree a { color: var(--green-d); font-weight: 700; }
.xa-two { display: flex; gap: 8px; margin-top: 10px; }
.xa-two .xa-btn { flex: 1; }
.xa-invite { margin-top: 12px; }
.xa-invite p { margin: 0; font-size: 13.5px; }
.xa-account .no { font-family: var(--serif); font-weight: 900; font-size: 26px; color: var(--green-d); }
.xa-account p { margin: 4px 0 0; }
.xa-btn.danger { background: #FBE3DC; color: var(--coral-d); }
.xa-card > [data-copy] { margin-top: 10px; }

/* 健康 (2026-11-18, app_health.html, health.py): the vaccination card, the medicines, their forms,
   and the two lines on 今天. The tab bar above now takes any number of tabs (four before). */
.xa-seg.two { grid-template-columns: repeat(2, 1fr); }
.xa-gate { background: var(--cream); border: 0; }
.xa-gate form { margin-top: 10px; }
.xa-gate label.agree { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; margin: 6px 0 12px; }
.xa-gate label.agree input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--green-d); }
.xa-gate a { color: var(--green-d); font-weight: 700; }

.vx-top { margin-top: 4px; }
.vx-top .big { font-size: 26px; color: var(--green-d); }
.vx-top.k-open .big, .vx-top.k-booked .big { color: var(--coral-d); }
.vx-top .in { font-size: 13.5px; font-weight: 700; }
.vx-top ul { margin: 8px 0 0; padding-left: 1.2em; font-size: 14.5px; }
.vx-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 2px 14px; }
.vx-group { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.vx-group:last-child { border-bottom: 0; }
.vx-group header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.vx-group header b { font-size: 14px; }
.vx-group header span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.vx-group.open header b { color: var(--coral-d); }
.vx-group ul { list-style: none; margin: 4px 0 0; padding: 0; }
.vx-group .xa-fine { margin: 0 0 4px 26px; }
.vx-dose { width: 100%; display: grid; grid-template-columns: 18px 1fr; gap: 0 8px; align-items: start; text-align: left; border: 0; background: none; padding: 5px 0; }
.vx-dose[disabled] { color: inherit; opacity: 1; cursor: default; }
.vx-dose i { grid-row: span 2; width: 16px; height: 16px; margin-top: 4px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); }
.vx-dose.s-given i { background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 3px var(--card); }
.vx-dose.s-booked i { border-color: var(--coral); background: var(--pink); }
.vx-dose.s-open i { border-color: var(--coral); }
.vx-dose .n { font-size: 14.5px; line-height: 1.45; }
.vx-dose .s { font-size: 12.5px; color: var(--muted); }
.vx-dose.s-booked .s, .vx-dose.s-open .s { color: var(--coral-d); font-weight: 700; }
.vx-dose.s-given .s { color: var(--green-d); }
.vx-all { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 4px 14px; font-size: 13px; margin: 4px 0 0 26px; }
.vx-add { margin-top: 10px; }
.vx-paid p { margin: 4px 0 8px; }

.med-card { margin-bottom: 12px; }
.med-head { display: flex; align-items: baseline; gap: 8px; }
.med-head b { font-size: 17px; }
.med-head span { font-size: 14px; color: var(--coral-d); font-weight: 700; }
.med-card .how { margin: 2px 0 0; }
.med-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.med-chips > * { border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 4px 10px; font-size: 13px; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.35; }
.med-chips b { font-size: 14px; }
.med-chips span span, .med-chips button span { font-size: 11.5px; color: var(--muted); }
.med-chips .s-done { background: var(--mint); border-color: #CFE5D3; }
.med-chips .s-done b { color: var(--green-d); }
.med-chips .s-miss { border-style: dashed; border-color: #F3C9BB; }
.med-chips .s-next { border-color: var(--coral); }
.med-card .next { color: var(--coral-d); font-weight: 700; font-size: 14.5px; }
.med-card .meta { font-size: 12.5px; }
.med-add { margin-top: 12px; }
.med-past b { margin-right: 4px; }

/* the forms on 健康 (a sheet a screen brings along: main.js data-open, data-fill) */
.xa-sheet .xa-form { display: block; }
.xa-form label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.xa-form label input, .xa-form label select { margin-top: 4px; }
.xa-form label.agree { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
.xa-form label.agree input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--green-d); }
.xa-form label.sub { margin-bottom: 4px; }
.xa-sheet .xa-form .xa-btn { width: 100%; margin-top: 4px; padding: 11px 16px; }
.xa-form > .xa-fine { margin: 8px 2px 0; }
.xa-radio { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 0 0 10px; }
.xa-sheet .xa-radio label { grid-column: auto; }  /* the older .xa-sheet form label spans two columns */
.xa-radio label { margin: 0; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 10px; color: var(--ink); font-size: 13.5px; }
.xa-radio input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--green-d); }
.xa-medform .times { display: none; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 10px; }
.xa-medform[data-per_day="1"] .times[data-n="1"], .xa-medform[data-per_day="2"] .times[data-n="2"],
.xa-medform[data-per_day="3"] .times[data-n="3"], .xa-medform[data-per_day="4"] .times[data-n="4"] { display: grid; }
.xa-medform .times input { padding: 8px 10px; }
.xa-medform .when-prn, .xa-medform[data-mode="prn"] .when-times { display: none; }
.xa-medform[data-mode="prn"] .when-prn { display: block; }

.xa-hl { display: grid; gap: 8px; margin-top: 12px; }
.xa-hl-vx { border: 0; background: var(--pink); color: var(--coral-d); font-weight: 700; border-radius: 14px; padding: 9px 14px; font-size: 14.5px; text-align: left; }
.med-mini { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; }
.med-mini .t { flex: 1; min-width: 0; cursor: pointer; }
.med-mini .t span { font-size: 13.5px; color: var(--coral-d); font-weight: 700; }
.med-mini p { margin: 2px 0 0; font-size: 12.5px; }
.med-mini .xa-btn { width: auto; flex: none; padding: 9px 18px; margin: 0; }

/* the test version's number (2026-11-18): bottom of 我的 and of the first screen */
.xa-version { text-align: center; color: var(--muted); font-size: 11.5px; margin: 22px 0 4px; }
