:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --paper: #fff;
  --ink: #171c2c;
  --muted: #5c6578;
  --faint: #707a90;
  --line: #e2e6ef;
  --blue: #3156e6;
  --blue-dark: #2649d7;
  --soft-blue: #edf1ff;
  --radius: 15px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .43; cursor: default; }
button:focus-visible, textarea:focus-visible, input:focus-visible, a:focus-visible, .stage:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px;
}
i[data-icon] { display: inline-flex; flex: 0 0 auto; font-style: normal; }
i[data-icon] svg { width: 17px; height: 17px; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-inner, .shell { width: min(1440px, calc(100% - 80px)); margin-inline: auto; }
.topbar-inner { display: flex; min-height: 66px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-size: 22px; font-weight: 820; letter-spacing: -.055em; }
.brand img { display: block; object-fit: contain; }
.top-actions, .source-actions, .tools, .history, .zoom, .file-details, .privacy-status { display: flex; align-items: center; }
.top-actions { gap: 7px; }
.button, .icon-button, .tool {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 8px;
  font-size: 14px; font-weight: 650; white-space: nowrap;
}
.button { padding: 0 12px; min-height: 36px; text-decoration: none; }
.button.quiet:hover:not(:disabled), .icon-button:hover:not(:disabled), .tool:hover:not(:disabled) { background: #f0f2f8; color: var(--ink); }
.button[aria-current="page"] { color: var(--blue-dark); background: var(--soft-blue); }
.button.secondary { background: var(--paper); color: var(--ink); border-color: #dce1eb; box-shadow: 0 1px 2px #14255108; }
.button.secondary:hover:not(:disabled) { background: #f8f9ff; border-color: #c2ccef; }
.button.primary { background: var(--blue); color: white; border-color: var(--blue); box-shadow: 0 2px 5px #3156e638; }
.button.primary:hover:not(:disabled) { background: var(--blue-dark); border-color: var(--blue-dark); }
.shell { padding-block: 20px 52px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tool-intro { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: #35426c; font-weight: 580; }
.intro-icon { display: grid; flex: 0 0 34px; height: 34px; place-items: center; border: 1px solid #dce4fb; border-radius: 9px; background: var(--soft-blue); color: var(--blue-dark); }
.source-actions { gap: 8px; flex-wrap: wrap; }
.source-actions .button { min-height: 40px; padding-inline: 13px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(315px, 345px); gap: 14px; align-items: stretch; }
.paper { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 3px 12px #182e5008; }
.editor, .sidebar { height: clamp(490px, calc(100svh - 176px), 1050px); }
.editor { display: flex; flex-direction: column; }
.source-bar { display: flex; min-height: 52px; align-items: center; justify-content: end; padding: 7px 12px; border-bottom: 1px solid var(--line); }
.source-bar .button { min-height: 34px; }
.toolbar { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 9px 12px; min-height: 54px; border-bottom: 1px solid var(--line); }
.divider { flex: 0 0 1px; display: block; height: 22px; background: var(--line); }
.tools { gap: 3px; }
.tool { height: 34px; padding-inline: 9px; }
.tool[aria-pressed="true"] { color: #2448ce; background: var(--soft-blue); border-color: #dce4ff; }
.icon-button { height: 34px; min-width: 32px; padding: 0 5px; }
.history, .zoom { gap: 2px; }
.zoom { margin-left: auto; }
.zoom-value { font: 650 12px var(--mono); min-width: 54px; padding-inline: 5px; min-height: 34px; }
.color-button { min-width: 44px; }
.color-button i svg { width: 12px; height: 12px; }
.swatch { width: 17px; height: 17px; border-radius: 50%; background: var(--mark-color, var(--blue)); border: 1px solid #11182726; }
.popover { position: absolute; left: min(245px, 46%); top: 48px; z-index: 5; width: 216px; padding: 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 12px 35px #182e502c; }
.popover-title { font-weight: 700; font-size: 14px; }
.swatches { display: flex; justify-content: space-between; gap: 4px; margin-block: 10px; }
.swatches button { width: 25px; height: 25px; border: 2px solid white; border-radius: 50%; background: var(--chip); box-shadow: 0 0 0 1px #1c254137; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--blue); }
.hex-label { display: flex; align-items: center; gap: 8px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; font: 12px var(--mono); color: var(--muted); }
#color-picker { width: 25px; height: 25px; cursor: pointer; border: 0; background: transparent; padding: 2px; }
#hex { min-width: 0; flex: 1; border: 0; background: transparent; color: var(--ink); }
.stage {
  flex: 1 1 auto; position: relative; overflow: hidden; min-height: 0; touch-action: none;
  background-color: #edf0f7; background-image: radial-gradient(#c4ccdc 1px, transparent 1px); background-size: 18px 18px;
}
.stage:has(.empty-stage:not([hidden])) { touch-action: pan-y; }
.stage[data-mode="draw"] { cursor: crosshair; }
.stage[data-mode="pan"] { cursor: grab; }
.stage[data-mode="grabbing"] { cursor: grabbing; }
.stage #source { position: absolute; pointer-events: none; user-select: none; box-shadow: 0 3px 22px #25355e26; }
.stage #overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.empty-stage, .drop-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 14px; text-align: center; }
.empty-stage { gap: 15px; }
.empty-stage h2 { font-size: clamp(19px, 2.1vw, 25px); line-height: 1.25; letter-spacing: -.035em; }
.drop-hint { max-width: 43ch; margin-top: -3px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.drop-hint kbd { padding: 1px 5px; background: white; color: #35426c; }
.drop-hint strong { color: var(--ink); }
.empty-stage .source-actions { justify-content: center; }
.empty-art { width: 59px; height: 59px; display: grid; place-items: center; background: white; border: 1px solid var(--line); border-radius: 14px; color: var(--blue); box-shadow: 0 4px 12px #14255110; }
.empty-art i svg { width: 26px; height: 26px; }
.drop-overlay { z-index: 2; pointer-events: none; inset: 14px; border: 2px dashed var(--blue); border-radius: 14px; background: #edf1ffeb; color: #2543c3; }
.drop-overlay i svg { width: 30px; height: 30px; }
.canvas-footer { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 8px 13px; min-height: 41px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.file-details { min-width: 0; gap: 7px; }
.file-details i svg { width: 14px; height: 14px; }
#filename { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #343e55; }
#dimensions { font-family: var(--mono); white-space: nowrap; color: var(--faint); }
.tool-hint { flex: 0 0 auto; text-align: end; }
.sidebar { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.sidebar-head { display: flex; justify-content: space-between; align-items: center; padding: 9px 13px 9px 16px; min-height: 54px; border-bottom: 1px solid var(--line); }
.sidebar-title { display: flex; align-items: center; gap: 8px; }
.sidebar-title h2 { font-size: 16px; font-weight: 760; }
.count { display: inline-grid; place-items: center; min-width: 23px; height: 22px; padding-inline: 5px; color: #2448ce; background: var(--soft-blue); border-radius: 6px; font: 700 12px var(--mono); }
.notes { overflow-y: auto; padding: 12px; scrollbar-width: thin; }
.note { margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: white; }
.note.selected { border-color: #b7c5ff; box-shadow: 0 1px 4px #3156e619; }
.note-head { display: flex; align-items: center; gap: 7px; padding: 6px 7px 6px 8px; }
.note.selected .note-head { background: #f3f5ff; }
.note-pick { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); padding: 2px; display: flex; align-items: center; gap: 8px; text-align: start; }
.note-pick .note-text { flex: 1; min-width: 0; }
.note-pick strong, .note-pick small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.note-pick strong { font-size: 14px; }
.note-pick small { color: var(--muted); font-size: 12px; }
.note-pick > i { color: var(--faint); }
.note.expanded .note-pick > i { transform: rotate(180deg); }
.note-number { border-radius: 7px; background: var(--mark-color); color: var(--number-ink, white); font: 750 13px var(--mono); display: grid; place-items: center; height: 27px; min-width: 28px; padding-inline: 4px; }
.note-head .icon-button { min-width: 28px; height: 30px; }
.note-head .icon-button i svg { width: 15px; height: 15px; }
.note-content { display: grid; gap: 11px; padding: 11px 10px 12px; }
.note-content label { display: grid; gap: 4px; font-weight: 650; font-size: 13px; color: #323b50; }
.note-content textarea { width: 100%; min-height: 66px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font-size: 14px; line-height: 1.45; resize: vertical; }
.note-content textarea::placeholder { color: #737d90; }
.notes-empty { padding: 40px 13px; text-align: center; display: grid; justify-items: center; gap: 7px; color: var(--muted); font-size: 14px; }
.notes-empty strong { color: var(--ink); }
.notes-empty i { color: var(--blue); }
.notes-empty i svg { width: 24px; height: 24px; }
.export { padding: 11px 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.export .button { padding-inline: 7px; min-height: 40px; }
.workspace-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px 18px; min-height: 42px; padding-block: 8px; }
.privacy-status { gap: 6px; color: var(--muted); font-size: 13px; }
.privacy-status i svg { width: 14px; height: 14px; }
.guide-nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.guide-nav a { color: var(--muted); text-decoration: underline; text-decoration-color: #b3bdd8; text-underline-offset: 3px; }
.guide-nav a:hover { color: var(--blue-dark); }
.product, .mac-page { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.product { margin-top: clamp(48px, 8vw, 100px); }
.product-overview, .mac-overview { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); align-items: center; gap: clamp(24px, 5vw, 72px); }
.product-copy h2, .mac-copy h1 { font-size: clamp(30px, 4vw, 52px); line-height: 1.1; letter-spacing: -.055em; }
.product-copy p, .mac-lead { margin-block: 16px 20px; font-size: 17px; color: var(--muted); }
.example { position: relative; margin: 0; overflow: hidden; border: 1px solid #d4dae9; border-radius: 13px; box-shadow: 0 12px 34px #2d3d6218; }
.example img, .mac-preview { display: block; width: 100%; height: auto; }
.example-box, .example-arrow { position: absolute; color: white; }
.example-box { inset: 19% auto auto 84.375%; width: 11.35%; height: 8%; border: 2px solid var(--blue); background: #3156e61a; }
.example-box span, .example-arrow { padding: 1px 5px; border: 1px solid white; border-radius: 4px; background: var(--blue); font: 700 11px/1.4 var(--mono); }
.example-box span { position: absolute; inset: auto auto 100% -2px; }
.example-arrow { inset: 55% auto auto 24%; }
.example-arrow::before { position: absolute; inset: 82% auto auto -87%; width: 85%; height: 2px; border-radius: 99px; background: var(--blue); content: ""; transform: rotate(-14deg); }
.guide-section { margin-top: clamp(42px, 6vw, 74px); padding-top: clamp(24px, 4vw, 38px); border-top: 1px solid var(--line); scroll-margin-top: 14px; }
.guide-section h2 { font-size: clamp(25px, 3.2vw, 37px); line-height: 1.15; letter-spacing: -.043em; }
.guide-section h3 { font-size: 17px; }
.guide-section p { margin-top: 6px; color: var(--muted); }
.guide-steps, .case-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; margin-block: 19px 0; }
.guide-steps { list-style: none; padding: 0; counter-reset: guide; }
.guide-steps li { counter-increment: guide; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.guide-steps li::before { display: grid; width: 28px; height: 28px; margin-bottom: 10px; place-items: center; border-radius: 7px; background: var(--soft-blue); color: var(--blue-dark); font: 700 13px var(--mono); content: counter(guide); }
.feedback-example { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 60px); align-items: center; }
.feedback-example > div > p { margin-top: 12px; }
.example-note { padding: 19px 21px; border: 1px solid #dae2f3; border-radius: 13px; background: white; box-shadow: 0 6px 20px #182e500a; }
.example-location { display: flex; align-items: center; gap: 8px; color: #304270; }
.example-location span { padding: 3px 8px; border-radius: 6px; background: var(--blue); color: white; font: 700 13px var(--mono); }
.example-location code { font: 600 13px/1.5 var(--mono); }
.example-note dl { display: grid; gap: 3px; margin-block: 14px 12px; }
.example-note dt { font-weight: 700; }
.example-note dd { margin: 0; color: #414c63; }
.example-note dd + dt { margin-top: 9px; }
.example-note > p { padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.case-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.faq details { padding-block: 14px; border-bottom: 1px solid var(--line); }
.faq details:first-of-type { margin-top: 9px; }
.faq summary { color: var(--ink); font-weight: 650; cursor: pointer; }
.faq summary::marker { color: var(--blue-dark); }
.faq details p { max-width: 80ch; padding-left: 17px; }
.faq a { color: var(--blue-dark); text-underline-offset: 3px; }
.mac-page { padding-top: clamp(32px, 6vw, 90px); }
.mac-overview { border-bottom: 1px solid var(--line); padding-bottom: clamp(28px, 5vw, 65px); }
.mac-icon { display: block; margin-bottom: 12px; }
.mac-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mac-actions .button { min-height: 42px; padding-inline: 13px; }
.mac-requirements { margin-top: 11px; color: var(--muted); font-size: 13px; }
.mac-preview { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 38px #2d3d621e; }
.mac-install { padding-block: 30px 12px; max-width: 660px; }
.mac-install h2 { font-size: 23px; }
.mac-install ol { display: grid; gap: 7px; padding-inline-start: 1.3em; }
.mac-install p { color: var(--muted); }
.mac-install a { color: var(--blue-dark); text-underline-offset: 3px; }
.dialog { width: min(440px, calc(100vw - 28px)); max-height: calc(100svh - 28px); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); padding: 0; box-shadow: 0 20px 80px #1520414d; }
.dialog.wide { width: min(880px, calc(100vw - 28px)); }
.dialog::backdrop { background: #121c38a8; }
.dialog-head, .dialog-actions { display: flex; align-items: center; gap: 9px; padding: 13px 16px; }
.dialog-head { justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 18px; }
.dialog-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.dialog-actions { justify-content: flex-end; border-top: 1px solid var(--line); }
.preview-body, .crop-body { background: #edf0f7; min-height: 80px; padding: 14px; display: grid; place-items: center; overflow: auto; max-height: 68svh; }
.preview-body img { display: block; max-width: 100%; height: auto; background: white; box-shadow: 0 2px 12px #222b452d; }
.crop-body canvas { display: block; max-width: 100%; max-height: 62svh; object-fit: contain; cursor: crosshair; touch-action: none; }
.shortcut-body { padding: 7px 17px 15px; }
.shortcut-row { display: flex; justify-content: space-between; align-items: center; min-height: 35px; border-bottom: 1px solid var(--line); gap: 12px; }
.shortcut-row:last-child { border: 0; }
kbd { padding: 3px 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; font: 12px var(--mono); white-space: nowrap; }
.replace-note { padding: 18px 16px; }
.toast { z-index: 10; position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 28px); border: 1px solid #303a50; border-radius: 9px; padding: 9px 15px; background: #20283b; color: white; box-shadow: 0 5px 20px #1824434a; font-size: 14px; }
@media (max-width: 1050px) {
  .topbar-inner, .shell { width: calc(100% - 36px); }
  .product { width: 100%; }
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(270px, 305px); }
  .toolbar { gap: 5px; padding-inline: 8px; }
  .tool { padding-inline: 6px; }
}
@media (max-width: 800px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .editor { height: max(370px, 57svh); }
  .sidebar { height: auto; min-height: 250px; }
  .notes { max-height: 430px; }
  .product-overview, .mac-overview, .feedback-example { grid-template-columns: minmax(0, 1fr); }
  .guide-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell { padding-top: 16px; }
  .mac-page { padding-top: 36px; }
}
@media (max-width: 530px) {
  .topbar-inner, .shell { width: calc(100% - 22px); }
  .topbar-inner { min-height: 56px; flex-wrap: wrap; column-gap: 5px; padding-block: 5px; }
  .top-actions { gap: 1px; flex-wrap: wrap; }
  .top-actions .button { padding-inline: 6px; font-size: 13px; }
  .brand { gap: 5px; }
  .brand img { width: 34px; height: 34px; }
  .toolbar { gap: 3px; }
  .tool { width: 31px; }
  .tool span, .tool-hint, #help span { display: none; }
  .toolbar .divider { margin-inline: 1px; }
  .icon-button { min-width: 27px; }
  .color-button { min-width: 35px; gap: 3px; }
  .zoom { gap: 0; }
  .zoom-value { min-width: 43px; }
  .source-actions { gap: 6px; }
  .source-actions .button { min-height: 37px; padding-inline: 8px; }
  .empty-stage .source-actions { display: grid; grid-template-columns: max-content max-content; }
  .empty-stage .source-actions #open { grid-column: 1 / -1; justify-self: center; }
  .source-bar { justify-content: start; padding-inline: 8px; }
  .source-bar .source-actions .button { gap: 4px; min-height: 34px; padding-inline: 5px; font-size: 12px; }
  .source-bar .source-actions i svg { width: 14px; height: 14px; }
  .tool-intro { font-size: 13px; }
  .empty-stage { gap: 12px; }
  .drop-hint { font-size: 13px; }
  .guide-steps, .case-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
