/* =========================================================================
   Calio 樣式（暗色主題）：顏色集中在 :root，要調色改這裡就好
   ========================================================================= */
:root {
    --c-bg: #212529;          /* 頁面底色 */
    --c-bg-deep: #1a1d21;     /* 跑馬燈 */
    --c-surface: #2b3035;     /* 卡片 */
    --c-surface-2: #343a40;   /* 卡片標題列 */
    --c-surface-3: #3b4148;   /* 有量體重那天的標題列 */
    --c-border: #474e56;
    --c-border-soft: #3a4047;
    --c-text: #e9ecef;
    --c-muted: #969ea6;
    --c-gold: #f0b429;        /* 金黃強調（任務、說明標題、選取框） */
    --c-yellow: #ffc107;      /* 實測體重 */
    --c-orange: #f6a53a;      /* TDEE 數字 */
    --c-red: #ff6b6b;         /* 熱量赤字、攻擊力 */
    --c-cyan: #3cc8f0;        /* 每日總計 */
    --c-green: #3ddc84;       /* 體重下降 */
    --c-fab: #e4374a;         /* 新增按鈕 */
    --app-max: 480px;
}

html, body {
    background: var(--c-bg);
}

body {
    color: var(--c-text);
    font-size: 16px;
    font-family: system-ui, -apple-system, "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.app-shell {
    max-width: var(--app-max);
    min-height: 100dvh;
    margin: 0 auto;
}

@media (min-width: 520px) {
    .app-shell {
        border-left: 1px solid var(--c-border-soft);
        border-right: 1px solid var(--c-border-soft);
    }
}

.min-w-0 { min-width: 0; }

/* 按鈕、輸入框放大到手指好點的尺寸（約 44px 高） */
.btn {
    --bs-btn-padding-y: .6rem;
    --bs-btn-padding-x: 1.1rem;
    --bs-btn-border-radius: 10px;
}

.btn-sm {
    --bs-btn-padding-y: .4rem;
    --bs-btn-padding-x: .9rem;
    --bs-btn-font-size: .9375rem;
    --bs-btn-border-radius: 8px;
}

.form-control,
.form-select {
    padding-top: .6rem;
    padding-bottom: .6rem;
    border-radius: 10px;
    font-size: 16px;  /* 小於 16px 時 iOS 會在聚焦時自動放大畫面 */
}

.form-check-input {
    width: 1.4em;
    height: 1.4em;
}

.btn-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--c-text);
    font-size: 26px;
    line-height: 1;
}

.btn-icon.boxed {
    width: 42px;
    height: 42px;
    border: 1px solid #8a9199;
    font-size: 24px;
}

.text-tdee { color: var(--c-orange); }
.text-deficit { color: var(--c-red); }

.loading-block,
.list-empty {
    padding: 32px 12px;
    text-align: center;
    color: var(--c-muted);
    font-size: 15px;
}

.page-error {
    padding: 60px 20px;
    text-align: center;
    color: var(--c-muted);
}

/* ---------- 提示訊息 ---------- */
.app-toast {
    position: fixed;
    left: 50%;
    bottom: calc(104px + env(safe-area-inset-bottom));
    z-index: 2000;
    max-width: 90vw;
    padding: 10px 20px;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    background: rgba(20, 22, 25, .96);
    color: #fff;
    font-size: 15px;
    opacity: 0;
    transform: translate(-50%, 16px);
    transition: opacity .2s, transform .2s;
    pointer-events: none;
}

.app-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.app-toast[data-type="error"] { border-color: #dc3545; }

/* =========================================================================
   首頁
   ========================================================================= */
.home {
    display: flex;
    flex-direction: column;
    height: 100dvh;
}

.top-bar {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    height: 56px;
    padding: 0 6px;
    padding-top: env(safe-area-inset-top);
    box-sizing: content-box;
    border-bottom: 1px solid var(--c-border);
    background: var(--c-bg);
    position: relative;
}

.top-bar .btn-icon {
    width: 44px;
    height: 44px;
    font-size: 28px;
}

.month-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.btn-month {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1;
}

.month-title {
    min-width: 116px;
    text-align: center;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .5px;
}

.top-bar .btn-calendar {
    justify-self: end;
    font-size: 24px;
}

.month-picker {
    position: absolute;
    right: 8px;
    bottom: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* 跑馬燈 */
.ticker {
    display: block;
    height: 36px;
    overflow: hidden;
    border-bottom: 1px solid var(--c-border);
    background: var(--c-bg-deep);
    color: var(--c-text);
    text-decoration: none;
    font-size: 14px;
    line-height: 36px;
    white-space: nowrap;
}

.ticker-track {
    display: inline-flex;
    align-items: center;
    animation: ticker 30s linear infinite;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
}

.ticker-item b { color: #ffe08a; }
.ticker-sep { color: var(--c-muted); }

@keyframes ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .ticker-track { animation: none; }
}

/* TDEE／月赤字 */
.stat-card {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 8px 8px 0;
    padding: 10px 12px;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    background: var(--c-surface);
}

.stat-label {
    color: var(--c-muted);
    font-size: 13px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
}

/* 基本設定未完成的提示 */
.setup-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 8px 0;
    padding: 10px 12px;
    border: 1px solid #8a7234;
    border-radius: 10px;
    background: #3b3424;
    color: var(--c-text);
    text-decoration: none;
}

.setup-notice > .bi {
    color: var(--c-gold);
    font-size: 22px;
}

.setup-notice b {
    display: block;
    color: var(--c-gold);
    font-size: 15px;
}

.setup-notice-sub {
    display: block;
    color: var(--c-muted);
    font-size: 13px;
}

.setup-notice .btn {
    flex-shrink: 0;
    margin-left: auto;
}

/* 數值下方的補充說明；左右兩欄都是「標題／數值／說明」三行，數值才會對齊 */
.stat-note {
    overflow: hidden;
    color: var(--c-muted);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.home-actions {
    display: flex;
    justify-content: space-between;
    padding: 8px 8px 0;
}

.home-actions .btn { font-weight: 600; }

/* 體重圓環：隨螢幕寬度縮放 */
.ring {
    position: relative;
    flex-shrink: 0;
    width: clamp(160px, 46vw, 200px);
    height: clamp(160px, 46vw, 200px);
    margin: 0 auto 8px;
}

.ring svg {
    width: 100%;
    height: 100%;
}

.ring-track {
    fill: none;
    stroke: #30353b;
    stroke-width: 13;
}

.ring-bar {
    fill: none;
    stroke: #f5c518;
    stroke-width: 13;
    stroke-linecap: round;
    transition: stroke-dasharray .5s ease;
}

.ring-bar.is-down { stroke: var(--c-green); }
.ring-bar.is-empty { stroke: transparent; }

.ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ring-label {
    color: var(--c-muted);
    font-size: 15px;
}

.ring-value {
    font-size: 36px;
    font-weight: 500;
    line-height: 1.25;
}

/* 每日紀錄列表 */
.record-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 8px 12px;
    scrollbar-width: none;
    overscroll-behavior: contain;
}

.record-list::-webkit-scrollbar { display: none; }

.record-item {
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    background: #dc3545;
}

.record-item:last-child { margin-bottom: 0; }

.record-delete {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 84px;
    border: 0;
    background: #dc3545;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.record-card {
    position: relative;
    z-index: 1;
    background: var(--c-surface);
    cursor: pointer;
    touch-action: pan-y;
    user-select: none;
    transition: transform .2s ease;
}

.record-card.dragging { transition: none; }
.record-card:focus-visible { outline: 2px solid var(--c-gold); outline-offset: -2px; }

.record-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--c-border);
    background: var(--c-surface-2);
    font-size: 16px;
    font-weight: 600;
}

.record-head.is-measured { background: var(--c-surface-3); }

.record-weight {
    flex-shrink: 0;
    color: var(--c-muted);
    font-size: 14px;
    font-weight: 400;
}

.record-weight.is-measured {
    color: var(--c-yellow);
    font-size: 17px;
    font-weight: 700;
}

.record-body { padding: 10px 12px 12px; }

.record-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--c-border-soft);
}

.record-total .label {
    color: var(--c-muted);
    font-size: 14px;
}

.record-total .value {
    color: var(--c-cyan);
    font-size: 19px;
    font-weight: 700;
}

/* 四餐固定排成兩欄，數字大、好點 */
.record-meals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 10px;
}

.meal-chip {
    padding: 6px 10px;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    background: #24282c;
    font-size: 15px;
    text-align: center;
}

.record-note {
    margin-top: 8px;
    color: var(--c-muted);
    font-size: 14px;
}

/* 新增按鈕 */
/* 新增按鈕放在列表下方自己的一列，不會蓋住紀錄 */
.home-footer {
    display: flex;
    flex-shrink: 0;
    justify-content: center;
    padding: 10px 0 calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--c-border-soft);
    background: var(--c-bg);
}

.fab {
    width: 64px;
    height: 64px;
    padding: 0 0 4px;
    border: 0;
    border-radius: 50%;
    background: var(--c-fab);
    color: #fff;
    font-size: 38px;
    line-height: 1;
    box-shadow: 0 0 0 5px rgba(228, 55, 74, .22), 0 6px 16px rgba(0, 0, 0, .45);
}

.fab:active { transform: scale(.95); }

/* =========================================================================
   新增／編輯紀錄 Modal（手機上全螢幕）
   ========================================================================= */
.record-modal .modal-title {
    font-size: 19px;
    font-weight: 700;
}

.record-modal .form-label {
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
}

.record-modal .form-label-sm {
    display: block;
    margin-bottom: 4px;
    color: var(--c-muted);
    font-size: 14px;
}

.record-modal .form-text {
    font-size: 13px;
}

.record-modal .modal-footer {
    gap: 8px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.auto-total .input-group-text,
.auto-total .form-control {
    border-color: #8a6d1f;
}

.auto-badge {
    background: #2b2615;
    color: var(--c-gold);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .5px;
}

.auto-total .form-control {
    background: repeating-linear-gradient(135deg, #3a3220 0 8px, #2d271a 8px 16px);
    color: var(--c-gold);
    font-weight: 700;
}

.auto-unit {
    background: #2b2615;
    color: var(--c-gold);
}

/* =========================================================================
   側邊抽屜選單
   ========================================================================= */
.app-drawer {
    --bs-offcanvas-width: min(82vw, 320px);
    --bs-offcanvas-bg: #23272b;
    border-right: 1px solid var(--c-border) !important;
}

.drawer-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: calc(18px + env(safe-area-inset-top)) 14px 18px;
    border-bottom: 1px solid var(--c-border);
}

.drawer-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
}

.drawer-name {
    font-size: 18px;
    font-weight: 700;
}

.drawer-email {
    color: var(--c-muted);
    font-size: 14px;
}

.drawer-menu { padding: 10px; }

.drawer-menu-info {
    margin-top: auto;
    border-top: 1px solid var(--c-border);
}

.drawer-link {
    display: block;
    margin-bottom: 4px;
    padding: 13px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--c-text);
    font-size: 17px;
    text-decoration: none;
}

.drawer-link:hover { background: rgba(255, 255, 255, .04); color: #fff; }

.drawer-link.active {
    border-color: #8a7234;
    background: #3b3424;
    color: #fff;
}

.drawer-foot {
    padding: 12px 14px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--c-border);
}

/* =========================================================================
   內頁共用
   ========================================================================= */
.page { min-height: 100dvh; }

.page-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 8px 10px;
    padding-top: calc(8px + env(safe-area-inset-top));
    border-bottom: 1px solid var(--c-border);
    background: var(--c-bg);
}

.page-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.page-body { padding: 12px 10px calc(32px + env(safe-area-inset-bottom)); }

.page-hint {
    margin-bottom: 0;
    color: var(--c-muted);
    font-size: 14px;
}

.card-dark {
    padding: 16px 14px;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    background: var(--c-surface);
}

.card-dark .form-label {
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
}

/* ---------- 基本設定 ---------- */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.avatar-tile {
    display: grid;
    place-items: center;
    aspect-ratio: 1.2;
    padding: 0;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    background: #262a2f;
}

.avatar-tile.active {
    border-color: var(--c-gold);
    background: #3a3424;
    box-shadow: inset 0 0 0 2px var(--c-gold);
}

.tdee-preview {
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--c-bg);
    color: var(--c-muted);
    font-size: 15px;
}

/* ---------- 組隊任務 ---------- */
.quest-card {
    margin-bottom: 14px;
    padding: 16px 14px;
    border: 1px solid #6f5c26;
    border-radius: 14px;
    background: linear-gradient(180deg, #3b3522 0%, #2a2924 100%);
}

.quest-tag {
    color: var(--c-gold);
    font-size: 14px;
    font-weight: 700;
}

.quest-name {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.35;
}

.quest-sub {
    color: var(--c-muted);
    font-size: 13px;
}

.quest-badge {
    flex-shrink: 0;
    padding: 5px 12px;
    border: 1px solid var(--c-gold);
    border-radius: 999px;
    background: rgba(0, 0, 0, .3);
    color: var(--c-gold);
    font-size: 13px;
    font-weight: 700;
}

.quest-badge.is-done {
    border-color: var(--c-green);
    color: var(--c-green);
}

.quest-hp {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px 0;
}

.monster-box {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    border: 1px solid #4a4532;
    border-radius: 12px;
    background: #1d1f22;
}

.hp-text {
    font-size: 20px;
    font-weight: 800;
}

.hp-bar {
    height: 12px;
    margin: 6px 0;
    overflow: hidden;
    border-radius: 99px;
    background: #4a4d52;
}

.hp-bar > span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #ff6b6b, #ffc107);
    transition: width .4s ease;
}

.quest-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: var(--c-muted);
    font-size: 15px;
}

.atk {
    color: var(--c-red);
    font-weight: 700;
}

.quest-row .atk { font-size: 18px; }

.quest-label {
    margin-bottom: 8px;
    color: var(--c-muted);
    font-size: 14px;
}

.member-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.member-chip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #4b4a3f;
    border-radius: 10px;
    background: rgba(0, 0, 0, .25);
    font-size: 15px;
}

.member-chip.is-me { border-color: #8a7234; }

.attack-card {
    margin-bottom: 14px;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: 14px;
}

.attack-card.is-physical {
    border-color: #5c2f38;
    background: linear-gradient(180deg, #3a2329 0%, #2c2226 100%);
}

.attack-card.is-magic {
    border-color: #2a5470;
    background: linear-gradient(180deg, #1d3446 0%, #1f2b35 100%);
}

.attack-title {
    color: #f0c4cb;
    font-size: 15px;
    font-weight: 700;
}

.is-magic .attack-title { color: #a9d8ff; }

.attack-value {
    color: #fff;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.3;
}

.is-magic .attack-value { color: #6ec6ff; }

.attack-sub {
    color: var(--c-muted);
    font-size: 13px;
}

.habit-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 17px;
}

.habit-pending {
    color: var(--c-muted);
    font-size: 14px;
}

.habit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid #444a51;
    border-radius: 12px;
    background: #31363c;
    cursor: pointer;
}

.habit-item:last-child { margin-bottom: 0; }
.habit-item.is-checked { border-color: #6f5c26; background: #353126; }

.habit-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #41474e;
    font-size: 23px;
}

.habit-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.habit-name {
    font-size: 16px;
    font-weight: 700;
}

.habit-desc {
    color: var(--c-muted);
    font-size: 13px;
}

.habit-points {
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 800;
}

.habit-check {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    margin: 0;
}

/* ---------- 留言板 ---------- */
.mini-quest {
    padding: 16px 14px;
    border: 1px solid #8a7234;
    border-radius: 14px;
    background: linear-gradient(180deg, #34301f 0%, #2a2924 100%);
}

.mini-quest-title {
    color: var(--c-gold);
    font-size: 19px;
    font-weight: 800;
}

.mini-quest .quest-badge {
    border-color: #e9ecef;
    color: #e9ecef;
}

.mini-quest-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    padding: 14px;
    border: 1px solid #4a4532;
    border-radius: 12px;
    background: #1f2226;
}

.msg-item {
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    background: var(--c-surface);
}

.msg-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.msg-name {
    font-size: 16px;
    font-weight: 700;
}

.msg-time {
    margin-left: auto;
    color: var(--c-muted);
    font-size: 13px;
}

.msg-content {
    margin-top: 8px;
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 換頁後捲回列表開頭時，不要被固定在上方的頁首蓋住 */
#messageList { scroll-margin-top: calc(70px + env(safe-area-inset-top)); }

.msg-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

.msg-pager-info {
    color: var(--c-muted);
    font-size: 15px;
}

/* ---------- 排行榜 ---------- */
.rank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 14px 16px;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    background: var(--c-surface);
}

.rank-item.is-me { border-color: var(--c-gold); }

.rank-name {
    font-size: 17px;
    font-weight: 700;
}

.rank-sub {
    color: var(--c-muted);
    font-size: 14px;
}

.rank-atk {
    flex-shrink: 0;
    color: var(--c-red);
    font-size: 18px;
    font-weight: 700;
    text-align: right;
}

.rank-atk small {
    display: block;
    color: var(--c-muted);
    font-size: 13px;
    font-weight: 400;
}

/* ---------- 說明頁 ---------- */
.info-card {
    margin-bottom: 12px;
    padding: 16px 14px;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    background: var(--c-surface);
}

.info-card h2 {
    margin-bottom: 8px;
    color: var(--c-gold);
    font-size: 19px;
    font-weight: 700;
}

.info-card p {
    margin-bottom: 8px;
    color: var(--c-muted);
    font-size: 16px;
    line-height: 1.7;
}

.info-card p:last-child { margin-bottom: 0; }

.info-table {
    width: 100%;
    color: var(--c-muted);
    font-size: 15px;
}

.info-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--c-border-soft);
}

.info-table td:first-child {
    width: 40%;
    color: var(--c-text);
}

/* ---------- 登入 ---------- */
.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(56px + env(safe-area-inset-top)) 16px 24px;
}

.login-title {
    margin: 12px 0 0;
    color: var(--c-gold);
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 1px;
}

.login-sub {
    margin-bottom: 24px;
    color: var(--c-muted);
    font-size: 16px;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 16px;
    padding: 5px;
    border-radius: 12px;
    background: var(--c-bg);
}

.login-tab {
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--c-muted);
    font-size: 16px;
    font-weight: 700;
}

.login-tab.active {
    border-color: #8a7234;
    background: #3b3424;
    color: #fff;
}

#loginForm .register-only { display: none; }
#loginForm.is-register .register-only { display: block; }

/* ---------- 安裝教學（用瀏覽器開啟時） ---------- */
.install-title {
    margin-bottom: 12px;
    color: var(--c-gold);
    font-size: 18px;
    font-weight: 700;
}

.install-steps {
    margin: 0;
    padding-left: 1.4em;
    font-size: 16px;
    line-height: 1.6;
}

.install-steps li + li { margin-top: 8px; }
.install-steps .bi { color: var(--c-gold); }

.install-url {
    margin: 12px 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--c-bg);
    font-size: 14px;
    word-break: break-all;
    user-select: all;
}

.install-note {
    max-width: 420px;
    margin: 16px 0 0;
    color: var(--c-muted);
    font-size: 14px;
    text-align: center;
}
