/* 帳號、會員與開發者控制台 (js/account.js, js/admin-console.js). Colours come from style.css tokens. */
.acct-slot { display: flex; }
.acct-slot[hidden] { display: none; }
.acct-pill { padding: 0 calc(14px * var(--chrome)); }
/* signed in: one round avatar the size of the other header circles (聲音, 地球) at every width; the name is in its menu */
.acct-ava-btn { width: calc(44px * var(--chrome)); height: calc(44px * var(--chrome)); min-height: 0; padding: 0; justify-content: center; border-radius: 50%; flex: none; }
.acct-ava { width: calc(36px * var(--chrome)); height: calc(36px * var(--chrome)); border-radius: 50%; object-fit: cover; flex: none; background: var(--line); }
.acct-ava-none { display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 28%, #1d1813); color: #f1e6cc; font-size: calc(18px * var(--chrome)); font-weight: 700; line-height: 1; }
.acct-ava-lg { width: 56px; height: 56px; }

/* round icon buttons in the header (聲音, 語言): one circle; the drawing is centred by its own ink (icons.js centerInk) */
.icon-pill { width: calc(44px * var(--chrome)); height: calc(44px * var(--chrome)); min-height: 0; padding: 0; justify-content: center; gap: 0; flex: none; }
.icon-pill .sfx-ic, .icon-pill .lang-ic { display: grid; place-items: center; width: 100%; height: 100%; }
.icon-pill .ico, .icon-pill svg { width: calc(21px * var(--chrome)); height: calc(21px * var(--chrome)); }
.icon-pill:focus-visible, .acct-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-btn[aria-expanded="true"], .acct-pill[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }

/* header menu master (js/menu.js): under its button, right edges aligned */
.hmenu { position: fixed; z-index: 40; min-width: 200px; max-width: calc(100vw - 16px); padding: 6px; display: flex; flex-direction: column; gap: 2px;
  background: #1d1813; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .6); }
.hmenu button { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px;
  background: none; color: var(--text); font: inherit; font-size: var(--step--3); text-align: left; cursor: pointer; }
/* the avatar menu's heading: who is signed in (name, then e-mail), not pressable */
.hmenu-head { display: grid; gap: 2px; padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.hmenu-head b { font-size: var(--step--2); color: #f1e6cc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hmenu-head small { font-size: var(--step--4); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hmenu button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hmenu button[aria-checked="true"] { color: var(--accent); }
@media (hover: hover) { .hmenu button:hover { background: rgba(255, 240, 210, .06); } }
.hmenu-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; }
.hmenu-mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* switch (設定 > 按鍵音) */
.set-switch { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; }
.set-switch .set-note { grid-column: 1 / -1; color: var(--muted); font-size: var(--step--4); }
.switch { position: relative; width: 56px; height: 32px; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 240, 210, .06); cursor: pointer; }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--muted); transition: transform .18s, background .18s; }
.switch[aria-checked="true"] { background: rgba(211, 180, 120, .22); border-color: var(--accent); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(24px); background: var(--accent); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch::before { content: ""; position: absolute; inset: -6px; } /* 44px finger target */


.acct-card { display: flex; gap: 14px; align-items: center; margin: 4px 0 14px; }
.acct-card p { margin: 2px 0; }
.acct-ids { list-style: none; padding: 0; margin: 6px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.acct-ids li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.acct-ids small { color: var(--muted); }
.acct-ids .btn { margin-left: auto; }
.acct-gbtn:empty { display: none; }
.acct-gbtn { min-height: 48px; margin: 18px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
/* Google 登入（js/account.js mountButtons）：Google 品牌規範的自繪深色鈕——標準四色 G、底 #131314、1px #8E918F 內框、
   字 #E3E3E3、膠囊形；高度給老花眼 52px */
.g-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; max-width: 360px; min-height: 52px;
  padding: 0 24px; border-radius: 999px; background: #131314; color: #e3e3e3; border: 1px solid #8e918f; cursor: pointer;
  font: 500 var(--step--1)/1.2 Roboto, "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; letter-spacing: .04em; }
.g-btn:hover { background: #1f1f21; }
.g-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.g-btn:disabled { opacity: .7; cursor: progress; }
.g-logo { width: 22px; height: 22px; flex: none; }
.acct-lead { margin: 0 0 4px; }
.acct-legal { margin: 0; text-align: center; color: var(--muted); font-size: var(--step--4); }
.acct-err { color: var(--accent); }

/* 會員方案 (js/account.js renderMember): three plans side by side, rows of what each gives. 375 px: three ~104 px columns. */
.plan-intro { margin: 0 0 12px; }
.plan-wrap { margin: 0 -4px; }
.plan-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 4px 0; }
.plan-table th, .plan-table td { text-align: center; vertical-align: middle; padding: 6px 2px; border: 0; font-weight: 400; }
.plan-table .plan-head { vertical-align: top; padding: 12px 4px 10px; border: 1px solid var(--line); border-radius: 12px; }
.plan-table .plan-head.is-current { border-color: var(--accent); background: rgba(211, 180, 120, .07); }
.plan-table .plan-cells td { font-size: var(--step--4); line-height: 1.4; color: var(--text); border-bottom: 1px solid rgba(58, 49, 40, .6); }
.plan-table .plan-cells td.is-current { background: rgba(211, 180, 120, .07); }
.plan-table .plan-label th { padding: 12px 6px 2px; font-size: var(--step--4); color: var(--muted); text-align: left; }
.plan-name { display: block; font-size: var(--step-0); font-weight: 700; letter-spacing: .08em; color: #f1e6cc; }
.plan-price { display: block; margin: 4px 0 8px; line-height: 1.3; }
.plan-price b { display: block; font-size: var(--step--2); color: var(--accent); font-family: var(--num-font); }
.plan-price small { display: block; font-size: var(--step--4); color: var(--muted); }
.plan-now { display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); font-size: var(--step--4); white-space: nowrap; }
.plan-dim { border-color: var(--line); color: var(--muted); }
.plan-pick { justify-content: center; min-height: 40px; padding: 4px 12px; border-color: var(--accent); }
.plan-yes svg { width: 20px; height: 20px; fill: none; stroke: var(--good); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.plan-no { color: var(--muted); }
.plan-msg { min-height: 1.4em; margin: 10px 0 0; color: var(--accent); }
.plan-more { margin-top: 8px; }
.plan-more summary { cursor: pointer; color: var(--accent); min-height: 44px; display: flex; align-items: center; }
.plan-back { margin: -4px 0 4px; }
@media (max-width: 420px) { .plan-name { font-size: var(--step--2); letter-spacing: .02em; } .plan-pick { padding: 4px 8px; } .plan-now { padding: 2px 6px; } }
.acct-lock .btn, .acct-more .btn { margin-top: 6px; }
.acct-more { text-align: center; }

.cons-tabs { margin-bottom: 10px; }
.cons-status { min-height: 1.4em; color: var(--muted); margin: 4px 0; }
.cons-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cons-metric { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; }
.cons-metric b { font-size: var(--step-5); }
.cons-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cons-search input { flex: 1 1 200px; min-width: 0; }
.cons-list { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.cons-row { width: 100%; display: grid; grid-template-columns: 32px 1fr auto; gap: 4px 10px; align-items: center; text-align: left; font: inherit; color: var(--text);
  background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.cons-row img { border-radius: 50%; }
.cons-row span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.cons-row small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.cons-row > small { grid-column: 2 / -1; }
.cons-tier { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.cons-tier[data-tier="vip"], .cons-tier[data-tier="svip"] { border-color: var(--accent); color: var(--accent); }
.cons-pager { display: flex; gap: 8px; justify-content: center; }
.cons-form { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.cons-form label { display: flex; flex-direction: column; gap: 4px; }
.cons-form .cons-check { flex-direction: row; align-items: flex-start; gap: 10px; }
.cons-check input[type="checkbox"] { width: 20px; height: 20px; flex: none; margin: 4px 0 0; }
.cons-check span { display: flex; flex-direction: column; }
.cons-check small { color: var(--muted); }
.cons-log { list-style: none; padding: 0; margin: 6px 0 14px; font-size: var(--step--4); word-break: break-word; }
.cons-log li { border-bottom: 1px solid var(--line); padding: 6px 0; }
.cons-log li[data-level="error"] b { color: var(--accent); }
.cons-back { margin-bottom: 10px; }

/* 回饋留言（js/feedback.js） */
.fb-form { display: flex; flex-direction: column; gap: 10px; }
.fb-form label { color: var(--muted); }
.fb-form textarea { min-height: 9em; line-height: 1.7; letter-spacing: .02em; resize: vertical; }
.fb-count { margin: 0; text-align: right; }
.fb-msg { margin: 0; color: var(--accent); min-height: 1.5em; }
.fb-mine { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 10px; }
.fb-mine li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.fb-mine p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cons-fb p { margin: 4px 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
