/* Consolidated subscription ProfilePage values; no late cascade patches. */
.account-body { display: grid; min-width: 0; gap: 8px; padding-inline: calc(var(--page-inline) + var(--safe-inline-start)) calc(var(--page-inline) + var(--safe-inline-end)); }
/* 會員資料與訂閱方案：兩張一般流向的卡片，外框、圓角、內距與下方選項列及子頁章節卡同一套；內容全為即時文字。 */
.account-membership-stack { display: grid; min-width: 0; gap: 8px; }
/* 卡片外框只有這一份：會員兩張卡、子頁章節卡與方案頁的訂閱須知（lpa-membership.css）共用。 */
.account-profile-card, .account-subscription-card, .account-detail-card, .lpa-plan-terms { min-width: 0; padding: 12px; border: 1px solid var(--lpa-page-frame-muted); border-radius: var(--radius); background: var(--lpa-page-panel); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--lpa-page-frame) 22%, transparent), inset 0 0 28px var(--lpa-page-sheen-faint); }
.account-profile-card, .account-subscription-card { display: grid; gap: 12px; }
/* The one-line plan note sizes its type from this card's width. */
.account-subscription-card { container-type: inline-size; }
.account-profile-identity { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 10px; }
/* 浮水印有獨立欄位，避免覆蓋會員名稱。 */
.account-profile-watermark { height: 26px; color: var(--color-announcement-text); opacity: .09; pointer-events: none; }
.account-avatar { position: relative; width: 44px; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--lpa-page-frame); border-radius: 50%; background: var(--color-background); box-shadow: 0 0 0 3px var(--lpa-page-sheen-faint); }
.account-avatar svg { display: block; width: 100%; height: 100%; }
/* 會員自己的頭貼蓋在 LPA 標誌上；載入失敗時頁面移除圖片，露出標誌。 */
.account-avatar img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.account-profile-name { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.account-profile-name h2 { max-width: 100%; overflow-x: auto; scrollbar-width: none; min-width: 0; margin: 0; color: var(--color-text); font-size: 15px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.account-plan-tag { max-width: 100%; padding: 2px 8px; border: 1px solid var(--lpa-page-frame-muted); border-radius: var(--radius-pill); background: var(--lpa-page-sheen-faint); color: var(--color-announcement-text); font-size: 11px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
/* 階級沿用方案色，文字與圖示同時辨識；體驗及停權不是另一種付費階級。 */
.account-plan-tag[data-lpa-plan] { display: inline-flex; min-width: 0; min-height: 28px; align-items: center; gap: 6px; padding: 4px 8px; border-color: var(--lpa-plan-frame, var(--color-secondary)); border-radius: var(--radius); background: var(--lpa-plan-mark-surface, linear-gradient(180deg, color-mix(in srgb, var(--color-secondary) 18%, var(--color-background)), var(--color-surface))); box-shadow: inset 0 1px 0 var(--lpa-plan-sheen, var(--lpa-page-sheen-edge)), inset 0 -2px 0 rgb(0 0 0 / 24%); color: var(--lpa-plan-accent, var(--color-text)); }
.account-plan-tag[data-lpa-plan] > svg { width: 14px; height: 14px; flex: 0 0 auto; }
.account-plan-tag[data-lpa-plan] > span { min-width: 0; }
/* One line at most (owner, 2026-11-22): the note never wraps; on a very narrow card its type steps down to fit. */
.account-plan-note { margin: 0; min-width: 0; color: var(--color-secondary); font-size: min(13px, calc(100cqi / 22.5)); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 共用驗證列維持等寬；會員資料卡的審核入口另佔一列，兩顆一般登入按鈕保留圖示。 */
.account-auth-actions { display: grid; min-width: 0; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 8px; }
/* 審核入口只在會員資料卡另佔一列，避免擠壓一般登入，也不改刪除驗證及彈窗的排列。 */
.account-profile-card > .account-auth-actions[data-login-layout="profile"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row; }
.account-profile-card > .account-auth-actions[data-login-layout="profile"] > [data-login-provider="review"] { grid-column: 1 / -1; }
.account-auth-actions button { --key-frame: var(--key-tone, var(--lpa-page-frame-muted)); position: relative; display: flex; min-width: 0; min-height: var(--control-primary-height); padding: 0 3px; align-items: center; justify-content: center; gap: 4px; background: var(--key-option-lip), linear-gradient(180deg, color-mix(in srgb, var(--lpa-page-sheen) 9%, transparent), transparent 62%) var(--color-background) padding-box; box-shadow: inset 0 0 0 1px var(--key-frame), inset 0 1px 0 var(--lpa-page-sheen-edge); color: var(--key-text, var(--color-text)); font-size: 13px; font-weight: 600; line-height: 1.4; }
.account-auth-actions button > span { min-width: 0; overflow-wrap: anywhere; }
/* 刪除帳號鈕與登入鈕同一個元件；紅色只在這個容器上以變數帶入（框與字），不另寫覆蓋規則。 */
.account-auth-actions[data-tone="danger"] { --key-tone: var(--color-danger); --key-text: var(--color-danger); }
/* 登入鈕與入口鍵（關於頁的「查看 LPA 指南」等）預設是 2px 的選項按鍵（styles.css --key-*），沒有選中狀態；厚度、圓角、下沉與厚邊色都經變數（--key-lip 等）帶入，「查看方案與價格」以同一套規則改成 3px 主要按鍵。框改畫成內側 1px 線
   （--key-frame），厚邊是下框，從原高度扣出，按鈕外框與卡片都不動；左右內距多 1px 補回原本的框，文字寬度不變。厚邊色是各自的框色以
   同一比例混黑；底下同樣畫一層厚邊（--key-option-lip 在這裡依本身框色重算），按住時面下沉、厚邊剩 1.5px，底緣不動。 */
:is(.account-auth-actions button, .account-subscription-entry) { --key-lip-color: color-mix(in srgb, var(--key-lip-base, var(--key-frame)) var(--key-lip-mix), #000); --key-option-lip: linear-gradient(var(--key-lip-color), var(--key-lip-color)) left 0 bottom 0 / 100% var(--key-lip, var(--key-lip-option)) no-repeat border-box; border: 0 solid transparent; border-bottom: var(--key-lip, var(--key-lip-option)) solid var(--key-lip-color); border-radius: var(--key-radius, var(--key-option-radius)); }
:is(.account-auth-actions button, .account-subscription-entry):not(:disabled):active { border-bottom-color: transparent; background-position: left 0 bottom var(--key-sink, var(--key-sink-option)), 0 0; background-size: 100% calc(var(--key-lip, var(--key-lip-option)) - var(--key-sink, var(--key-sink-option))), auto; translate: 0 var(--key-sink, var(--key-sink-option)); box-shadow: inset 0 0 0 1px var(--key-frame), var(--key-pressed-drop, 0 0 transparent); }
/* 主要按鈕的框依字級收在 --control-primary-height，點按範圍由看不見的外擴補到 44px，以整顆鍵（面＋厚邊）為中心。 */
:is(.account-auth-actions button, .account-subscription-entry)::after { position: absolute; inset: calc(-1 * var(--control-primary-hit-outset)) 0 calc(-1 * var(--key-lip, var(--key-lip-option)) - var(--control-primary-hit-outset)); content: ''; }
/* 登入服務接上前按鈕不可操作，外觀不使用全站的停用淡化。 */
.account-auth-actions button:disabled { opacity: 1; cursor: default; }
.account-auth-actions:is(:not(:has(> :nth-child(3))), [data-login-layout="profile"]) :is([data-login-provider="line"], [data-login-provider="google"])::before { width: 16px; height: 16px; flex: 0 0 auto; background-position: center; background-repeat: no-repeat; background-size: contain; content: ''; }
.account-auth-actions [data-login-provider="line"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2306c755' d='M12 3C6.48 3 2 6.72 2 11.31c0 4.11 3.56 7.56 8.36 8.21.33.07.77.22.88.5.1.26.07.66.03.92l-.14.87c-.04.26-.2 1.02.88.56 1.08-.45 5.82-3.43 7.94-5.87C21.42 14.89 22 13.25 22 11.31 22 6.72 17.52 3 12 3Z'/%3E%3Ctext x='12' y='13.1' text-anchor='middle' font-family='Arial,sans-serif' font-size='4.2' font-weight='700' fill='%23fff'%3ELINE%3C/text%3E%3C/svg%3E"); }
.account-auth-actions [data-login-provider="google"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3a9 9 0 0 1 6.36 2.64' stroke='%23EA4335' stroke-width='3.2' stroke-linecap='round'/%3E%3Cpath d='M18.36 5.64A9 9 0 0 1 21 12' stroke='%23FBBC05' stroke-width='3.2' stroke-linecap='round'/%3E%3Cpath d='M21 12a9 9 0 0 1-9 9' stroke='%2334A853' stroke-width='3.2' stroke-linecap='round'/%3E%3Cpath d='M12 21a9 9 0 1 1 0-18' stroke='%234285F4' stroke-width='3.2' stroke-linecap='round'/%3E%3Cpath d='M21 12h-8' stroke='%234285F4' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.account-plan-heading { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 10px; }
.account-plan-heading h2 { white-space: nowrap; min-width: 0; margin: 0; flex: 1 1 auto; color: var(--color-text); font-size: 15px; font-weight: 600; line-height: 1.4; }
/* 方案徽章：Insight 藍、Precision 金沿用方案頁的方案色（lpa-membership.css）；沒有付費方案時用中性色。 */
.account-plan-badge { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border: 1px solid var(--lpa-plan-frame, var(--lpa-page-frame-muted)); border-radius: var(--radius); background: var(--lpa-plan-mark-surface, var(--lpa-page-sheen-faint)); box-shadow: inset 0 1px 0 var(--lpa-plan-sheen, transparent); color: var(--lpa-plan-accent, var(--color-secondary)); }
.account-plan-badge svg { width: 15px; height: 15px; }
/* 訂閱資訊各佔一列，版式是說明頁共用的資訊列（page-ui.css 的 .doc-facts）；沒有的項目不留空列。 */
.account-subscription-entry { --key-frame: var(--entry-frame, var(--lpa-page-frame)); position: relative; display: flex; min-width: 0; min-height: var(--control-primary-height); padding: 0 13px; align-items: center; justify-content: center; gap: 6px; background: var(--key-option-lip), var(--entry-face, linear-gradient(180deg, color-mix(in srgb, var(--lpa-page-sheen) 6%, transparent), transparent 40%) var(--color-background)) padding-box; box-shadow: inset 0 0 0 1px var(--key-frame), var(--entry-sheen, inset 0 1px 0 var(--lpa-page-sheen-edge)), var(--entry-drop, 0 0 transparent); color: var(--entry-text, var(--color-announcement-text)); font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.4; cursor: pointer; transition: scale var(--motion-fast) ease; }
/* 「查看方案與價格」是我的頁唯一的主要行動：金色實心、深色字的 3px 主要按鍵，與方案頁 Precision 訂閱鈕同一組金色
   （styles.css --gold-key-*）。只在這顆鍵上以變數帶入，元件規則不變；關於頁的「查看 LPA 指南」仍是選項按鍵。 */
.account-subscription-entry[data-key="primary"] { --key-lip: var(--key-lip-primary); --key-radius: var(--key-primary-radius); --key-sink: var(--key-sink-primary); --key-lip-base: var(--gold-action); --key-pressed-drop: var(--key-primary-pressed-shadow); --entry-frame: var(--gold-key-frame); --entry-face: var(--gold-key-face); --entry-text: var(--gold-key-text); --entry-sheen: inset 0 1px 0 rgb(255 255 255 / 24%); --entry-drop: 0 2px 8px rgb(0 0 0 / 45%); }
.account-subscription-entry > span { min-width: 0; overflow-wrap: anywhere; }
.account-subscription-entry > svg { width: 14px; height: 14px; flex: 0 0 auto; }
.account-subscription-entry:active { scale: var(--control-press-scale); }
/* 我的頁選項：四組小標籤，每組是一張清單卡，登入後最後另有一顆登出鍵；每列等高（44px），依序為圖示、名稱、靠右的一句說明與箭頭，全部單行。 */
.account-options { display: grid; min-width: 0; gap: 16px; margin-top: 8px; }
.account-group { display: grid; min-width: 0; gap: 8px; }
/* 登出放在最後、獨立一顆按鍵（與「查看 LPA 指南」同一種選項按鍵），不和刪除帳號同組，也不做成清單列，避免誤按。 */
.account-logout { display: grid; min-width: 0; }
.account-group h2 { white-space: nowrap; display: flex; align-items: center; margin: 0; gap: 8px; color: var(--color-announcement-text); font-size: 12px; font-weight: 600; letter-spacing: .08em; line-height: 1.4; }
.account-group h2::after { flex: 1 1 0; height: 1px; background: color-mix(in srgb, var(--page-divider) 80%, var(--lpa-page-sheen)); content: ''; }
/* 每組是一張圓角卡：面板上疊一層微弱的灰，與頁面底色分得出區塊。 */
.account-rows { display: grid; min-width: 0; border: 1px solid var(--lpa-page-frame-muted); border-radius: var(--radius); background: linear-gradient(rgb(148 160 178 / 7%), rgb(148 160 178 / 7%)), var(--lpa-page-panel); box-shadow: inset 0 1px 0 var(--lpa-page-sheen-edge); }
/* 登出是按鈕、其他列是連結，外觀同一套；按下時整列亮一層，圓角跟著卡片的上下兩角。 */
.account-row { display: grid; width: 100%; min-width: 0; height: var(--target-size); padding: 0 12px; grid-template-columns: 28px auto minmax(0, 1fr) 14px; align-items: center; column-gap: 10px; border: 0; background: transparent; color: var(--color-text); font: inherit; line-height: 1.4; text-align: left; cursor: pointer; transition: scale var(--motion-fast) ease, background-color var(--motion-fast) ease; }
.account-row:first-child { border-start-start-radius: calc(var(--radius) - 1px); border-start-end-radius: calc(var(--radius) - 1px); }
.account-row:last-child { border-end-start-radius: calc(var(--radius) - 1px); border-end-end-radius: calc(var(--radius) - 1px); }
/* 列與列之間的細線畫在列內，不佔高度，每列仍是同一個高度。 */
.account-row + .account-row { box-shadow: inset 0 1px 0 var(--page-divider); }
.account-row:active { scale: var(--control-press-scale); background-color: rgb(255 255 255 / 7%); }
.account-row:focus-visible, .account-contents button:focus-visible, .account-subscription-entry:focus-visible { outline: 2px solid var(--color-selected); outline-offset: 2px; }
.account-row-mark { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid var(--lpa-page-frame); border-radius: var(--radius); background: linear-gradient(180deg, color-mix(in srgb, var(--lpa-page-sheen) 16%, transparent), transparent 72%); color: var(--color-announcement-text); }
.account-row-mark svg { width: 15px; height: 15px; }
.account-row strong { white-space: nowrap; font-size: 13px; font-weight: 600; }
.account-row small { min-width: 0; text-wrap: balance; color: var(--color-secondary); font-size: 12px; text-align: right; }
.account-row > svg { width: 14px; height: 14px; color: var(--color-gold); }

/* 刪除頁的動作區接在段落之後，排版沿用說明頁文字區塊（doc-blocks），所以這裡只補與段落之間的距離與完成訊息。 */
.account-deletion-action { margin-top: 8px; }
.account-deletion-status:empty { display: none; }
.account-deletion-done { color: var(--color-text); font-size: 15px; font-weight: 600; outline: none; }
/* 子頁文件：單一閱讀欄。四節以上先列兩欄等寬的「本頁內容」捷徑（節數固定為偶數，每列排滿），各節為展開的卡片。
   捷徑的框是緊湊高度；點按範圍上下各外擴到列距的一半，相鄰兩列的範圍相接而不重疊。 */
.account-document { display: grid; min-width: 0; gap: 8px; }
.account-contents ol { --contents-gap: 8px; display: grid; margin: 2px 0; padding: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--contents-gap); list-style: none; counter-reset: account-section; }
.account-contents li { display: grid; min-width: 0; counter-increment: account-section; }
.account-contents button { position: relative; display: flex; min-width: 0; height: var(--control-compact-height); padding: 0 10px; align-items: center; gap: 6px; border: 1px solid var(--lpa-page-frame-muted); border-radius: var(--radius); background: transparent; color: var(--doc-text); font: inherit; font-size: 12px; line-height: 1.4; text-align: left; overflow-wrap: anywhere; cursor: pointer; transition: scale var(--motion-fast) ease; }
.account-contents button::before { margin-inline: var(--doc-inline-gap); color: var(--color-gold); font-family: var(--font-latin); font-variant-numeric: tabular-nums; font-weight: 700; content: counter(account-section, decimal-leading-zero); }
.account-contents button::after { position: absolute; inset: calc(-1px - var(--contents-gap) / 2) -1px; content: ''; }
.account-contents button:active { scale: var(--control-press-scale); }
.account-detail-card { scroll-margin-top: var(--page-anchor-offset); }
.account-detail-card h2 { white-space: nowrap; display: flex; align-items: baseline; margin: 0 0 8px; gap: 8px; color: var(--doc-heading); font-size: 15px; font-weight: 600; line-height: 1.4; outline: 0; }
.account-detail-card h2 > span { color: var(--color-gold); font-family: var(--font-latin); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .account-row, .account-contents button, .account-subscription-entry { transition: none; } }
@media (forced-colors: active) {
  .account-profile-card, .account-subscription-card, .account-rows, .account-detail-card, .lpa-plan-terms { outline: 1px solid CanvasText; }
  .account-profile-watermark { display: none; }
  /* 按鍵只畫 1px 系統色外框（顏色由瀏覽器依狀態決定，與改前相同），厚邊與內側線不畫。 */
  :is(.account-auth-actions button, .account-subscription-entry) { border: 1px solid; }
}

.account-auth-status { margin: 0; color: var(--color-secondary); font-size: 13px; line-height: 1.5; text-wrap: balance; }
.account-auth-status:empty { display: none; }
.account-review-dialog { width: min(22rem, calc(100% - 32px)); max-height: calc(100dvh - 32px); box-sizing: border-box; padding: 16px; overflow-y: auto; border: 1px solid var(--lpa-page-frame-muted); border-radius: var(--radius); color: var(--color-text); background: var(--color-background); }
.account-review-dialog::backdrop { background: rgb(0 0 0 / .6); }
.account-review-dialog :is(form, label) { display: grid; }
.account-review-dialog form { gap: 12px; }
.account-review-dialog label { gap: 8px; }
.account-review-dialog h2 { margin: 0; font-size: 15px; line-height: 1.4; }
.account-review-dialog label { font-size: 13px; }
.account-review-dialog input { min-width: 0; box-sizing: border-box; width: 100%; min-height: var(--control-primary-height); padding: 4px 8px; color: var(--color-text); background: var(--color-background); border: 1px solid var(--lpa-page-frame-muted); border-radius: var(--radius); font: inherit; }
