:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; color: #343b36; background: #f3f1ea; font-synthesis: none; --ink: #2d5149; --line: #dedfd5; --muted: #82857b; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 680px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid #54776c; outline-offset: 4px; }
button { -webkit-tap-highlight-color: transparent; }
.header { height: 94px; padding: 0 44px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand svg { width: 37px; height: 42px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.brand-name { font-family: "Songti SC", "STSong", serif; font-size: 25px; letter-spacing: 5px; }
.brand-name span { display: block; font-family: sans-serif; font-size: 8px; letter-spacing: 2px; margin-top: 5px; }
.header-note { font-size: 12px; color: var(--muted); letter-spacing: 2px; margin-right: 90px; }
.quiet-button { background: transparent; color: #535f54; border: 1px solid #d2d6ca; border-radius: 5px; padding: 10px 17px; font-size: 12px; }
.quiet-button:hover { background: #e9ece2; border-color: #aebba9; }
.quiet-button span { font-size: 17px; margin-right: 6px; }
.workspace { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; max-width: 1440px; margin: 0 auto; padding: 40px 48px 22px; min-height: calc(100dvh - 149px); }
.tools { padding: 7px 0 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; }
.eyebrow { font-size: 10px; letter-spacing: 2px; color: #8b8e82; }
.live-dot, .small-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #829d7b; }
h1 { font-family: "Songti SC", "STSong", serif; font-size: 27px; font-weight: 500; letter-spacing: 2px; margin: 20px 0 12px; }
.intro { color: #818478; line-height: 1.9; font-size: 12px; margin: 0 0 29px; }
.tool-stack { display: flex; flex-direction: column; gap: 8px; }
.tool-button { display: flex; gap: 13px; align-items: center; text-align: left; width: 100%; padding: 12px 15px; background: transparent; border: 1px solid #dedfd5; border-radius: 6px; color: #7c8576; font-size: 13px; }
.tool-button:hover { background: #eef0e7; }
.tool-button.active-tool { background: #e8ede3; border-color: #c8d4c4; color: var(--ink); }
.tool-button svg { width: 24px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.tool-button small { display: block; color: #7c8c79; font-size: 10px; margin-top: 5px; }
.tool-check { margin-left: auto; font-size: 12px; visibility: hidden; }
.active-tool .tool-check { visibility: visible; }
.needle-guide { margin-top: 28px; }
.needle-guide svg { display: block; width: 100%; height: 100px; fill: #e2e9d9; stroke: #a5b596; stroke-width: 1; margin-top: 14px; }
.needle-guide svg path:nth-child(2) { fill: #becdae; }
.needle-guide svg path:last-child { stroke: #708b62; }
.needle-guide h2 { font-family: "Songti SC", serif; font-size: 18px; margin-top: 15px; }
.needle-guide p { font-size: 12px; line-height: 2; color: #8d9585; }
.needle-note { border-top: 1px solid var(--line); padding-top: 17px; margin-top: 22px; font-size: 10px; color: #7a8970; }
.control-section { margin-top: 29px; }
.control-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
h2 { margin: 0; font-weight: 500; font-size: 12px; }
.control-heading span, output { color: #8b8f81; font-size: 10px; font-variant-numeric: tabular-nums; }
.swatches { display: flex; align-items: center; gap: 15px; margin: 2px 0 20px; padding: 3px; }
.swatch { width: 35px; height: 35px; border: 3px solid #f3f1ea; border-radius: 50%; background: var(--swatch); outline: 1px solid transparent; }
.swatch.selected { outline-color: var(--swatch); }
.swatch:hover { transform: translateY(-2px); }
.custom-color { width: 32px; height: 32px; display: grid; place-items: center; position: relative; border: 1px dashed #bfc5b7; border-radius: 50%; color: #88917e; font-size: 19px; cursor: pointer; }
.custom-color input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.custom-color:focus-within { outline: 2px solid #54776c; outline-offset: 4px; }
.hex-control { display: flex; align-items: center; height: 36px; border: 1px solid var(--line); border-radius: 4px; padding: 0 11px; gap: 20px; background: #f7f6f0; }
.hex-control span { font-size: 9px; letter-spacing: 1px; color: #9a9e91; }
.hex-control input { border: 0; background: transparent; color: #666f60; font-family: ui-monospace, monospace; font-size: 11px; width: 100%; padding: 5px; }
.field-error { font-size: 10px; color: #a74334; line-height: 1.7; margin: 8px 0 0; }
.size-slider { width: 100%; margin: 0; accent-color: #47684d; cursor: pointer; height: 16px; }
.range-labels { display: flex; justify-content: space-between; color: #969c8e; font-size: 9px; margin-top: 6px; }
.drop-preview { height: 64px; position: relative; display: flex; align-items: center; justify-content: center; margin-top: 8px; }
#preview-drop { z-index: 1; width: 28px; height: 28px; border-radius: 50%; background: #bd4638; }
.preview-line { position: absolute; height: 1px; width: 100%; background: repeating-linear-gradient(to right, #dedfd4 0 2px, transparent 2px 6px); }
.tip { border-top: 1px solid var(--line); margin-top: 9px; padding-top: 19px; }
.tip-number { font-size: 10px; color: #6e7a67; letter-spacing: 1px; }
.tip p { font-size: 11px; color: #979b8c; line-height: 1.9; margin: 9px 0 0; }
.canvas-area { min-width: 0; display: flex; flex-direction: column; align-items: center; }
.canvas-topline, .canvas-bottomline { display: flex; justify-content: space-between; width: 100%; max-width: min(940px, calc((100dvh - 290px) * 4 / 3 + 20px)); font-size: 10px; color: #969b8d; letter-spacing: .5px; }
.canvas-topline { padding: 4px 1px 15px; }
.canvas-topline span:first-child { color: #73816d; }
.small-dot { margin-right: 7px; width: 4px; height: 4px; }
.tray { width: 100%; max-width: min(940px, calc((100dvh - 290px) * 4 / 3 + 20px)); padding: 10px; border: 1px solid #d4d7ca; background: #e9e9df; border-radius: 5px; box-shadow: 0 12px 32px -22px #6d6a54; }
.canvas-wrap { position: relative; aspect-ratio: 4 / 3; width: 100%; overflow: hidden; box-shadow: 0 0 0 1px #d9d9cb; background: #f8f5ed; }
canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.empty-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.empty-state[hidden] { display: none; }
.empty-rings { width: 74px; height: 74px; margin-bottom: 27px; position: relative; display: grid; place-items: center; }
.empty-rings i { position: absolute; border: 1px solid #d6d9ca; border-radius: 50%; width: 74px; height: 74px; }
.empty-rings i:nth-child(2) { width: 49px; height: 49px; border-color: #c9cfbc; }
.empty-rings i:nth-child(3) { width: 22px; height: 22px; border-color: #aebfa1; background: #e5e9db; }
.empty-state h2 { color: #7f8876; font-family: "Songti SC", "STSong", serif; font-size: 21px; letter-spacing: 2px; }
.empty-state p { color: #a0a48f; font-size: 11px; margin-top: 15px; letter-spacing: 1px; }
.brush-cursor { position: absolute; pointer-events: none; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid rgba(255,255,255,.9); outline: 1px solid rgba(52,68,52,.6); }
.brush-cursor::before, .brush-cursor::after { content: ''; position: absolute; left: 50%; top: 50%; background: #536f5a; transform: translate(-50%,-50%); }
.brush-cursor::before { width: 7px; height: 1px; }
.brush-cursor::after { width: 1px; height: 7px; }
.brush-cursor.needle-cursor { width: 10px; height: 10px; }
.canvas-bottomline { padding: 15px 1px 0; }
.session-note { font-size: 10px; color: #a0a591; margin-top: 20px; letter-spacing: .5px; }
.footer { border-top: 1px solid var(--line); margin: 0 44px; display: flex; justify-content: space-between; padding: 19px 0; font-size: 10px; letter-spacing: 1px; color: #92998a; }
.footer span:last-child { color: #a6ab9d; }
.footer span span { margin-left: 15px; }
dialog { max-width: 390px; padding: 30px; border: 1px solid #d3d9c8; border-radius: 8px; background: #f8f6ee; color: #3e4e41; }
dialog::backdrop { background: #263a3040; }
dialog h2 { font-family: "Songti SC", serif; font-size: 22px; margin: 20px 0 12px; }
dialog p { font-size: 12px; color: #7e8776; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }
.primary-button { border: 1px solid var(--ink); background: var(--ink); color: #fff; border-radius: 5px; font-size: 12px; padding: 10px 17px; }
@media (max-width: 1000px) { .workspace { grid-template-columns: 195px minmax(0,1fr); gap: 28px; padding: 30px 28px 20px; } .header { padding: 0 28px; height: 82px; } .header-note { margin-right: 0; } .footer { margin: 0 28px; } .swatches { gap: 12px; } .tray { padding: 7px; } .empty-state h2 { font-size: 18px; } }
@media (min-width: 1150px) and (min-height: 850px) { .workspace { padding-top: 50px; padding-bottom: 35px; } }
@media (max-height: 800px) {
  .header { height: 76px; }
  .workspace { padding-top: 25px; padding-bottom: 10px; min-height: calc(100dvh - 131px); }
  h1 { margin-top: 15px; margin-bottom: 9px; }
  .intro { margin-bottom: 20px; }
  .control-section { margin-top: 20px; }
  .control-heading { margin-bottom: 12px; }
  .drop-preview { height: 40px; margin-top: 6px; }
  .tool-button { padding-top: 9px; padding-bottom: 9px; }
  .tools .control-section { margin-top: 15px; }
  .swatches { margin-bottom: 12px; }
  .drop-preview { display: none; }
  .tip { display: none; }
}

.segments { display: flex; gap: 5px; }
.segments button { flex: 1; padding: 10px 3px; border: 1px solid var(--line); border-radius: 4px; color: #7c8576; background: transparent; font-size: 11px; }
.segments button[aria-pressed="true"] { color: var(--ink); border-color: #b4c5ad; background: #e8ede3; }
.comb-note { font-size: 11px; line-height: 1.9; color: #828d79; margin-top: 22px; }
.brush-cursor.comb-cursor { border: 0; outline: 0; }
.comb-cursor i { position: absolute; width: 5px; height: 5px; transform: translate(-50%,-50%); background: #f8f5ed; border: 1px solid #536f5a; border-radius: 50%; box-shadow: 0 0 0 1px #ffffff90; }
@media (max-height: 900px) { .tool-button { padding-top: 9px; padding-bottom: 9px; } .intro { margin-bottom: 18px; } .drop-preview { display: none; } }

.header-actions, .history-actions { display: flex; align-items: center; gap: 8px; }
.header-actions { gap: 18px; }
.history-actions .quiet-button { padding: 10px 12px; }
.quiet-button:disabled { color: #b4b8ac; border-color: #e0e2d8; background: transparent; cursor: default; }
@media (max-width: 1100px) { .header-note { display: none; } }

.session-note.save-warning { color: #a26445; }
.export-status { margin: 0; font-size: 10px; color: #73816d; }
.export-status:empty { display: none; }
.palette-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; color: #7c8576; font-size: 11px; }
.palette-control select { min-width: 105px; padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: #f7f6f0; color: var(--ink); font: inherit; cursor: pointer; }
select:focus-visible { outline: 2px solid #54776c; outline-offset: 3px; }
@media (max-height: 900px) { .tip { display: none; } }
.primary-button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 1250px) { .header-note { display: none; } .header-actions { gap: 10px; } }
