:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f5f7fb;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f5f7fb; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
.shell { width: min(920px, calc(100% - 28px)); margin: 0 auto; padding: 52px 0 80px; }
.hero { position: relative; display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; margin-bottom: 16px; }
.eyebrow { margin: 0 0 8px; color: #a51a64; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(30px, 6vw, 48px); letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 24px; }
.title-row { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; }
.hero > .eyebrow, .hero > .title-row { grid-column: 1 / -1; }
.title-row h1 { margin-bottom: 0; }
.brand-logo { display: block; width: clamp(60px, 8vw, 72px); height: clamp(60px, 8vw, 72px); flex: none; object-fit: contain; }
.hero-description { grid-column: 1; margin: 0; color: #657089; line-height: 1.7; }
.hero:lang(en) .title-row h1 { font-size: clamp(30px, 5vw, 44px); }
.hero:lang(en) .hero-tools { gap: 20px; }
.hero:lang(en) .source-button { width: 100px; padding-right: 8px; padding-left: 8px; font-size: 14px; white-space: nowrap; }
.hero:lang(en) .success-counter small { font-size: 9px; letter-spacing: -.02em; }
.hero-actions { grid-column: 2; display: flex; align-items: center; justify-content: center; transform: translateY(-4px); }
.buff-button { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; border: 1px solid rgba(165, 26, 100, .38); border-radius: 999px; padding: 4px 6px 4px 12px; color: #3b3340; background: rgba(255, 255, 255, .94); box-shadow: 0 7px 20px rgba(165, 26, 100, .12); font-size: 13px; font-weight: 650; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.buff-button:hover { border-color: #a51a64; box-shadow: 0 9px 24px rgba(165, 26, 100, .2); transform: translateY(-1px); }
.buff-button:active { transform: translateY(0) scale(.98); }
.buff-button.is-tapped { animation: buff-tap .24s cubic-bezier(.2, .8, .3, 1); }
.buff-button:focus-visible { outline: 3px solid rgba(165, 26, 100, .2); outline-offset: 2px; }
.buff-button:disabled { opacity: .75; }
.buff-spark { display: inline-grid; width: 18px; height: 18px; place-items: center; flex: none; font-size: 16px; line-height: 1; transform: translateY(-.5px); }
.buff-spark svg { display: block; width: 16px; height: 16px; }
.buff-button > strong { min-width: 48px; border-radius: 999px; padding: 5px 8px; color: #a51a64; background: #fff0f7; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; font-variant-numeric: tabular-nums; text-align: center; }
.buff-burst { position: absolute; right: 8px; top: 2px; pointer-events: none; color: #a51a64; font-size: 12px; font-weight: 800; opacity: 0; white-space: nowrap; transform: translateY(0) scale(.9); }
.buff-burst.is-error { color: #a1263d; }
.buff-burst.is-visible { animation: buff-rise 1.2s cubic-bezier(.2, .75, .3, 1) forwards; }
.buff-float-chip { position: fixed; z-index: 60; pointer-events: none; border: 1px solid rgba(255, 255, 255, .26); border-radius: 999px; padding: 5px 11px; color: #fff; background: #a51a64; box-shadow: 0 8px 20px rgba(165, 26, 100, .3); font-size: 12px; font-weight: 800; line-height: 1; white-space: nowrap; opacity: 0; will-change: transform, opacity; animation: buff-float-away 1.65s cubic-bezier(.16, .78, .28, 1) forwards; }
@keyframes buff-rise { 0% { opacity: 0; transform: translateY(0) scale(.9); } 18% { opacity: 1; } 100% { opacity: 0; transform: translateY(-32px) scale(1.05); } }
@keyframes buff-tap { 0% { transform: scale(1); } 45% { transform: scale(.95); } 100% { transform: scale(1); } }
@keyframes buff-float-away { 0% { opacity: 0; transform: translate(-50%, 8px) rotate(0) scale(.82); } 14% { opacity: 1; transform: translate(-50%, 0) rotate(0) scale(1); } 72% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--buff-drift)), -76px) rotate(var(--buff-tilt)) scale(1.04); } }
.hero-tools { position: absolute; z-index: 20; top: 0; right: 0; display: flex; align-items: center; gap: 24px; }
.source-contact { position: relative; z-index: 20; }
.source-button { min-height: 38px; border-color: #e2b5ce; color: #8d1555; background: #fff7fb; }
.source-popover { position: absolute; top: 47px; right: 0; width: 228px; border: 1px solid #e2d9e1; border-radius: 14px; padding: 12px 13px; background: #fff; box-shadow: 0 16px 42px rgba(33, 45, 78, .16); }
.source-popover::before { content: ""; position: absolute; top: -6px; right: 25px; width: 10px; height: 10px; border-top: 1px solid #e2d9e1; border-left: 1px solid #e2d9e1; background: #fff; transform: rotate(45deg); }
.source-popover p { margin-bottom: 8px; color: #69748a; font-size: 12px; }
.qq-copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.source-popover strong { color: #172033; font-size: 18px; letter-spacing: .02em; }
.source-popover .copy-qq-button { min-height: 30px; height: 30px; border-radius: 8px; padding: 0 10px; flex: none; font-size: 13px; }
#qq-copy-message { color: #247a58; font-size: 12px; text-align: center; }
#qq-copy-message:empty { display: none; }
#qq-copy-message:not(:empty) { display: block; margin-top: 7px; }
.success-counter { display: flex; align-items: center; gap: 9px; min-width: 118px; }
.success-counter > strong { color: #a51a64; font-size: 42px; font-weight: 650; letter-spacing: -.05em; line-height: .95; }
.success-counter span, .success-counter b, .success-counter small { display: block; }
.success-counter b { color: #273148; font-size: 13px; line-height: 1.1; }
.success-counter small { margin-top: 4px; color: #687389; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; white-space: nowrap; }
.panel, .task-card { border: 1px solid #e2e7f0; border-radius: 18px; background: #fff; box-shadow: 0 10px 34px rgba(33, 45, 78, .06); }
.submit-panel { padding: 24px; }
.fixed-settings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.fixed-settings span { padding: 13px 15px; border-radius: 12px; background: #f7f8fc; }
.fixed-settings small, .fixed-settings b { display: block; }
.fixed-settings small { color: #7a8499; font-size: 12px; }
.fixed-settings b { margin-top: 4px; font-size: 16px; font-weight: 700; line-height: 1.25; }
#global-task-stats { font-size: 15px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
label { display: block; margin-bottom: 8px; font-weight: 750; }
textarea { width: 100%; resize: vertical; border: 1px solid #cfd6e4; border-radius: 12px; padding: 14px; color: #172033; background: #fbfcfe; line-height: 1.55; outline: none; }
input { width: 100%; min-height: 48px; border: 1px solid #cfd6e4; border-radius: 12px; padding: 0 14px; color: #172033; background: #fbfcfe; outline: none; }
input:focus, textarea:focus { border-color: #b9347b; box-shadow: 0 0 0 3px rgba(185, 52, 123, .12); }
.proxy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.proxy-grid label { margin-bottom: 7px; }
.proxy-grid small { display: block; margin-top: 7px; color: #788299; font-size: 12px; line-height: 1.45; }
.proxy-grid small b { margin-right: 3px; color: #a51a64; font-weight: 800; }
.proxy-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.proxy-label-row label { margin-bottom: 0; }
.proxy-test { min-height: 32px; padding: 0 11px; font-size: 12px; }
.proxy-test-result { display: block; min-height: 18px; margin-top: 7px; color: #667189; font-size: 12px; line-height: 1.45; }
.proxy-test-result.passed { color: #16704b; }
.proxy-test-result.failed { color: #a1263d; }
.remember-proxy-option { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 13px; border-radius: 11px; padding: 11px 12px; color: #344058; background: #f7f8fc; cursor: pointer; }
.remember-proxy-option input { width: 17px; height: 17px; min-height: 0; margin: 2px 0 0; padding: 0; flex: none; accent-color: #a51a64; }
.remember-proxy-option span, .remember-proxy-option small { display: block; }
.remember-proxy-option b { font-size: 13px; }
.remember-proxy-option small { margin-top: 3px; color: #788299; font-size: 12px; line-height: 1.45; }
.privacy { margin: 9px 0 18px; color: #788299; font-size: 13px; line-height: 1.55; }
.form-row, .section-heading, .task-top, .task-bottom, .result, .progress-copy { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.primary, .secondary { min-height: 40px; border-radius: 10px; padding: 0 17px; font-weight: 750; }
.primary { border: 1px solid #a51a64; color: #fff; background: #a51a64; }
.secondary { border: 1px solid #d4dae7; color: #344058; background: #fff; }
.message { color: #9c285f; font-size: 14px; }
.tasks-section { margin-top: 38px; }
.section-heading { margin-bottom: 16px; }
.section-heading-tools { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.connection { color: #7b859b; font-size: 13px; }
.connection::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #b7bdc9; }
.connection.online { color: #247a58; }
.connection.online::before { background: #36b37e; }
.clear-failed-button { min-height: 34px; border-color: #e7c3cd; padding: 0 13px; color: #a1263d; background: #fff8fa; font-size: 12px; }
.clear-failed-button:not(:disabled):hover { border-color: #c15c76; color: #8f1e38; background: #fff1f4; }
.clear-succeeded-button { min-height: 34px; border-color: #b9dccb; padding: 0 13px; color: #16704b; background: #f5fffa; font-size: 12px; }
.clear-succeeded-button:not(:disabled):hover { border-color: #63b58b; color: #0f5f3d; background: #eafaf1; }
.task-list { display: grid; gap: 14px; }
.task-card { padding: 20px; }
.task-top > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.task-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-top time, .task-bottom { color: #7a8499; font-size: 13px; }
.status { flex: none; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; background: #fff1d8; color: #9b6200; }
.status-succeeded { color: #16704b; background: #ddf7ea; }
.status-failed, .status-cancelled { color: #a1263d; background: #fde5e9; }
.progress-copy { margin-top: 18px; font-size: 13px; color: #5f6a81; }
.progress { height: 7px; margin: 7px 0 18px; overflow: hidden; border-radius: 99px; background: #e9edf4; }
.progress i { display: block; height: 100%; border-radius: inherit; background: #a51a64; transition: width .25s ease; }
.error { margin: 14px 0; border-radius: 10px; padding: 12px; color: #9d2840; background: #fff1f3; line-height: 1.5; }
.result { margin: 15px 0; border-radius: 12px; padding: 12px; background: #f7f8fc; }
.result a { min-width: 0; overflow-wrap: anywhere; color: #235cad; line-height: 1.45; }
.task-bottom { margin-top: 14px; }
.empty { border: 1px dashed #cfd6e4; border-radius: 14px; padding: 44px 20px; text-align: center; color: #8790a4; }
.online-presence { position: fixed; z-index: 30; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px; min-height: 40px; border: 1px solid #e2d9e1; border-radius: 999px; padding: 7px 12px; color: #667086; background: rgba(255, 255, 255, .94); box-shadow: 0 11px 30px rgba(50, 35, 55, .12); backdrop-filter: blur(12px); font-size: 12px; }
.online-presence svg { width: 17px; height: 17px; fill: none; stroke: #7e7180; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.online-presence strong { min-width: 14px; color: #a51a64; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.utility-dock { position: fixed; z-index: 30; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.utility-dock .online-presence { position: static; right: auto; bottom: auto; z-index: auto; }
.language-switch { display: inline-flex; align-items: center; border: 1px solid #e2d9e1; border-radius: 999px; padding: 4px; background: rgba(255, 255, 255, .94); box-shadow: 0 11px 30px rgba(50, 35, 55, .12); backdrop-filter: blur(12px); }
.language-switch button { min-width: 42px; min-height: 28px; border: 0; border-radius: 999px; padding: 0 11px; color: #7e7180; background: transparent; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: color .18s ease, background .18s ease, box-shadow .18s ease; }
.language-switch button:hover { color: #a51a64; }
.language-switch button:focus-visible { outline: 2px solid rgba(165, 26, 100, .35); outline-offset: 2px; }
.language-switch button.is-active { color: #fff; background: #a51a64; box-shadow: 0 4px 12px rgba(165, 26, 100, .22); }

@media (min-width: 948px) {
  .hero:lang(en) .hero-actions { transform: translate(-22px, -4px); }
}

@media (max-width: 640px) {
  .shell { padding-top: 30px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-tools { position: relative; justify-content: flex-end; gap: 16px; margin-bottom: 16px; }
  .hero-tools, .hero > .eyebrow, .hero > .title-row, .hero-description, .hero-actions { grid-column: 1; }
  .hero-actions { justify-content: flex-start; margin-top: 10px; }
  .source-contact { display: flex; justify-content: flex-end; }
  .source-popover { top: 45px; width: min(280px, calc(100vw - 28px)); }
  .success-counter { min-width: 108px; }
  .success-counter > strong { font-size: 36px; }
  .title-row { gap: 12px; }
  .brand-logo { width: 58px; height: 58px; }
  .online-presence { right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); }
  .utility-dock { right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); }
  .submit-panel, .task-card { padding: 16px; }
  .fixed-settings { grid-template-columns: 1fr; }
  .proxy-grid { grid-template-columns: 1fr; }
  .section-heading-tools { gap: 8px; }
  .task-top, .result { align-items: flex-start; flex-direction: column; }
  .result .primary { width: 100%; }
}
