/* AiKey look, matched to the home page aikey.my: near-white paper, ink text, ink buttons, orange
   accent, light only (the home page has no dark version). Loaded after style.css on every page of the
   platform, the 「Claude中转站合作」 pages included, so they all look like one product. */
:root {
  --bg: #fcfcfb;
  --bg-grad: radial-gradient(1000px 420px at 88% -200px, rgba(255, 107, 44, .10) 0%, rgba(255, 107, 44, 0) 70%),
    radial-gradient(900px 380px at 6% -180px, rgba(37, 99, 255, .06) 0%, rgba(37, 99, 255, 0) 70%);
  --card: #ffffff;
  --card-2: #f3f2ef;
  --text: #0e0f13;
  --text-2: #3d404a;
  --muted: #6c707c;
  --line: #e8e8ed;
  --line-2: #d9d9e0;
  --primary: #0e0f13;
  --primary-2: #26282f;
  --primary-soft: #fff0e6;
  --primary-text: #ffffff;
  --accent: #ff6b2c;
  --accent-ink: #df5317;
  --danger: #d93a3a;
  --danger-soft: #fdecec;
  --ok: #17924a;
  --ok-soft: #e4f6ec;
  --warn: #b26b00;
  --warn-soft: #fff4e0;
  --busy: #8a5cf6;
  --busy-soft: #f1ebff;
  --shadow-sm: 0 1px 2px rgba(14, 15, 19, .05);
  --shadow: 0 1px 2px rgba(14, 15, 19, .04), 0 12px 30px -16px rgba(14, 15, 19, .18);
  --shadow-lg: 0 22px 50px -16px rgba(14, 15, 19, .28), 0 2px 6px rgba(14, 15, 19, .04);
  --ring: 0 0 0 3px rgba(255, 107, 44, .28);
  --radius: 12px;
  --radius-sm: 8px;
  color-scheme: light;
}
/* style.css switches to dark with the device; AiKey stays on paper like the home page. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #fcfcfb; --card: #ffffff; --card-2: #f3f2ef; --text: #0e0f13; --text-2: #3d404a; --muted: #6c707c;
    --line: #e8e8ed; --line-2: #d9d9e0; --primary: #0e0f13; --primary-2: #26282f; --primary-soft: #fff0e6;
    --danger: #d93a3a; --danger-soft: #fdecec; --ok: #17924a; --ok-soft: #e4f6ec; --warn: #b26b00; --warn-soft: #fff4e0;
    --busy: #8a5cf6; --busy-soft: #f1ebff;
    --bg-grad: radial-gradient(1000px 420px at 88% -200px, rgba(255, 107, 44, .10) 0%, rgba(255, 107, 44, 0) 70%),
      radial-gradient(900px 380px at 6% -180px, rgba(37, 99, 255, .06) 0%, rgba(37, 99, 255, 0) 70%);
    --shadow-sm: 0 1px 2px rgba(14, 15, 19, .05);
    --shadow: 0 1px 2px rgba(14, 15, 19, .04), 0 12px 30px -16px rgba(14, 15, 19, .18);
    --shadow-lg: 0 22px 50px -16px rgba(14, 15, 19, .28), 0 2px 6px rgba(14, 15, 19, .04);
    --ring: 0 0 0 3px rgba(255, 107, 44, .28);
    color-scheme: light;
  }
}
button.primary, .btn.primary { box-shadow: 0 10px 22px -14px rgba(14, 15, 19, .7); font-weight: 600; }
button.primary:hover, .btn.primary:hover { transform: translateY(-1px); }
.card { border-radius: var(--radius); }
.badge.admin, .pill.starting { color: var(--accent-ink); }
.avatar { background: linear-gradient(135deg, #ff9a66, #ff6b2c); }
a { color: var(--accent-ink); }
::selection { background: #ffe0cf; }
/* The page's brand in the top bar: AiKey keyhole + the service's name. */
.brand { color: var(--text); }
.brand img { box-shadow: none; }
.brand small { font-weight: 500; color: var(--muted); margin-left: 2px; }

.ak-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.ak-logo img { width: 30px; height: 30px; border-radius: 8px; }
.ak-logo b { color: var(--accent); font-weight: 800; }
.ak-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: 14px; }
.ak-links a { color: var(--accent-ink); text-decoration: none; font-weight: 600; }
.ak-links a:hover { text-decoration: underline; }

/* Top bar and "me" menu shared by the AiKey pages (aikey-shell.js). */
.ak-nav { display: flex; gap: 4px; }
.ak-nav a { padding: 7px 12px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.ak-nav a:hover { color: var(--text); background: var(--card-2); }
.ak-nav a.on { color: var(--accent-ink); background: var(--primary-soft); }
.me-btn { display: flex; align-items: center; gap: 8px; padding: 0 6px 0 4px; min-height: 40px; border-radius: 99px; border: 1px solid transparent; background: transparent; }
.me-btn:hover { background: var(--card-2); border-color: transparent; }
.me-btn .nm { max-width: 120px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.menu-pop { position: absolute; right: 16px; top: calc(100% + 6px); min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .15s ease-out; z-index: 30; }
.menu-pop .who { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-pop .who b { display: block; }
.menu-pop button { width: 100%; justify-content: flex-start; border: 0; background: transparent; min-height: 42px; color: var(--text); }
.menu-pop button:hover { background: var(--card-2); }
.menu-pop button.danger { color: var(--danger); }
@media (max-width: 600px) { .me-btn .nm { display: none; } .ak-logo span { display: none; } .ak-nav a { padding: 7px 8px; font-size: 13px; } }
.wallet-button{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border:1px solid var(--line);border-radius:12px;color:var(--text);flex:none;background:var(--card)}.wallet-button:hover{background:var(--primary-soft);border-color:#ffd8c0}.settings-menu-link{display:block;padding:12px;border-radius:9px;color:var(--text);font-weight:600;text-decoration:none}.settings-menu-link:hover{background:var(--card-2)}.topbar .notice-link{font-size:12px;color:var(--muted);max-width:120px}.ak-nav{flex-wrap:wrap}@media(max-width:640px){.topbar .inner{gap:8px;flex-wrap:wrap}.topbar .notice-link{display:none}.ak-nav a{font-size:12px;padding:6px}.wallet-button{width:36px;height:36px}}

/* ---------- 信箱 + 联系客服 (aikey-box.js) ---------- */
.ak-nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ak-nav::-webkit-scrollbar { display: none; }
.kf-cnt { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.kf-bell { position: relative; width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 99px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; flex: none; }
.kf-bell:hover { background: var(--card-2); }
.kf-dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; line-height: 1; }
.kf-pop { position: fixed; z-index: 60; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; animation: pop .15s ease-out; }
.kf-pop[hidden] { display: none; }
.kf-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.kf-head > b { flex: 1; }
.kf-x { border: 0; background: transparent; width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 9px; display: grid; place-items: center; color: var(--muted); flex: none; cursor: pointer; }
.kf-x:hover { background: var(--card-2); }
.kf-inbox { width: 390px; max-height: min(560px, calc(100vh - 90px)); }
.kf-tabs { display: flex; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.kf-tabs button { border: 0; background: transparent; padding: 5px 10px; min-height: 32px; border-radius: 8px; font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.kf-tabs button.on { background: var(--card-2); color: var(--text); }
.kf-list { overflow: auto; flex: 1; min-height: 80px; }
.kf-item { padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.kf-item:hover { background: #fafaf8; }
.kf-item.unread::before { content: ""; position: absolute; left: 7px; top: 19px; width: 6px; height: 6px; border-radius: 99px; background: var(--accent); }
.kf-t { font-weight: 600; font-size: 14px; }
.kf-item.read .kf-t { font-weight: 500; color: var(--text-2); }
.kf-m { color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; margin-top: 3px; }
.kf-b { font-size: 13.5px; color: var(--text-2); margin-top: 8px; white-space: pre-wrap; word-break: break-word; }
.kf-pin { color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.kf-pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.kf-p-sys { background: #e8efff; color: #2563eb; }
.kf-p-ann { background: var(--primary-soft); color: var(--accent-ink); }
.kf-p-cs { background: var(--ok-soft); color: var(--ok); }
.kf-p-wait { background: var(--danger-soft); color: var(--danger); }
.kf-p-doing { background: var(--warn-soft); color: var(--warn); }
.kf-p-done { background: var(--ok-soft); color: var(--ok); }
.kf-p-team { background: var(--card-2); color: var(--text-2); }
.kf-foot { padding: 8px 14px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.kf-link { border: 0; background: transparent; color: var(--accent-ink); font-weight: 600; font-size: 13px; padding: 4px 0; min-height: 0; cursor: pointer; }
.kf-empty { padding: 30px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.kf-fab { position: fixed; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 55; display: flex; align-items: center; gap: 8px; background: var(--primary); color: #fff; border: 0; border-radius: 99px; padding: 12px 18px 12px 14px; min-height: 46px; font-weight: 600; box-shadow: var(--shadow-lg); }
.kf-fab:hover { background: var(--primary-2); }
.kf-fab .kf-dot { top: -5px; right: -5px; }
.kf-chat { right: 20px; bottom: 84px; width: 390px; height: min(580px, calc(100vh - 110px)); }
.kf-av { width: 34px; height: 34px; border-radius: 99px; background: linear-gradient(135deg, #7aa2ff, #2563eb); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.kf-online { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.kf-online i { width: 8px; height: 8px; border-radius: 99px; background: var(--ok); flex: none; }
.kf-online.off i { background: #b9bcc5; }
.kf-faq { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fcfcfb; }
.kf-faq span { font-size: 12px; color: var(--muted); width: 100%; }
.kf-faq button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 10px; min-height: 30px; font-size: 12.5px; font-weight: 500; }
.kf-faq button:hover { border-color: var(--accent); color: var(--accent-ink); }
.kf-msgs { flex: 1; overflow: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; background: #fbfaf8; }
.kf-msg { max-width: 82%; display: flex; flex-direction: column; gap: 3px; }
.kf-bub { padding: 8px 12px; border-radius: 14px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.kf-who { font-size: 11px; color: var(--muted); }
.kf-msg.me { align-self: flex-end; align-items: flex-end; }
.kf-msg.me .kf-bub { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.kf-msg.them { align-self: flex-start; }
.kf-msg.them .kf-bub { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.kf-msg.faqa .kf-bub { background: #e8efff; border: 0; }
.kf-img { max-width: 220px; max-height: 220px; min-width: 48px; min-height: 48px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); display: block; background: var(--card-2); }
.kf-sysline { align-self: center; font-size: 12px; color: var(--muted); background: var(--card-2); padding: 3px 10px; border-radius: 99px; text-align: center; max-width: 90%; }
.kf-compose { display: flex; gap: 6px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line); background: var(--card); margin: 0; }
.kf-compose textarea { flex: 1; resize: none; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 10px; height: 42px; min-height: 42px; max-height: 110px; font: inherit; font-size: 15px; outline: none; background: #fff; }
.kf-compose textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
.kf-att { border: 1px solid var(--line); width: 42px; height: 42px; }
.kf-send { width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 10px; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.kf-send:disabled { opacity: .5; }
.kf-ask { right: 20px; bottom: 84px; width: 330px; padding: 22px 20px 18px; text-align: center; align-items: center; gap: 8px; }
.kf-ask-x { position: absolute; right: 8px; top: 8px; }
.kf-big { width: 52px; height: 52px; border-radius: 16px; background: var(--primary-soft); color: var(--accent-ink); display: grid; place-items: center; }
.kf-big svg.i { width: 24px; height: 24px; }
.kf-ask b { font-size: 17px; }
.kf-ask p { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.kf-ask small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.kf-row { display: flex; gap: 8px; width: 100%; }
.kf-row .btn { flex: 1; justify-content: center; text-decoration: none; }
@media (max-width: 600px) {
  .kf-inbox, .kf-chat { inset: 0 !important; width: auto; height: auto; max-height: none; border-radius: 0; border: 0; z-index: 70; }
  .kf-chat-open .kf-fab { display: none; }
  .kf-fab { right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); padding: 11px 15px 11px 12px; }
  .kf-ask { left: 12px; right: 12px; width: auto; bottom: 76px; }
  .kf-compose { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .kf-pop { animation: none; } }
.kf-no-fab .kf-fab { display: none; }

/* AiKey v2 — approved workspace theme; support and browser controls retain their behavior. */
:root{--bg:#faf9f6;--bg-grad:none;--text:#18191b;--text-2:#45484f;--muted:#777b83;--line:#e6e5e2;--primary:#ff6b2c;--primary-2:#ef6226;--primary-text:#19191c;--primary-soft:#fff0e6;--accent-ink:#a4441e;--radius:16px}
button.primary,.btn.primary{box-shadow:none}button.primary:hover,.btn.primary:hover{transform:none}.topbar{background:#fff;border-bottom:1px solid var(--line);padding:0 28px;min-height:76px}.topbar .inner{max-width:1200px;min-height:76px;gap:18px}.ak-logo{font-size:22px;gap:10px;flex:none}.ak-logo img{width:34px;height:34px}.ak-nav{gap:18px;flex-wrap:nowrap;align-self:stretch;align-items:stretch}.ak-nav a{border-radius:0;border-bottom:2px solid transparent;display:flex;align-items:center;padding:0 4px;font-size:13px}.ak-nav a.on{background:none;color:var(--text);border-bottom-color:var(--accent)}.ak-nav a:hover{background:none;color:var(--text)}.me-btn{border-radius:8px;gap:9px;padding:0 0 0 16px;border-left:1px solid var(--line);white-space:nowrap}.me-btn:hover{border-left-color:var(--line)}.me-btn .avatar,.avatar{background:#fff0e6;color:#a4441e}.me-btn .nm{font-size:13px}.wallet-button,.kf-bell{width:38px;height:38px;min-height:38px;border-color:transparent;background:transparent;border-radius:10px}.wallet-button:hover,.kf-bell:hover{background:#fff0e6;border-color:transparent}.topbar .notice-link{white-space:nowrap}.menu-pop{top:calc(100% + 4px)}.kf-fab{background:#fff;color:var(--text);border:1px solid var(--line);box-shadow:0 8px 24px #18191b0a;font-size:13px;right:28px}.kf-fab:hover{background:#fff8f2}.kf-fab>.i{color:var(--accent-ink)}.settings-link{display:block;padding:12px;color:var(--text);text-decoration:none}.ak-settings .wrap{max-width:1256px;padding:32px 28px 70px}.ak-settings .account-hero{background:none;border:0;padding:0;margin:0 0 26px}.ak-settings .account-hero h1{font-size:32px;margin:8px 0 10px}.ak-settings .account-hero p{margin:0;color:var(--muted)}.ak-settings .panel{padding:26px;box-shadow:none}.ak-settings .account-grid{grid-template-columns:1fr 1fr;gap:22px}.ak-settings .panel h2{font-size:20px}.ak-settings #save{min-width:120px}
@media(max-width:850px){.topbar{padding:0 18px}.topbar .inner{gap:12px}.ak-nav{gap:14px}.ak-nav a{font-size:12px}.ak-settings .account-grid{grid-template-columns:1fr}.topbar .notice-link{display:none}}
@media(max-width:640px){.topbar .inner{flex-wrap:wrap;padding:10px 0;min-height:76px;gap:8px}.ak-logo{font-size:19px;gap:7px}.ak-logo span{display:inline}.ak-logo img{width:30px;height:30px}.ak-nav{gap:10px;align-self:stretch;min-height:42px;max-width:calc(100vw - 145px)}.ak-nav a{white-space:normal;line-height:1.5}.me-btn{padding-left:8px;gap:0}.wallet-button,.kf-bell{width:32px;min-width:32px;height:36px;min-height:36px}.ak-settings .wrap{padding:24px 18px 90px}.ak-settings .account-hero h1{font-size:27px}.ak-settings .panel{padding:22px}.kf-fab{width:48px;height:48px;padding:0;justify-content:center;font-size:0;right:14px;bottom:14px}.kf-fab>.i{width:21px;height:21px}.kf-chat{bottom:76px}.wv-main{padding-bottom:92px!important}}
@media(max-width:640px){
  .topbar .inner{display:grid;grid-template-columns:auto 1fr 34px 34px 38px;gap:4px 8px;padding:9px 0 0}
  .topbar .ak-logo{grid-column:1;grid-row:1}
  .topbar .spacer{grid-column:2;grid-row:1}
  .topbar .wallet-button{grid-column:3;grid-row:1;width:34px;min-width:34px;padding:6px;margin:0}
  .topbar .kf-bell{grid-column:4;grid-row:1;width:34px;min-width:34px;padding:6px}
  .topbar .me-btn{grid-column:5;grid-row:1;padding:0;border:0;justify-content:center}
  .topbar .ak-nav{grid-column:1/-1;grid-row:2;min-height:38px;max-width:100%;gap:20px;overflow-x:auto}
  .topbar .ak-nav a{white-space:nowrap;flex:none;padding:0 0 8px}
}
