:root {
  --bg: #080b17;
  --surface: rgba(18, 23, 42, .82);
  --surface-solid: #12172a;
  --surface-soft: #181e35;
  --line: rgba(151, 166, 210, .15);
  --line-strong: rgba(151, 166, 210, .28);
  --text: #f3f5ff;
  --muted: #8e98b7;
  --muted-strong: #bac3df;
  --accent: #9b8cff;
  --accent-bright: #c0b8ff;
  --accent-soft: rgba(155, 140, 255, .14);
  --teal: #65e2c5;
  --danger: #ff8c9e;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow: 0 22px 80px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang TC", "Noto Sans TC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
a { color: inherit; }
.ambient { position: fixed; z-index: -1; pointer-events: none; filter: blur(60px); border-radius: 50%; opacity: .5; }
.ambient-one { width: 420px; height: 420px; top: -230px; right: -110px; background: #3d326a; }
.ambient-two { width: 360px; height: 360px; left: -250px; top: 50%; background: #173b50; }
.shell { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 32px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #101329; font-size: 23px; font-weight: 900; background: linear-gradient(145deg, #bfb5ff, #6eecce); border-radius: 11px; transform: rotate(-8deg); }
.brand strong { display: block; font-size: 14px; letter-spacing: .02em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.top-actions { display: flex; align-items: center; gap: 17px; }
.privacy-pill { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.privacy-pill i { display: block; width: 6px; height: 6px; background: var(--teal); border-radius: 99px; box-shadow: 0 0 12px var(--teal); }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted-strong); }
.icon-button:hover, .text-button:hover { color: var(--text); border-color: var(--line-strong); }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; padding: 82px 0 42px; }
.eyebrow { margin: 0 0 14px; color: var(--accent-bright); font-size: 10px; font-weight: 700; letter-spacing: .19em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 610px; margin-bottom: 16px; font-size: clamp(38px, 5vw, 62px); line-height: .98; letter-spacing: -.065em; font-weight: 730; }
h1 em { color: var(--accent-bright); font-style: normal; }
.hero-copy { max-width: 540px; margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.hero-card { min-width: 150px; padding: 19px 21px; border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(140deg, rgba(26, 31, 56, .92), rgba(15, 20, 38, .72)); box-shadow: var(--shadow); }
.hero-card-label, .hero-card span:last-child { display: block; color: var(--muted); font-size: 10px; }
.hero-card strong { display: block; margin: 4px 0 3px; color: var(--accent-bright); font-size: 32px; line-height: 1; letter-spacing: -.05em; }
.workspace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.input-panel, .output-panel { padding: 25px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 22px; }
.panel-heading > div { display: flex; align-items: center; gap: 11px; }
.panel-heading h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.step { color: var(--accent-bright); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.text-button { padding: 3px 0; border: 0; background: transparent; color: var(--muted); font-size: 11px; }
textarea, input { width: 100%; color: var(--text); border: 1px solid var(--line); border-radius: 12px; outline: 0; background: rgba(7, 10, 23, .54); transition: border-color .2s, box-shadow .2s; }
textarea { min-height: 148px; resize: vertical; padding: 15px; font-size: 14px; line-height: 1.65; }
input { padding: 12px 13px; font-size: 13px; }
textarea::placeholder, input::placeholder { color: #69728f; }
textarea:focus, input:focus { border-color: rgba(155, 140, 255, .7); box-shadow: 0 0 0 4px rgba(155, 140, 255, .09); }
.field-meta { display: flex; justify-content: space-between; margin: 9px 2px 25px; color: var(--muted); font-size: 10px; }
.context-block { margin-bottom: 25px; }
.field-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; color: var(--muted-strong); font-size: 11px; }
.field-label small { margin-left: 5px; color: var(--muted); font-size: 10px; }
.tone-block { margin-bottom: 23px; }
.tone-value { color: var(--accent-bright); }
.tone-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.tone-option { min-height: 58px; padding: 9px 5px; border: 1px solid var(--line); border-radius: 10px; background: transparent; text-align: left; transition: .2s ease; }
.tone-option span, .tone-option small { display: block; }
.tone-option span { margin-bottom: 4px; color: var(--muted-strong); font-size: 11px; }
.tone-option small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.tone-option:hover { border-color: var(--line-strong); background: rgba(255,255,255,.025); }
.tone-option.active { border-color: rgba(155, 140, 255, .72); background: var(--accent-soft); }
.tone-option.active span { color: var(--accent-bright); }
.primary-button, .copy-button { display: flex; justify-content: center; align-items: center; gap: 12px; width: 100%; padding: 13px 17px; border: 0; border-radius: 11px; font-size: 12px; font-weight: 650; transition: transform .2s, box-shadow .2s, opacity .2s; }
.primary-button { color: #13142c; background: linear-gradient(100deg, #b5aaff, #7ff0d3); box-shadow: 0 8px 24px rgba(129, 218, 200, .13); }
.primary-button b, .copy-button b { opacity: .55; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 600; }
.primary-button:hover, .copy-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 27px rgba(129, 218, 200, .2); }
.primary-button.loading { opacity: .75; pointer-events: none; }
.primary-button.loading span::after { content: " ."; animation: dots 1s steps(3, end) infinite; }
@keyframes dots { 0% { content: " ."; } 50% { content: " .."; } 100% { content: " ..."; } }
.status-dot { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.status-dot::before { content: ""; display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status-dot.ready { color: var(--teal); }
.status-dot.ready::before { background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.reply-stage { display: grid; place-items: center; min-height: 322px; padding: 18px; border: 1px dashed var(--line); border-radius: 15px; background: rgba(8, 11, 24, .25); }
.empty-state { color: var(--muted); text-align: center; }
.empty-icon { display: grid; place-items: center; width: 43px; height: 43px; margin: 0 auto 14px; border: 1px solid rgba(155, 140, 255, .35); border-radius: 13px; color: var(--accent-bright); font-size: 22px; background: var(--accent-soft); }
.empty-state h3 { margin-bottom: 7px; color: var(--muted-strong); font-size: 13px; font-weight: 600; }
.empty-state p { margin: 0; font-size: 11px; line-height: 1.7; }
.hidden { display: none !important; }
.reply-content { width: 100%; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.reply-bubble { position: relative; max-width: 92%; margin: 0 auto 14px; padding: 18px 19px; color: #eeeaff; border: 1px solid rgba(155, 140, 255, .35); border-radius: 17px 17px 4px 17px; background: linear-gradient(145deg, rgba(87, 71, 163, .36), rgba(25, 32, 66, .65)); font-size: 15px; line-height: 1.65; white-space: pre-wrap; box-shadow: 0 12px 35px rgba(7, 5, 27, .35); animation: enter .35s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.reply-details { display: flex; justify-content: center; gap: 7px; color: var(--muted); font-size: 10px; }
.output-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; margin-top: 15px; }
.secondary-button, .copy-button { border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted-strong); font-size: 11px; }
.secondary-button:hover:not(:disabled) { border-color: var(--line-strong); color: var(--text); }
.copy-button { border-color: rgba(155, 140, 255, .38); color: #e8e3ff; background: rgba(155, 140, 255, .13); }
.copy-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: .4; }
.voice-link { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; color: var(--muted); font-size: 10px; }
.voice-link a { color: var(--accent-bright); text-decoration: none; }
.voice-link a:hover { text-decoration: underline; }
.templates-section { margin-top: 66px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 17px; }
.section-heading .eyebrow { margin-bottom: 9px; }
.section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.template-card { min-height: 108px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: rgba(18, 23, 42, .64); text-align: left; transition: .2s ease; }
.template-card:hover { transform: translateY(-2px); border-color: rgba(155, 140, 255, .5); background: rgba(30, 35, 62, .8); }
.template-card strong { display: block; margin-bottom: 7px; color: var(--muted-strong); font-size: 12px; }
.template-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
footer { display: flex; justify-content: space-between; gap: 20px; padding-top: 55px; color: #626c8b; font-size: 10px; }
.toast { position: fixed; z-index: 5; left: 50%; bottom: 25px; padding: 11px 16px; border: 1px solid var(--line-strong); border-radius: 99px; color: var(--text); background: #1a2038; box-shadow: var(--shadow); font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
  .shell { width: min(100% - 30px, 580px); padding-top: 18px; }
  .hero { display: block; padding: 60px 0 30px; }
  h1 { font-size: 43px; }
  .hero-card { display: inline-block; min-width: 140px; margin-top: 25px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .reply-stage { min-height: 260px; }
  .templates-section { margin-top: 44px; }
  .template-grid { grid-template-columns: 1fr; }
  footer { display: block; line-height: 1.8; }
  footer span { display: block; }
}
@media (max-width: 420px) {
  .shell { width: min(100% - 22px, 580px); }
  .privacy-pill { display: none; }
  .input-panel, .output-panel { padding: 18px; }
  .tone-options { grid-template-columns: repeat(2, 1fr); }
  .tone-option { min-height: 51px; }
  .voice-link { display: block; line-height: 1.8; }
  .voice-link a { display: block; }
}
.light-theme { --bg: #f4f5fb; --surface: rgba(255,255,255,.86); --surface-solid: #fff; --surface-soft: #f0effc; --line: rgba(51, 57, 92, .13); --line-strong: rgba(51, 57, 92, .25); --text: #171a2c; --muted: #707790; --muted-strong: #414862; --accent: #6d5be8; --accent-bright: #5b4dd2; --accent-soft: rgba(109, 91, 232, .1); --shadow: 0 20px 60px rgba(45, 52, 100, .1); }
.light-theme .ambient-one { background: #d5ceff; }
.light-theme .ambient-two { background: #c6eee7; }
.light-theme textarea, .light-theme input { background: rgba(255,255,255,.72); }
.light-theme .reply-stage { background: rgba(250,250,255,.7); }
.light-theme .reply-bubble { color: #292348; background: linear-gradient(145deg, rgba(211, 203, 255, .8), rgba(237, 241, 255, .9)); }

/* Sakura pink theme */
:root {
  --bg: #190d18;
  --surface: rgba(48, 24, 45, .84);
  --surface-solid: #30182d;
  --surface-soft: #40203b;
  --line: rgba(255, 193, 214, .18);
  --line-strong: rgba(255, 193, 214, .34);
  --text: #fff5f8;
  --muted: #c9a7b7;
  --muted-strong: #f0cbd8;
  --accent: #f58eae;
  --accent-bright: #ffb6cc;
  --accent-soft: rgba(245, 142, 174, .16);
  --teal: #8be1ca;
  --shadow: 0 22px 80px rgba(32, 5, 24, .38);
}
body { background: radial-gradient(circle at 75% -10%, #4f243d 0, transparent 34%), var(--bg); }
.ambient-one { background: #8d3e67; }
.ambient-two { background: #41305e; }
.brand-mark { background: linear-gradient(145deg, #ffb6cc, #ffd2df); }
.primary-button { color: #421629; background: linear-gradient(100deg, #ffb0c8, #ffd1df); box-shadow: 0 8px 24px rgba(245, 142, 174, .2); }
.copy-button { border-color: rgba(255, 174, 199, .48); color: #ffe8ef; background: rgba(245, 142, 174, .15); }
.reply-bubble { border-color: rgba(255, 174, 199, .4); background: linear-gradient(145deg, rgba(125, 55, 89, .45), rgba(47, 27, 58, .7)); }
.language-control { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.language-control select { max-width: 72px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted-strong); background: rgba(37, 17, 34, .8); font-size: 10px; }
.admin-link { color: var(--muted); font-size: 10px; text-decoration: none; }
.admin-link:hover { color: var(--accent-bright); }
.avatar-button { display: flex; align-items: center; gap: 6px; padding: 0; border: 0; color: var(--muted-strong); background: transparent; font-size: 10px; }
.avatar-button > span:last-child { max-width: 68px; overflow: hidden; text-overflow: ellipsis; }
#avatarPreview, .avatar-large { display: grid; place-items: center; color: #421629; font-weight: 800; background: var(--avatar-color, #f58eae); border-radius: 50%; }
#avatarPreview { width: 25px; height: 25px; font-size: 9px; }
.avatar-dialog { width: min(340px, calc(100% - 30px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--text); background: #2c1629; box-shadow: var(--shadow); }
.avatar-dialog::backdrop { background: rgba(12, 3, 11, .72); backdrop-filter: blur(5px); }
.avatar-dialog form { position: relative; padding: 27px; }
.dialog-close { position: absolute; top: 14px; right: 16px; border: 0; color: var(--muted); background: transparent; font-size: 22px; }
.avatar-large { width: 62px; height: 62px; margin-bottom: 20px; font-size: 20px; }
.avatar-dialog h2 { margin: 0 0 8px; font-size: 22px; }
.dialog-copy { margin-bottom: 20px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.avatar-presets { display: flex; gap: 9px; margin: 16px 0 20px; }
.avatar-color { width: 25px; height: 25px; border: 3px solid transparent; border-radius: 50%; background: var(--avatar-color); }
.avatar-color.active { border-color: #fff; box-shadow: 0 0 0 2px var(--avatar-color); }
.dialog-save { padding: 11px; }
@media (max-width: 620px) { .language-control span { display: none; } .avatar-button > span:last-child, .admin-link { display: none; } }
.light-theme { --bg: #fff4f7; --surface: rgba(255,255,255,.88); --surface-solid: #fff; --surface-soft: #fff0f4; --line: rgba(129, 55, 83, .14); --line-strong: rgba(129, 55, 83, .25); --text: #3b1d2e; --muted: #987181; --muted-strong: #634154; --accent: #e76792; --accent-bright: #cc4f7a; --accent-soft: rgba(231, 103, 146, .12); --shadow: 0 20px 60px rgba(145, 68, 101, .13); }
.light-theme body { background: radial-gradient(circle at 75% -10%, #ffd9e5 0, transparent 34%), var(--bg); }
.light-theme .ambient-one { background: #ffc0d3; }
.light-theme .ambient-two { background: #edd5ef; }
.light-theme textarea, .light-theme input, .light-theme .language-control select { background: rgba(255,255,255,.74); }
.account-link { padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 10px; cursor: pointer; }
.account-link:hover { color: var(--accent-bright); }
.account-dialog { width: min(390px, calc(100% - 30px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--text); background: #2c1629; box-shadow: var(--shadow); }
.account-dialog::backdrop { background: rgba(12, 3, 11, .72); backdrop-filter: blur(5px); }
.account-dialog form { position: relative; padding: 27px; }
.account-dialog h2 { margin: 0 0 8px; font-size: 21px; }
.account-dialog label { display: block; margin: 12px 0; color: var(--muted); font-size: 11px; }
.account-dialog input { width: 100%; margin-top: 7px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: rgba(24, 10, 22, .8); font-size: 12px; }
.account-message { min-height: 18px; margin-top: 8px; color: var(--danger); font-size: 10px; }
.theme-dialog { width: min(390px, calc(100% - 30px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--text); background: #2c1629; box-shadow: var(--shadow); }
.theme-dialog::backdrop { background: rgba(12, 3, 11, .72); backdrop-filter: blur(5px); }
.theme-dialog form { position: relative; padding: 27px; }
.theme-dialog h2 { margin: 0 0 8px; font-size: 21px; }
.theme-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 15px 0; }
.theme-colors label, .gradient-angle-label { display: block; color: var(--muted); font-size: 11px; }
.theme-colors input { display: block; width: 100%; height: 42px; margin-top: 7px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; }
.gradient-angle-label output { float: right; color: var(--accent-bright); }
.gradient-angle-label input { width: 100%; margin-top: 9px; accent-color: var(--accent); }
.gradient-preview { height: 60px; margin: 17px 0 12px; border: 1px solid var(--line); border-radius: 13px; }
.theme-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-presets button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted-strong); background: transparent; font-size: 10px; cursor: pointer; }
.theme-presets button:hover { border-color: var(--accent-bright); }
.theme-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; margin-top: 19px; }
.theme-actions button { padding: 10px; }
:root { --custom-gradient: linear-gradient(135deg, #ff9fbd, #ffd1df); }
.brand-mark, .primary-button, .copy-button, .ai-fab { background-image: var(--custom-gradient); }
.light-theme .theme-dialog { color: var(--text); background: #fff8fa; }

.ai-fab { position: fixed; z-index: 4; right: 22px; bottom: 22px; display: grid; place-items: center; width: 54px; height: 54px; padding: 0; border: 1px solid rgba(255, 193, 214, .45); border-radius: 18px; color: #421629; background: linear-gradient(145deg, #ff9fbd, #ffd1df); box-shadow: 0 12px 35px rgba(104, 28, 70, .3); transition: transform .2s, box-shadow .2s; }
.ai-fab:hover { transform: translateY(-3px) rotate(3deg); box-shadow: 0 16px 40px rgba(104, 28, 70, .42); }
.ai-fab span { font-size: 22px; line-height: 18px; }
.ai-fab small { font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.ai-panel { position: fixed; z-index: 5; right: 22px; bottom: 88px; display: flex; flex-direction: column; width: min(370px, calc(100% - 30px)); height: min(570px, calc(100vh - 115px)); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 21px; color: var(--text); background: rgba(43, 20, 40, .97); box-shadow: 0 25px 90px rgba(22, 4, 17, .55); backdrop-filter: blur(20px); opacity: 0; pointer-events: none; transform: translateY(12px) scale(.98); transition: opacity .2s, transform .2s; }
.ai-panel.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.ai-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 17px; border-bottom: 1px solid var(--line); }
.ai-header > div { display: flex; align-items: center; gap: 10px; }
.ai-header strong, .ai-header small { display: block; }
.ai-header strong { font-size: 13px; }
.ai-header small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.ai-spark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; color: #421629; background: linear-gradient(145deg, #ffacc6, #ffe0e9); }
.ai-close, .dialog-close { border: 0; color: var(--muted); background: transparent; font-size: 22px; cursor: pointer; }
.ai-messages { flex: 1; overflow-y: auto; padding: 15px; }
.ai-message { max-width: 88%; margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px 13px 13px 3px; color: var(--muted-strong); font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.ai-message.user { margin-left: auto; border-radius: 13px 13px 3px 13px; color: #ffeaf1; border-color: rgba(255, 174, 199, .3); background: rgba(245, 142, 174, .15); }
.ai-message.error { color: var(--danger); }
.ai-quick { display: flex; gap: 6px; overflow-x: auto; padding: 0 13px 10px; }
.ai-quick button { flex: 0 0 auto; padding: 7px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: transparent; font-size: 10px; cursor: pointer; }
.ai-quick button:hover { color: var(--accent-bright); border-color: var(--line-strong); }
.ai-compose { display: flex; gap: 7px; padding: 10px 13px; border-top: 1px solid var(--line); }
.ai-compose textarea { min-height: 42px; max-height: 90px; padding: 10px; border-radius: 11px; font-size: 12px; resize: vertical; }
.ai-compose button { align-self: end; width: 37px; height: 37px; border: 0; border-radius: 10px; color: #421629; background: linear-gradient(145deg, #ffacc6, #ffd1df); font-size: 18px; cursor: pointer; }
.ai-footer { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px 12px; color: var(--muted); font-size: 9px; }
.ai-footer button { padding: 0; border: 0; color: var(--accent-bright); background: transparent; font-size: 10px; cursor: pointer; }
.ai-settings-dialog { width: min(390px, calc(100% - 30px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--text); background: #2c1629; box-shadow: var(--shadow); }
.ai-settings-dialog::backdrop { background: rgba(12, 3, 11, .72); backdrop-filter: blur(5px); }
.ai-settings-dialog form { position: relative; padding: 27px; }
.ai-settings-dialog h2 { margin: 0 0 8px; font-size: 21px; }
.ai-security-note { margin: 0 0 20px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.ai-settings-dialog label { display: block; margin: 12px 0; color: var(--muted); font-size: 11px; }
.ai-settings-dialog input, .ai-settings-dialog select { width: 100%; margin-top: 7px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: rgba(24, 10, 22, .8); font-size: 12px; }
.ai-setting-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; margin-top: 18px; }
.ai-setting-actions .secondary-button { padding: 10px; }
.ai-setting-actions .primary-button { padding: 10px; }
.light-theme .ai-panel, .light-theme .ai-settings-dialog, .light-theme .account-dialog { color: var(--text); background: #fff8fa; }
.light-theme .ai-settings-dialog input, .light-theme .ai-settings-dialog select { background: #fff; }
@media (max-width: 520px) { .ai-fab { right: 15px; bottom: 15px; } .ai-panel { right: 15px; bottom: 80px; width: calc(100% - 30px); height: min(570px, calc(100vh - 100px)); } }
