@charset "UTF-8";

/* 钧男说参考：暖白纸感、黑字、品牌蓝；珊瑚色用于提醒。 */
:root {
  --paper: #f7f4ee;
  --white: #fffefa;
  --ink: #171b20;
  --muted: #60656f;
  --line: #dfdfda;
  --blue: #2457e8;
  --blue-dark: #1944be;
  --blue-soft: #edf2ff;
  --coral: #f05a3c;
  --warning: #9e3d2b;
  --radius: 12px;
  font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background-image: radial-gradient(#b3a68b16 .7px, transparent .7px); background-size: 6px 6px; }
button, input, textarea { font: inherit; }
button, a, input, textarea { outline-offset: 5px; }
:focus-visible { outline: 2px solid var(--blue); }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.topbar { min-height: 96px; max-width: 1360px; margin: auto; padding: 22px 40px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 800; letter-spacing: 2px; }
.brand-mark { width: 44px; height: 46px; display: grid; place-items: center; background: var(--blue); border-radius: 9px 9px 9px 2px; color: white; font-size: 25px; box-shadow: 3px 3px 0 #2457e81a; }
.brand small { display: block; color: var(--muted); font: 9px/1.5 "Courier New", monospace; letter-spacing: 1.6px; margin-top: 2px; }
.header-note { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.button { border: 1px solid var(--line); border-radius: 8px; padding: 12px 18px; background: var(--white); display: inline-flex; align-items: center; justify-content: center; gap: 14px; color: var(--ink); transition: background .18s, border-color .18s, box-shadow .18s; }
.button:hover { border-color: #b8c7f5; background: var(--blue-soft); }
.quiet { font-size: 12px; }
#account { border-color: var(--ink); background: transparent; font-weight: 600; }
#account:hover { background: var(--ink); color: var(--white); }
main { max-width: 1280px; padding: 0 40px; margin: auto; }
.intro { padding: 48px 0 34px; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.eyebrow { display: flex; align-items: center; gap: 9px; font: 11px/1.6 "Courier New", monospace; letter-spacing: 1.6px; color: var(--blue); margin: 0 0 17px; }
.eyebrow-line { width: 24px; height: 3px; background: var(--blue); border-radius: 2px; }
h1 { font-size: clamp(36px, 4.2vw, 58px); font-weight: 900; letter-spacing: -1.8px; line-height: 1.25; margin: 0; }
h1 em { display: inline-block; font-style: normal; color: var(--blue); }
h1 em::after { content: ""; height: 4px; width: 57px; background: var(--blue); display: block; margin-top: 12px; }
.intro-note { max-width: 270px; font-size: 13px; color: var(--muted); line-height: 1.95; margin: 0 0 8px; }
.service { border: 1px solid #eddfd5; border-radius: 8px; display: flex; align-items: center; gap: 10px; font-size: 12px; padding: 12px 16px; background: #fff7f0; color: #754d38; margin-bottom: 22px; line-height: 1.7; }
.status-dot { width: 7px; height: 7px; flex: none; background: var(--coral); border-radius: 50%; }
.service.ready { border-color: #c9d6ff; color: var(--blue-dark); background: var(--blue-soft); }
.ready .status-dot { background: var(--blue); }
.workspace { display: grid; grid-template-columns: minmax(340px, .88fr) minmax(400px, 1.12fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); box-shadow: 0 8px 30px #171b2004; }
.compose { padding: 30px; border-right: 1px solid var(--line); }
.section-label { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); letter-spacing: .7px; }
.section-label > span:first-child { color: var(--blue); font-weight: 700; }
.mono { font: 10px/1.5 "Courier New", monospace; letter-spacing: .5px; }
h2 { font-size: 21px; line-height: 1.6; font-weight: 750; margin: 20px 0; }
.compose h2 { margin: 22px 0 20px; }
.template-list { display: grid; gap: 11px; }
.template-card { display: block; position: relative; }
.template-card input { position: absolute; opacity: 0; }
.template-content { position: relative; display: block; padding: 17px 17px 17px 41px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--white); transition: border-color .18s, background .18s; }
.template-content::before { content: ""; position: absolute; left: 16px; top: 21px; width: 13px; height: 13px; border: 1.5px solid #a5a9b2; border-radius: 50%; }
.template-content strong { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; line-height: 1.65; }
.template-content strong > span { white-space: nowrap; color: var(--blue); font-family: "Courier New", monospace; font-size: 13px; }
.template-content small { display: block; font-size: 11px; line-height: 1.8; color: var(--muted); margin-top: 7px; }
.template-card:hover .template-content { border-color: #a6baf4; }
.template-card input:checked + .template-content { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 .5px var(--blue); }
.template-card input:checked + .template-content::before { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 3px var(--blue-soft); }
.template-card input:focus-visible + .template-content { outline: 2px solid var(--blue); outline-offset: 3px; }
#template-note { margin-bottom: 24px; }
.template-field { display: block; font-size: 12px; margin: 18px 0; }
.template-field input { display: block; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 6px; margin-top: 8px; background: white; color: var(--ink); }
.upload-label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 12px; }
.upload-label small { display: block; color: var(--muted); font-size: 10px; font-weight: 400; margin-top: 6px; }
#source-section { margin-bottom: 24px; padding: 18px; border: 1px dashed #a6baf4; border-radius: 8px; background: #f5f7ff; }
#source-file { width: 100%; min-width: 0; font-size: 11px; color: var(--muted); }
#source-file::file-selector-button { cursor: pointer; border: 1px solid #becdf9; color: var(--blue-dark); background: white; border-radius: 5px; padding: 9px 11px; margin-right: 9px; font: inherit; font-weight: 600; }
#source-file::file-selector-button:hover { background: var(--blue-soft); }
#source-preview { display: block; max-width: 100%; max-height: 220px; object-fit: contain; margin: 15px 0; border-radius: 6px; }
.saved-sources { display: flex; gap: 8px; flex-wrap: wrap; }
.saved-sources:not(:empty) { margin-top: 12px; }
.saved-source { position: relative; display: flex; flex-direction: column; gap: 4px; }
.saved-source button { border: 1px solid var(--line); border-radius: 4px; background: white; font-size: 10px; color: var(--muted); padding: 4px; }
.saved-source img { display: block; width: 55px; height: 45px; object-fit: cover; }
.saved-source button.selected { border-color: var(--blue); background: var(--blue-soft); }
textarea { display: block; width: 100%; min-height: 170px; resize: vertical; background: #faf9f6; border: 1px solid var(--line); padding: 16px; line-height: 1.9; font-size: 13px; border-radius: 8px; color: var(--ink); margin-bottom: 22px; }
textarea::placeholder { color: #707681; }
textarea:focus, input:focus { border-color: var(--blue); }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
legend { font-size: 11px; margin-bottom: 12px; color: var(--muted); }
.ratios { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.ratios label { position: relative; }
.ratios input { position: absolute; opacity: 0; }
.ratios label > span { height: 80px; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 6px; font: 11px monospace; gap: 5px; cursor: pointer; }
.ratios small { font: 10px sans-serif; color: var(--muted); }
.ratios i { height: 17px; width: 17px; border: 1px solid #707a94; display: block; border-radius: 1px; }
.ratios i.wide { width: 25px; height: 14px; }
.ratios i.tall { width: 12px; height: 20px; }
.ratios i.landscape { width: 22px; height: 16px; }
.ratios i.portrait { width: 15px; height: 20px; }
.ratios input:checked + span { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.ratios input:checked + span i { border-color: var(--blue); }
.ratios input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.submit-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); margin: 24px 0 12px; }
#price-label { color: var(--ink); font-weight: 600; }
.primary { background: var(--blue); border-color: var(--blue); color: white; width: 100%; min-height: 54px; justify-content: space-between; padding: 16px 20px; font-size: 14px; font-weight: 600; }
.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); box-shadow: 0 3px 12px #2457e822; }
.primary:disabled, .primary:disabled:hover { background: #e7ebf7; border-color: #d7def2; color: #616f99; box-shadow: none; }
.button:disabled:not(.primary) { opacity: .6; }
.small-note { font-size: 11px; line-height: 1.85; color: var(--muted); margin: 12px 0 0; }
.message { font-size: 12px; color: var(--warning); line-height: 1.8; margin: 10px 0 0; min-height: 20px; }
.result { padding: 30px 28px 12px; display: flex; flex-direction: column; min-width: 0; background: #fcfbf7; }
.canvas { position: relative; margin-top: 24px; min-height: 460px; flex: 1; display: flex; align-items: center; justify-content: center; background-color: #f5f6f7; background-image: linear-gradient(#2457e80a 1px, transparent 1px), linear-gradient(90deg, #2457e80a 1px, transparent 1px); background-size: 24px 24px; border: 1px solid #dde3ee; border-radius: 8px; overflow: hidden; }
.canvas::before, .canvas::after { content: ""; position: absolute; width: 8px; height: 8px; background: var(--blue); opacity: .6; pointer-events: none; }
.canvas::before { left: 16px; top: 16px; }
.canvas::after { right: 16px; bottom: 16px; opacity: .2; }
.canvas img { display: block; max-width: 100%; max-height: 560px; object-fit: contain; position: relative; z-index: 1; }
.empty { text-align: center; padding: 40px 20px; max-width: 100%; }
.empty h3 { font-size: 22px; line-height: 1.65; font-weight: 750; margin: 32px 0 11px; letter-spacing: -.5px; }
.empty p { font-size: 12px; color: var(--muted); line-height: 1.95; max-width: 330px; margin: 0 auto; overflow-wrap: anywhere; }
.frame-art { height: 118px; width: 148px; position: relative; margin: 0 auto; }
.frame-art::before { content: "+"; position: absolute; right: -5px; top: 0; font: 28px/1 monospace; color: var(--coral); transform: rotate(12deg); }
.frame-art::after { content: ""; position: absolute; left: -10px; bottom: 8px; width: 8px; height: 8px; background: #9cb9ff; box-shadow: 11px -11px 0 #cedaff; }
.frame-art span { display: block; width: 77px; height: 96px; border: 1.5px solid #82a1f8; border-radius: 4px; position: absolute; left: 34px; top: 11px; background: #f6f8ff; }
.frame-art span:nth-child(1) { transform: rotate(-20deg); opacity: .6; }
.frame-art span:nth-child(2) { transform: rotate(14deg); opacity: .8; }
.frame-art span:nth-child(3) { transform: rotate(-4deg); border: 7px solid white; outline: 1px solid #9cb5f8; background: linear-gradient(142deg, transparent 57%, #96b2ff 57%, #96b2ff 74%, #2457e8 74%), #e6edff; box-shadow: 2px 4px 8px #2457e80d; }
.canvas.busy .frame-art { animation: breathe 2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-6px); } }
.result-footer { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); }
#result-caption { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%; }
.orders { margin-top: 36px; }
.orders h2, .history-heading h2 { font-size: 23px; font-weight: 750; }
.orders h2::before { content: ""; display: inline-block; width: 4px; height: 18px; background: var(--blue); margin-right: 11px; border-radius: 2px; vertical-align: -1px; }
.order-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 16px 0; font-size: 12px; }
.order-row small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; overflow-wrap: anywhere; }
.order-state { font-size: 11px; color: var(--blue-dark); }
.history { padding: 38px 0 50px; }
.history-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; }
.history-heading .eyebrow { font-size: 9px; margin-bottom: 6px; }
.history-heading h2 { margin: 0; }
.history-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.history-empty { font-size: 12px; color: var(--muted); padding: 24px 0; grid-column: 1/-1; }
.history-card { border: 1px solid var(--line); background: var(--white); text-align: left; border-radius: 8px; padding: 0; overflow: hidden; color: var(--ink); }
.history-card img, .job-cover { width: 100%; height: 160px; object-fit: cover; background: var(--blue-soft); display: block; }
.job-cover { display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.history-card .job-info { padding: 14px; }
.history-card p { font-size: 12px; margin: 0 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-meta { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); gap: 6px; }
.history-card:hover { border-color: var(--blue); }
footer { border-top: 1px solid var(--line); padding: 25px 0 34px; display: flex; justify-content: space-between; gap: 15px; font-size: 10px; letter-spacing: .5px; color: var(--muted); }
footer > span:first-child { color: var(--ink); font-weight: 600; }
.footer-dot { margin: 0 8px; color: var(--blue); }
dialog { border: 1px solid var(--line); border-radius: 12px; width: min(440px, calc(100% - 32px)); padding: 36px; background: var(--white); color: var(--ink); box-shadow: 0 20px 90px #171b2026; }
dialog::backdrop { background: #171b2066; backdrop-filter: blur(3px); }
dialog form { position: relative; }
dialog p:not(.eyebrow) { font-size: 12px; line-height: 1.9; color: var(--muted); }
dialog h2 { font-size: 25px; font-weight: 750; margin: 10px 0; }
dialog label { display: block; font-size: 12px; margin: 22px 0 10px; }
dialog input { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); padding: 13px; margin-bottom: 16px; color: var(--ink); }
.close { position: absolute; right: -15px; top: -20px; background: none; border: 0; font-size: 26px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1000px) {
  .topbar { padding: 20px 28px; }
  main { padding: 0 28px; }
  .intro { padding-top: 36px; }
  .workspace { grid-template-columns: minmax(310px, 1fr) minmax(310px, 1fr); }
  .compose, .result { padding: 24px 20px; }
  .canvas { min-height: 450px; }
  .empty h3 { font-size: 19px; }
  .template-content { padding-left: 35px; padding-right: 12px; }
  .template-content::before { left: 12px; }
  .template-content strong { font-size: 12px; }
  .history-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar { min-height: 80px; padding: 16px 20px; gap: 14px; }
  .header-note { display: none; }
  .brand { font-size: 21px; }
  .brand-mark { height: 40px; width: 39px; font-size: 22px; }
  #account { padding: 10px 12px; font-size: 11px; }
  main { padding: 0 18px; }
  .intro { padding: 32px 0 24px; display: block; }
  h1 { font-size: clamp(36px, 8vw, 50px); letter-spacing: -1px; }
  h1 em::after { height: 3px; margin-top: 10px; width: 42px; }
  .intro-note { max-width: 100%; margin-top: 22px; margin-bottom: 0; font-size: 12px; }
  .eyebrow { font-size: 10px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .compose { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 20px; }
  .compose h2 { font-size: 21px; }
  .result { padding: 24px 20px 8px; }
  .canvas { min-height: 340px; }
  .empty h3 { font-size: 20px; }
  .template-content { padding: 16px 15px 16px 40px; }
  .template-content::before { left: 15px; top: 20px; }
  .template-content strong { font-size: 13px; }
  .history-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-card img, .job-cover { height: 135px; }
  .history-heading h2, .orders h2 { font-size: 22px; }
  footer { flex-direction: column; line-height: 1.7; }
  .history-card .job-info { padding: 10px; }
  .job-meta { flex-wrap: wrap; }
  .service { font-size: 11px; margin-bottom: 18px; }
  .history { padding-top: 30px; }
  .submit-meta { font-size: 10px; line-height: 1.7; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
