@import "tailwindcss"; :root { --ink: #202724; --muted: #69716d; --paper: #f5f1e8; --card: #fffdf8; --line: #d9d5ca; --green: #1f6b4d; --green-dark: #164b39; --lime: #cbe568; --orange: #ee7b43; } * { box-sizing: border-box; } html { scroll-behavior: smooth; } body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; } button, input, select { font: inherit; } button, label, input[type="range"] { -webkit-tap-highlight-color: transparent; } button { color: inherit; } .topbar { height: 72px; padding: 0 clamp(20px, 5vw, 80px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(245, 241, 232, .92); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); } .brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 20px; font-weight: 800; letter-spacing: .04em; } .brand-mark { display: grid; grid-template-columns: repeat(2, 8px); gap: 3px; rotate: -8deg; } .brand-mark i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: inset -1px -1px 0 rgba(0,0,0,.15); } .brand-mark i:nth-child(2) { background: var(--orange); } .brand-mark i:nth-child(3) { background: var(--lime); } .top-note { color: var(--muted); font-size: 13px; letter-spacing: .08em; } .hero { max-width: 1560px; margin: 0 auto; padding: clamp(42px, 7vw, 92px) clamp(20px, 5vw, 80px) clamp(38px, 6vw, 72px); display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; } .eyebrow, .section-kicker { margin: 0 0 14px; font-size: 11px; color: var(--green); font-weight: 800; letter-spacing: .2em; } .hero h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(40px, 6.3vw, 88px); line-height: 1.04; letter-spacing: -.055em; font-weight: 500; } .hero h1 em { color: var(--green); font-style: normal; } .hero-copy { max-width: 720px; margin: 28px 0 0; color: var(--muted); font-size: clamp(15px, 1.5vw, 18px); line-height: 1.8; } .hero-badge { flex: 0 0 auto; width: 150px; height: 150px; border: 1px solid var(--ink); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; rotate: 6deg; background: var(--lime); box-shadow: 6px 6px 0 var(--ink); } .hero-badge strong { font-family: Georgia, serif; font-size: 26px; } .hero-badge span { margin-top: 5px; font-size: 11px; } .workspace { max-width: 1760px; margin: 0 auto 80px; display: grid; grid-template-columns: minmax(240px, 300px) minmax(500px, 1fr) minmax(260px, 330px); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--card); } .control-panel, .color-panel { min-width: 0; padding: 28px; } .control-panel { border-right: 1px solid var(--line); } .color-panel { border-left: 1px solid var(--line); display: flex; flex-direction: column; max-height: 790px; } .panel-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; } .panel-heading > span { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font: 700 11px Georgia, serif; } .panel-heading h2, .pattern-toolbar h2 { margin: 0; font-size: 18px; } .panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; } .upload-card { width: 100%; min-height: 100px; max-height: 260px; display: block; position: relative; overflow: hidden; border: 1px dashed #a5a59e; background: #ebe7dd; } .upload-card canvas { width: 100%; height: 100%; display: block; pointer-events: none; } .upload-card .file-input { display: none; } .crop-preview { cursor: default; } .upload-overlay { position: absolute; z-index: 3; right: 10px; bottom: 10px; padding: 7px 10px; border: 0; color: white; background: rgba(22, 75, 57, .9); cursor: pointer; font-size: 12px; } .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 9px 0 24px; color: var(--muted); font-size: 11px; } .crop-select-button { width: 100%; margin-top: 0; padding: 10px; border: 1px solid var(--ink); background: var(--lime); cursor: pointer; font-size: 12px; font-weight: 700; } .reset-crop { width: 100%; margin: 7px 0 20px; padding: 7px; border: 1px solid var(--line); background: white; cursor: pointer; color: var(--muted); font-size: 11px; } .field-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; } .field-row label, .field { display: flex; flex-direction: column; gap: 8px; } .field-row label span, .field > span { color: var(--muted); font-size: 12px; } .field-row input, .field select { width: 100%; height: 43px; border: 1px solid var(--line); border-radius: 0; background: white; padding: 0 10px; outline: none; } .field-row input:focus, .field select:focus, .search-box:focus-within { border-color: var(--green); box-shadow: 0 0 0 2px rgba(31,107,77,.11); } .times { padding-bottom: 11px; color: var(--muted); } .field { margin-top: 22px; } .field > span { display: flex; justify-content: space-between; } .field b { color: var(--green); } input[type="range"] { accent-color: var(--green); } .primary-button { width: 100%; min-height: 48px; margin-top: 24px; border: 1px solid var(--ink); background: var(--green); color: white; cursor: pointer; font-weight: 700; box-shadow: 3px 3px 0 var(--ink); transition: transform .15s, box-shadow .15s; } .primary-button:hover { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); } .privacy-note, .palette-note { margin: 16px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; } .pattern-panel { min-width: 0; display: flex; flex-direction: column; background-color: #f1eee6; background-image: radial-gradient(#cbc6ba 0.7px, transparent .7px); background-size: 12px 12px; } .pattern-toolbar { min-height: 90px; padding: 22px 28px; display: flex; justify-content: space-between; align-items: center; gap: 24px; background: var(--card); border-bottom: 1px solid var(--line); } .pattern-toolbar .section-kicker { margin-bottom: 5px; } .zoom-control { display: flex; align-items: center; gap: 7px; } .zoom-control button { width: 36px; height: 36px; border: 1px solid var(--line); background: white; cursor: pointer; font-size: 20px; } .zoom-control input { width: 95px; } .zoom-control output { width: 38px; color: var(--muted); font-size: 11px; text-align: right; } .canvas-viewport { position: relative; width: 100%; aspect-ratio: 1 / 1; height: auto; min-height: 0; flex: 0 0 auto; align-self: stretch; contain: size layout; overflow: hidden; } .canvas-stage { position: absolute; inset: 0; width: auto; height: auto; overflow: scroll; display: block; padding: 12px; cursor: grab; touch-action: none; overscroll-behavior: contain; user-select: none; scrollbar-gutter: stable; } .canvas-stage.is-dragging { cursor: grabbing; } .canvas-wrap { width: max-content; line-height: 0; position: relative; margin: auto; border: 1px solid var(--ink); background-color: #f7f5ef; background-image: linear-gradient(45deg, #dedbd3 25%, transparent 25%), linear-gradient(-45deg, #dedbd3 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #dedbd3 75%), linear-gradient(-45deg, transparent 75%, #dedbd3 75%); background-position: 0 0, 0 5px, 5px -5px, -5px 0; background-size: 10px 10px; } .canvas-wrap canvas { cursor: inherit; image-rendering: pixelated; } .pixel-tooltip { position: absolute; z-index: 5; width: max-content; max-width: 260px; padding: 9px 11px; display: grid; grid-template-columns: 14px auto; align-items: center; gap: 3px 8px; color: white; background: rgba(22, 30, 27, .94); border: 1px solid rgba(255,255,255,.2); box-shadow: 4px 4px 0 rgba(0,0,0,.2); border-radius: 3px; line-height: 1.35; pointer-events: none; } .tooltip-swatch { width: 14px; height: 14px; grid-row: 1 / 3; border-radius: 50%; border: 1px solid rgba(255,255,255,.6); } .pixel-tooltip strong { font-size: 11px; } .pixel-tooltip small { color: #dce4df; font-size: 10px; } .pattern-footer { min-height: 62px; padding: 12px 22px; background: var(--card); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; } .status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(31,107,77,.14); } .view-options { margin-left: auto; display: flex; align-items: center; gap: 14px; } .view-options label { display: flex; align-items: center; gap: 4px; white-space: nowrap; } .view-options button { padding: 8px 11px; border: 1px solid var(--ink); background: var(--lime); cursor: pointer; font-weight: 700; } .view-options .save-button { background: white; } .pattern-legend { padding: 18px 22px 22px; background: var(--card); border-top: 1px solid var(--line); } .legend-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; } .legend-heading strong { font-size: 13px; } .legend-heading span { color: var(--muted); font-size: 10px; } .legend-list { display: flex; flex-wrap: wrap; gap: 7px; } .legend-list button { min-height: 34px; padding: 5px 8px 5px 6px; display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: white; cursor: pointer; font-size: 10px; } .legend-list button.active { border-color: var(--ink); background: #f0f6df; box-shadow: 2px 2px 0 var(--ink); } .legend-list i { width: 20px; height: 20px; border-radius: 3px; border: 1px solid rgba(32,39,36,.25); } .legend-list span { color: var(--muted); } .legend-list b { padding-left: 5px; border-left: 1px solid var(--line); } .search-box { height: 43px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); background: white; } .search-box span { font-size: 22px; } .search-box input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; font-size: 12px; } .selection-tools { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); } .switch-row { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 11px; } .switch-row input { position: absolute; opacity: 0; } .switch { width: 30px; height: 17px; border-radius: 12px; background: #bbb; position: relative; transition: .2s; } .switch::after { content: ""; position: absolute; width: 13px; height: 13px; left: 2px; top: 2px; border-radius: 50%; background: white; transition: .2s; } .switch-row input:checked + .switch { background: var(--green); } .switch-row input:checked + .switch::after { translate: 13px 0; } .selection-tools button { border: 0; background: transparent; color: var(--green); cursor: pointer; font-size: 11px; } .color-list { min-height: 220px; overflow-y: auto; margin: 8px -8px 0; padding: 0 8px; scrollbar-width: thin; } .color-item { width: 100%; min-height: 58px; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 8px; border: 1px solid transparent; border-bottom-color: #ebe7dd; background: transparent; cursor: pointer; text-align: left; } .color-item:hover { background: #f7f4ed; } .color-item.active { border-color: var(--ink); background: #f0f6df; box-shadow: 2px 2px 0 var(--ink); } .swatch { width: 30px; height: 30px; border: 1px solid rgba(32,39,36,.28); border-radius: 50%; box-shadow: inset -2px -2px 0 rgba(0,0,0,.08); } .color-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; } .color-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; } .color-meta small { color: var(--muted); font: 9px ui-monospace, monospace; } .color-item > b { font: 700 16px Georgia, serif; text-align: right; } .color-item > b small { margin-left: 2px; color: var(--muted); font: 9px sans-serif; } .history-section { max-width: 1560px; margin: 0 auto 90px; padding: 0 clamp(20px, 5vw, 80px); } .history-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--ink); } .history-heading h2 { margin: 0; font: 500 clamp(30px, 4vw, 50px) Georgia, "Songti SC", serif; } .history-heading p:not(.section-kicker) { margin: 8px 0 0; color: var(--muted); font-size: 12px; } .history-heading .search-box { width: min(330px, 100%); } .history-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-top: 18px; } .history-card { min-width: 0; padding: 16px; display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 12px; border: 1px solid var(--line); background: var(--card); } .history-swatches { width: 58px; height: 58px; display: flex; overflow: hidden; border: 1px solid var(--ink); } .history-swatches i { min-width: 3px; } .history-card h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 3px 0 7px; font-size: 14px; } .history-card p { margin: 0; color: var(--muted); font-size: 10px; } .history-actions { grid-column: 1 / -1; display: flex; gap: 7px; justify-content: flex-end; } .history-actions button { min-height: 34px; padding: 0 14px; border: 1px solid var(--ink); background: white; cursor: pointer; font-size: 11px; } .history-actions button:first-child { background: var(--lime); font-weight: 700; } .history-empty { margin-top: 18px; padding: 44px 20px; color: var(--muted); text-align: center; border: 1px dashed var(--line); background: rgba(255,253,248,.5); font-size: 13px; } .crop-dialog-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(17,24,21,.76); backdrop-filter: blur(5px); } .crop-dialog { width: min(1280px, 96vw); max-height: 94vh; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--ink); background: var(--card); box-shadow: 10px 10px 0 rgba(0,0,0,.32); } .crop-dialog-header { flex: 0 0 auto; padding: 18px 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); } .crop-dialog-header .section-kicker { margin-bottom: 5px; } .crop-dialog-header h2 { margin: 0; font-size: 22px; } .crop-dialog-header p:not(.section-kicker) { margin: 6px 0 0; color: var(--muted); font-size: 12px; } .crop-dialog-header > button { width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid var(--line); background: white; cursor: pointer; font-size: 25px; line-height: 1; } .crop-dialog-scroll { min-height: 0; flex: 1 1 auto; overflow: auto; padding: 18px; display: grid; place-items: center; background-color: #e9e5db; background-image: radial-gradient(#c8c3b8 .7px, transparent .7px); background-size: 12px 12px; } .crop-dialog-stage { position: relative; width: max-content; max-width: 100%; line-height: 0; cursor: crosshair; touch-action: none; user-select: none; box-shadow: 0 0 0 1px var(--ink); } .crop-dialog-stage canvas { display: block; max-width: 100%; height: auto; pointer-events: none; } .crop-selection-mask { position: absolute; z-index: 1; background: rgba(10,15,13,.55); pointer-events: none; } .crop-selection-top { inset: 0 0 auto; } .crop-selection-left { left: 0; } .crop-selection-bottom { inset: auto 0 0; bottom: 0; } .crop-selection-box { position: absolute; z-index: 2; border: 2px solid white; outline: 1px solid rgba(0,0,0,.75); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); pointer-events: none; } .crop-selection-box::before, .crop-selection-box::after { content: ""; position: absolute; background: rgba(255,255,255,.62); } .crop-selection-box::before { left: 33.333%; top: 0; bottom: 0; width: 1px; box-shadow: calc(33.333% * 1) 0 0 rgba(255,255,255,.62); } .crop-selection-box::after { left: 0; right: 0; top: 33.333%; height: 1px; box-shadow: 0 calc(33.333% * 1) 0 rgba(255,255,255,.62); } .crop-dialog-actions { flex: 0 0 auto; min-height: 66px; padding: 12px 20px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); } .crop-dialog-actions span { margin-right: auto; color: var(--muted); font-size: 11px; } .crop-dialog-actions button { min-height: 40px; padding: 0 16px; border: 1px solid var(--ink); background: white; cursor: pointer; font-size: 12px; } .crop-dialog-actions .confirm { background: var(--green); color: white; font-weight: 700; } .crop-dialog-actions .confirm:disabled { opacity: .42; cursor: not-allowed; } @media (max-width: 1160px) { .workspace { grid-template-columns: 260px minmax(500px, 1fr); } .color-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--ink); max-height: none; } .color-list { display: grid; grid-template-columns: repeat(3, 1fr); max-height: 300px; gap: 0 12px; } .history-grid { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 760px) { .topbar { height: 60px; padding: 0 18px; } .top-note { display: none; } .hero { padding: 38px 20px 44px; align-items: flex-start; } .hero h1 { font-size: clamp(39px, 12vw, 58px); letter-spacing: -.06em; } .hero-copy { margin-top: 20px; } .hero-badge { display: none; } .workspace { margin-bottom: 0; grid-template-columns: 1fr; border-bottom: 0; } .control-panel { border-right: 0; border-bottom: 1px solid var(--ink); padding: 24px 20px; } .upload-card { height: auto; min-height: 160px; } .pattern-panel { min-height: 620px; } .pattern-toolbar { align-items: flex-start; flex-direction: column; padding: 20px; } .zoom-control { width: 100%; } .zoom-control input { flex: 1; } .canvas-viewport { width: 100%; height: auto; min-height: 0; aspect-ratio: 1 / 1; flex-basis: auto; } .canvas-stage { display: block; padding: 10px; } .canvas-wrap { margin: auto; } .pattern-footer { align-items: flex-start; flex-wrap: wrap; padding: 14px 18px; } .view-options { width: 100%; margin: 5px 0 0; justify-content: space-between; } .view-options button { min-height: 40px; } .color-panel { grid-column: auto; padding: 24px 20px 38px; } .color-list { display: block; max-height: 430px; } .legend-heading, .history-heading { align-items: stretch; flex-direction: column; } .legend-list { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 7px; } .legend-list button { flex: 0 0 auto; } .history-section { margin: 52px auto; } .history-heading .search-box { width: 100%; } .history-grid { grid-template-columns: 1fr; } .crop-dialog-backdrop { padding: 0; } .crop-dialog { width: 100vw; max-height: 100vh; height: 100vh; border: 0; box-shadow: none; } .crop-dialog-header { padding: 14px 16px; } .crop-dialog-header h2 { font-size: 18px; } .crop-dialog-scroll { padding: 10px; } .crop-dialog-actions { padding: 10px 12px; flex-wrap: wrap; } .crop-dialog-actions span { width: 100%; order: -1; } .crop-dialog-actions button { flex: 1; padding: 0 10px; } input, select, button { font-size: 16px; } .search-box input, .color-item, .selection-tools button { font-size: 12px; } } @media (max-width: 370px) { .view-options { gap: 6px; } .view-options label { font-size: 10px; } .canvas-stage { padding: 8px; } } @media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }