:root {
  color-scheme: light;
  --ink: #152238;
  --muted: #6f7c90;
  --blue: #3478f6;
  --violet: #7658ed;
  --line: rgba(69, 99, 150, .16);
  font-family: ui-rounded, "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 2%, rgba(134, 199, 255, .34), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(255, 204, 128, .34), transparent 24%),
    linear-gradient(145deg, #f8fbff 0%, #eef5ff 48%, #f8f3ff 100%);
  color: var(--ink);
}
body::before { position: fixed; inset: 0; z-index: -1; opacity: .3; background-image: linear-gradient(rgba(78,112,170,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(78,112,170,.08) 1px, transparent 1px); background-size: 36px 36px; content: ""; mask-image: linear-gradient(to bottom, #000, transparent 72%); }
button { font: inherit; }
.site-header, main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header { height: 68px; margin-top: 20px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; border: 1px solid rgba(255,255,255,.85); border-radius: 20px; background: rgba(255,255,255,.72); box-shadow: 0 16px 45px rgba(53,78,120,.1); backdrop-filter: blur(20px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 21px; letter-spacing: -.04em; }
.brand strong { background: linear-gradient(90deg, #1b2a40 12%, #3478f6 52%, #8c55e9 76%, #ff705e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-mark { width: 32px; height: 32px; padding: 6px; display: flex; align-items: end; gap: 3px; border-radius: 10px; background: #152238; box-shadow: 0 6px 14px rgba(31,56,95,.22); }
.brand-mark i { flex: 1; border-radius: 3px; }
.brand-mark i:nth-child(1) { height: 46%; background: #ff705e; }
.brand-mark i:nth-child(2) { height: 73%; background: #fec657; }
.brand-mark i:nth-child(3) { height: 100%; background: #65a8ff; }
.header-badge { padding: 8px 12px; border: 1px solid rgba(52,120,246,.16); border-radius: 999px; background: rgba(236,244,255,.8); color: #4c6b9d; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.intro { padding: 76px 0 46px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.eyebrow { margin: 0 0 16px; color: var(--blue); font-size: 10px; font-weight: 850; letter-spacing: .18em; }
.eyebrow span { width: 7px; height: 7px; margin-right: 6px; display: inline-block; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--violet)); box-shadow: 0 0 0 5px rgba(52,120,246,.1); }
h1 { margin: 0; max-width: 920px; font-size: clamp(48px, 7vw, 80px); letter-spacing: -.065em; line-height: 1.04; }
h1 em { background: linear-gradient(90deg, #2774f0, #7359e9 55%, #f06b87); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: normal; }
.intro > p:nth-of-type(2) { max-width: 630px; margin: 25px auto 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.feature-chips { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.feature-chips span { padding: 8px 13px; border: 1px solid rgba(69,99,150,.12); border-radius: 999px; background: rgba(255,255,255,.7); color: #58708f; font-size: 11px; font-weight: 650; box-shadow: 0 8px 20px rgba(51,78,120,.06); }
.workspace { min-height: 540px; position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr); border: 1px solid rgba(255,255,255,.9); border-radius: 30px; overflow: hidden; background: rgba(255,255,255,.82); box-shadow: 0 34px 90px rgba(57,79,123,.17), 0 2px 0 rgba(255,255,255,.9) inset; backdrop-filter: blur(20px); }
.workspace::before { position: absolute; top: 0; right: 0; left: 0; z-index: 3; height: 5px; background: linear-gradient(90deg, #2e79f4, #7f5ce9 48%, #ff735f 100%); content: ""; }
.upload-panel { min-height: 540px; position: relative; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #13213a 0%, #213a68 58%, #415bb1 100%); transition: box-shadow .2s, filter .2s; }
.upload-panel::before { position: absolute; width: 420px; height: 420px; right: -160px; top: -180px; border-radius: 50%; background: rgba(114,146,255,.28); filter: blur(10px); content: ""; }
.upload-panel::after { position: absolute; width: 290px; height: 290px; left: -120px; bottom: -150px; border-radius: 50%; background: rgba(255,113,111,.2); filter: blur(10px); content: ""; }
.upload-panel[data-dragging="true"] { box-shadow: inset 0 0 0 4px #8ab7ff; filter: brightness(1.12); }
.empty-state { width: min(78%, 430px); min-height: 340px; z-index: 1; padding: 50px 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed rgba(255,255,255,.42); border-radius: 26px; background: rgba(255,255,255,.08); color: #fff; text-align: center; backdrop-filter: blur(10px); }
.upload-icon { width: 84px; height: 84px; margin-bottom: 24px; display: grid; place-items: center; border-radius: 24px; background: linear-gradient(145deg, rgba(255,255,255,.24), rgba(255,255,255,.09)); box-shadow: 0 15px 34px rgba(7,18,42,.26); }
.upload-icon span { font-size: 40px; font-weight: 250; }
.empty-state strong { font-size: 25px; letter-spacing: -.03em; }
.empty-state p { margin: 9px 0 26px; color: rgba(255,255,255,.7); }
.empty-state small { margin-top: 16px; color: rgba(255,255,255,.55); font-size: 10px; }
.primary-button, .replace-button { border: 0; border-radius: 13px; cursor: pointer; transition: transform .18s, box-shadow .18s; }
.primary-button { min-width: 154px; height: 49px; padding: 0 24px; background: #fff; color: #244071; font-weight: 800; box-shadow: 0 12px 30px rgba(6,18,42,.25); }
.primary-button:hover, .replace-button:hover { transform: translateY(-2px); }
.result { width: 100%; height: 100%; position: absolute; z-index: 2; inset: 0; }
.preview-frame { width: 100%; height: 100%; min-height: 540px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 42%, #314b79, #111d32 70%); }
.preview-frame img { display: block; max-width: calc(100% - 36px); max-height: 504px; width: auto; height: auto; border-radius: 18px; object-fit: contain; box-shadow: 0 25px 65px rgba(1,7,20,.46); }
.replace-button { position: absolute; right: 26px; bottom: 24px; min-height: 44px; padding: 0 19px; border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.92); color: #20365d; font-weight: 750; box-shadow: 0 10px 28px rgba(5,15,35,.22); backdrop-filter: blur(12px); }
.palette-panel { padding: 42px 38px; background: rgba(250,252,255,.86); }
.panel-heading { margin-bottom: 26px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.panel-heading .eyebrow { margin-bottom: 9px; }
h2 { margin: 0; font-size: 34px; letter-spacing: -.05em; }
#status { max-width: 155px; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: right; }
#status[data-type="error"] { color: #d44d52; font-weight: 750; }
.palette { display: grid; gap: 11px; }
.palette-placeholder { height: 385px; padding: 15px; display: grid; grid-template-rows: repeat(5, 1fr); gap: 9px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 14px 40px rgba(56,79,119,.08); }
.palette-placeholder i { border-radius: 12px; }
.palette-placeholder i:nth-child(1) { background: linear-gradient(90deg, #2e6f9e 0 26%, #eef5fb 26%); }
.palette-placeholder i:nth-child(2) { background: linear-gradient(90deg, #8ec5f7 0 26%, #f3f8fe 26%); }
.palette-placeholder i:nth-child(3) { background: linear-gradient(90deg, #2f5233 0 26%, #eef4ed 26%); }
.palette-placeholder i:nth-child(4) { background: linear-gradient(90deg, #f5c451 0 26%, #fff8e7 26%); }
.palette-placeholder i:nth-child(5) { background: linear-gradient(90deg, #8a9ba8 0 26%, #f0f4f7 26%); }
.color-card { min-height: 70px; display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.92); box-shadow: 0 8px 20px rgba(55,78,118,.055); }
.swatch { height: 48px; margin-left: 11px; border-radius: 12px; background: var(--swatch); box-shadow: inset 0 0 0 1px rgba(19,33,58,.05); }
.color-info { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; }
.color-info span { grid-column: 1 / -1; color: #8b96a7; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.color-info strong { font-size: 18px; letter-spacing: -.02em; }
.color-info small { color: var(--muted); font-size: 9px; }
.copy-actions { padding-right: 11px; display: grid; gap: 5px; }
.copy-actions button { padding: 5px 8px; border: 1px solid rgba(62,91,140,.16); border-radius: 7px; background: #f4f8ff; color: #3d5e91; cursor: pointer; font-size: 9px; font-weight: 700; }
.copy-actions button:hover { border-color: var(--blue); color: var(--blue); }
.steps { padding: 42px 0 76px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps article { min-height: 112px; padding: 22px; display: flex; align-items: center; gap: 16px; border: 1px solid rgba(255,255,255,.86); border-radius: 20px; background: rgba(255,255,255,.62); box-shadow: 0 12px 30px rgba(55,80,120,.08); backdrop-filter: blur(12px); }
.steps span { width: 42px; height: 42px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 13px; background: linear-gradient(145deg, #e8f2ff, #eee8ff); color: var(--blue); font-size: 11px; font-weight: 850; }
.steps strong { font-size: 15px; }
.steps p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
footer { height: 86px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: #8a96a7; font-size: 9px; letter-spacing: .16em; }
footer strong { color: var(--ink); font-size: 14px; letter-spacing: -.02em; }

@media (max-width: 760px) {
  .site-header, main, footer { width: min(100% - 24px, 620px); }
  .site-header { height: 60px; margin-top: 12px; padding: 0 15px; border-radius: 16px; }
  .brand { font-size: 19px; }
  .brand-mark { width: 29px; height: 29px; }
  .header-badge { padding: 7px 9px; font-size: 8px; }
  .intro { padding: 54px 3px 34px; align-items: flex-start; text-align: left; }
  h1 { font-size: clamp(42px, 13vw, 60px); }
  .intro > p:nth-of-type(2) { margin: 20px 0 0; font-size: 14px; }
  .feature-chips { justify-content: flex-start; }
  .workspace { min-height: 0; display: block; border-radius: 23px; }
  .upload-panel { min-height: 390px; }
  .empty-state { width: calc(100% - 34px); min-height: 320px; padding: 32px 18px; border-radius: 20px; }
  .upload-icon { width: 66px; height: 66px; margin-bottom: 18px; border-radius: 19px; }
  .preview-frame { min-height: 390px; padding: 18px; }
  .preview-frame img { max-width: 100%; max-height: 354px; border-radius: 13px; }
  .replace-button { right: 16px; bottom: 15px; }
  .palette-panel { padding: 30px 17px 22px; }
  .panel-heading { align-items: start; }
  h2 { font-size: 29px; }
  .palette-placeholder { height: 320px; padding: 11px; }
  .color-card { min-height: 67px; grid-template-columns: 62px 1fr; gap: 11px; }
  .swatch { height: 45px; margin-left: 9px; }
  .copy-actions { grid-column: 1 / -1; padding: 0 9px 9px; display: grid; grid-template-columns: 1fr 1fr; }
  .copy-actions button { min-height: 34px; }
  .color-info { padding-right: 10px; }
  .color-info small { font-size: 8px; }
  .steps { padding: 28px 0 54px; grid-template-columns: 1fr; gap: 10px; }
  .steps article { min-height: 94px; padding: 18px; }
  footer { height: 76px; }
  footer span { font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .primary-button, .replace-button { transition: none; } }
