:root {
  --bg: #f6f7f9;
  --surface: #fff;
  --ink: #252a29;
  --muted: #737b7d;
  --line: #e3e7e8;
  --accent: #d75b40;
  --accent-hover: #b74831;
  --mint: #e8f2ed;
  --green: #357a5b;
  --radius: 8px;
}
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button { border: 0; background: none; }
button, a { touch-action: manipulation; }
input, select, textarea { color: var(--ink); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #73a48a; outline-offset: 2px; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
button:disabled { opacity: .45; cursor: default; }
[hidden] { display: none !important; }
.lucide { width: 19px; height: 19px; stroke-width: 1.7; flex-shrink: 0; pointer-events: none; }
.skip-link { position: fixed; z-index: 100; top: -80px; left: 20px; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip-link:focus { top: 12px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1440px; margin: 0 auto; padding: 0 48px; min-height: 78px; display: flex; align-items: center; gap: 55px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 27px; font-weight: 760; line-height: 1; white-space: nowrap; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; background: var(--ink); color: #fff; border-radius: 7px; }
.brand-mark .lucide { width: 24px; height: 24px; }
.brand-dot, .heading-dot { color: var(--accent); }
.main-nav { display: flex; gap: 30px; align-self: stretch; }
.main-nav a { display: flex; align-items: center; gap: 8px; font-weight: 540; color: var(--muted); position: relative; white-space: nowrap; min-height: 48px; }
.main-nav a[aria-current="page"] { color: var(--ink); }
.main-nav a[aria-current="page"]::after { content: ""; height: 3px; position: absolute; bottom: 0; left: 0; right: 0; background: var(--accent); }
.main-nav .lucide { width: 17px; height: 17px; }
.nav-count { font-size: 11px; font-variant-numeric: tabular-nums; min-width: 19px; text-align: center; padding: 0 4px; background: #eff1f1; color: var(--muted); border-radius: 4px; }
.header-label { margin-left: auto; font-size: 10px; color: #838c8d; white-space: nowrap; }
.page { max-width: 1440px; margin: 0 auto; padding: 42px 48px 64px; min-height: calc(100vh - 159px); }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 29px; }
.eyebrow { margin: 0 0 6px; font-size: 10px; font-weight: 600; color: var(--muted); line-height: 1.5; }
h1 { margin: 0; font-size: 32px; line-height: 1.4; font-weight: 700; overflow-wrap: anywhere; }
.heading-dot { margin-left: 3px; }
.primary-button, .secondary-button { min-height: 42px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 17px; font-weight: 550; font-size: 13px; white-space: nowrap; }
.primary-button { background: var(--accent); color: #fff; }
.primary-button:hover { background: var(--accent-hover); }
.secondary-button { border: 1px solid var(--line); background: var(--surface); }
.secondary-button:hover { background: #f0f3f2; border-color: #c4ceca; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; min-width: 38px; padding: 0; border-radius: 6px; position: relative; color: var(--muted); }
.icon-button:hover { color: var(--ink); background: #eef1f0; }
[data-tooltip] { position: relative; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; z-index: 15; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 5px 8px; border-radius: 4px; font: 11px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; white-space: nowrap; pointer-events: none; opacity: 0; }
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { opacity: 1; }
.card-tools [data-tooltip]::after { left: auto; right: 0; transform: none; }
.search-row { display: flex; gap: 14px; margin-bottom: 22px; }
.search-box { flex: 1; display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; height: 48px; padding: 0 14px; gap: 10px; }
.search-box > .lucide { color: #929b9c; }
.search-box:focus-within { border-color: #83a994; box-shadow: 0 0 0 2px #e0eee6; }
.search-box input { width: 100%; min-width: 0; background: transparent; border: 0; padding: 8px 0; outline: none; }
.search-box input:focus { outline: none; }
.search-box input::-webkit-search-cancel-button { display: none; }
input::placeholder, textarea::placeholder { color: #9da4a5; }
.search-box .icon-button { width: 30px; height: 30px; min-width: 30px; }
.sort-control { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0 12px; min-width: 150px; }
.sort-control .lucide { color: var(--muted); width: 17px; height: 17px; }
.sort-control select { border: none; background: transparent; padding: 8px 3px; min-width: 0; width: 100%; font-size: 12px; }
.category-tabs { display: flex; gap: 7px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 21px; }
.category-tabs button { display: flex; align-items: center; gap: 7px; border-radius: 5px; min-height: 35px; padding: 6px 12px; color: #687172; font-size: 12px; white-space: nowrap; }
.category-tabs .lucide { width: 15px; height: 15px; }
.category-tabs button:hover { background: #eaf0ed; color: var(--ink); }
.category-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 20px 0 17px; font-size: 11px; color: var(--muted); }
.results-bar p { margin: 0; }
#result-count { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.result-separator { color: #b8bfc0; padding: 0 9px; }
.reference-label { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; white-space: nowrap; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.prompt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 22px; }
.prompt-card { min-width: 0; background: var(--surface); border: 1px solid #e6e9e9; border-radius: var(--radius); overflow: visible; transition: border-color .18s, box-shadow .18s, transform .18s; }
.prompt-card:hover { border-color: #c9d4cf; box-shadow: 0 8px 20px #26352f0b; transform: translateY(-3px); }
.card-image-button { display: block; position: relative; width: 100%; aspect-ratio: 1; padding: 0; overflow: hidden; border-radius: 7px 7px 0 0; background: #ecefee; cursor: zoom-in; }
.card-image-button img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card-image-button:hover img { transform: scale(1.035); }
.card-reference { position: absolute; top: 12px; left: 12px; padding: 3px 6px; background: #ffffffed; color: #56615d; font-size: 9px; line-height: 1.6; border-radius: 3px; }
.card-visual-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 25px; color: #98a29d; font-size: 13px; background: #edf1ee; }
.card-visual-fallback .lucide { width: 40px; height: 40px; }
.draft-visual { background: #e7f0eb; }
.draft-visual .card-visual-fallback { background: #e7f0eb; color: #658773; }
.card-body { padding: 15px 16px 0; }
.card-category { font-size: 10px; color: var(--green); }
.card-title { display: block; text-align: left; padding: 3px 0 0; font-size: 15px; font-weight: 650; line-height: 1.6; overflow-wrap: anywhere; width: 100%; }
.card-title:hover { color: var(--accent); }
.card-description { margin: 5px 0 13px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-bottom { border-top: 1px solid #f0f2f2; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px 6px 16px; min-height: 49px; }
.card-id { color: #9aa4a0; font-size: 10px; font-variant-numeric: tabular-nums; }
.card-tools { display: flex; gap: 1px; }
.card-tools .icon-button { width: 33px; min-width: 33px; height: 33px; }
.card-tools .lucide { width: 16px; height: 16px; }
.icon-button.is-saved { color: var(--accent); }
.icon-button.is-saved .lucide { fill: #d75b4015; }
.empty-state { padding: 95px 20px; text-align: center; }
.empty-state > .lucide { width: 38px; height: 38px; color: #9eaca5; }
.empty-state h2 { font-size: 18px; font-weight: 550; margin: 16px 0 24px; }
.site-footer { border-top: 1px solid var(--line); padding: 25px 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #8d9795; font-size: 10px; }
.site-footer > span:first-child { font-size: 15px; font-weight: 700; color: #616c68; }
.studio-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 54px; align-items: start; }
.studio-fields { min-width: 0; }
.field-section { border-top: 1px solid var(--line); padding: 23px 0 26px; }
.section-label { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.section-label span { font-size: 11px; color: #929e97; }
.section-label h2 { font-size: 15px; font-weight: 600; margin: 0; }
.studio-fields label, .save-draft label { display: block; margin: 15px 0 7px; font-size: 12px; color: #66736c; }
.required { color: var(--accent); }
.studio-fields input, .studio-fields select, .studio-fields textarea, .save-draft input { width: 100%; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); padding: 10px 12px; font-size: 13px; min-width: 0; }
.studio-fields select { height: 43px; }
.studio-fields textarea { min-height: 80px; }
.field-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 15px; }
.palette-options { display: flex; flex-wrap: wrap; gap: 10px; }
.palette-option { display: flex; gap: 4px; border: 1px solid transparent; padding: 6px; border-radius: 5px; min-height: 36px; align-items: center; }
.palette-option[aria-pressed="true"] { border-color: var(--green); background: #eaf3ed; }
.swatch { display: block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid #00000012; }
.ratio-options { display: flex; flex-wrap: wrap; gap: 8px; }
.ratio-options button { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); min-width: 65px; min-height: 37px; padding: 6px 9px; border-radius: 5px; font-size: 11px; justify-content: center; }
.ratio-options button[aria-pressed="true"] { color: var(--green); border-color: #77a28b; background: var(--mint); }
.ratio-outline { display: block; height: 14px; max-width: 22px; border: 1px solid currentColor; }
.studio-output { position: sticky; top: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 28px; min-width: 0; }
.output-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; }
.output-heading h2 { font-size: 20px; line-height: 1.4; margin: 0; }
.output-heading > span { font-size: 10px; color: #9ba49f; white-space: nowrap; }
#studio-result { width: 100%; border: 1px solid #e8ebea; background: #f8faf9; padding: 16px; border-radius: 5px; font-size: 13px; line-height: 1.9; min-height: 285px; }
.output-actions { display: flex; gap: 10px; margin-top: 14px; }
.output-actions .primary-button { flex: 1; }
.output-actions .icon-button { border: 1px solid var(--line); height: 42px; width: 42px; }
.save-draft { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 10px; }
.save-draft .secondary-button { width: 100%; margin-top: 12px; }
.local-note { font-size: 10px; color: #a2aaa6; display: flex; gap: 6px; align-items: center; margin: 19px 0 0; }
.local-note .lucide { width: 13px; height: 13px; }
dialog { width: min(920px, calc(100% - 40px)); max-height: calc(100dvh - 60px); padding: 0; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 25px 100px #17201c35; color: var(--ink); overflow: auto; }
dialog::backdrop { background: #17201c8a; backdrop-filter: blur(4px); }
.detail-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.1fr); }
.detail-visual { background: #edf0ee; position: relative; min-width: 0; display: flex; align-items: center; justify-content: center; min-height: 470px; }
.detail-visual img { width: 100%; height: auto; max-height: 560px; object-fit: contain; display: block; }
.detail-visual > span { position: absolute; bottom: 16px; left: 16px; padding: 4px 7px; background: #ffffffd9; font-size: 10px; border-radius: 3px; color: #718079; }
.detail-content { padding: 20px 28px 24px; min-width: 0; }
.detail-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.category-label { color: var(--green); background: var(--mint); font-size: 10px; padding: 4px 9px; border-radius: 4px; }
#detail-title { font-size: 25px; line-height: 1.4; margin: 5px 0 10px; overflow-wrap: anywhere; }
.detail-description { font-size: 12px; color: var(--muted); margin: 0; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 21px; }
.detail-tags span { font-size: 10px; color: #8e9b94; }
.detail-prompt-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.detail-prompt-heading h3 { font-size: 12px; font-weight: 550; margin: 0; color: #6b7770; }
.language-toggle { display: flex; gap: 2px; background: #f0f3f1; border-radius: 4px; padding: 3px; }
.language-toggle button { font-size: 10px; padding: 3px 8px; border-radius: 3px; min-height: 27px; }
.language-toggle button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px #0000000d; }
#detail-prompt { width: 100%; padding: 14px; font-size: 12px; line-height: 1.85; background: #f8faf9; border: 1px solid #e7ece8; border-radius: 5px; min-height: 170px; }
.detail-actions { display: flex; align-items: center; gap: 9px; margin-top: 16px; }
.detail-actions .primary-button { flex: 1; }
.detail-disclaimer { font-size: 10px; line-height: 1.7; color: #9ba59f; margin: 17px 0 0; }
.toast { position: fixed; z-index: 110; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 19px; border-radius: 6px; font-size: 12px; box-shadow: 0 6px 24px #00000019; width: max-content; max-width: calc(100% - 32px); text-align: center; pointer-events: none; }
.noscript-message { padding: 24px; text-align: center; }
@media (min-width: 1600px) { .page { max-width: 1510px; } .header-inner { max-width: 1510px; } }
@media (max-width: 1100px) {
  .header-inner { padding: 0 30px; gap: 35px; }
  .header-label { display: none; }
  .page { padding-left: 30px; padding-right: 30px; }
  .prompt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .studio-layout { gap: 30px; }
  .studio-output { padding: 22px; }
}
@media (max-width: 760px) {
  .header-inner { padding: 0 20px; gap: 25px; min-height: 69px; }
  .brand { font-size: 24px; }
  .main-nav { gap: 20px; }
  .main-nav a { gap: 5px; font-size: 12px; }
  .main-nav .lucide { display: none; }
  .nav-count { display: none; }
  .page { padding: 30px 20px 42px; }
  .prompt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .category-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 16px; gap: 4px; }
  .category-tabs button { padding: 6px 10px; }
  .studio-layout { grid-template-columns: 1fr; gap: 5px; }
  .studio-output { position: static; }
  .site-footer { padding: 20px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-visual { min-height: 0; max-height: 320px; }
  .detail-visual img { max-height: 320px; object-fit: contain; }
}
@media (max-width: 480px) {
  .header-inner { padding: 0 16px; flex-wrap: wrap; gap: 0; padding-top: 16px; }
  .brand { font-size: 25px; }
  .brand-mark { width: 30px; height: 30px; }
  .main-nav { width: 100%; justify-content: space-between; gap: 16px; padding-top: 6px; }
  .main-nav a { font-size: 12px; min-height: 45px; }
  .main-nav .lucide { display: inline-block; width: 15px; height: 15px; }
  .page { padding: 26px 16px 36px; }
  h1 { font-size: 27px; }
  .page-heading { margin-bottom: 23px; gap: 10px; }
  .page-heading .primary-button { padding: 8px 12px; font-size: 11px; min-height: 37px; }
  .page-heading .primary-button .lucide { width: 15px; height: 15px; }
  .eyebrow { font-size: 9px; }
  .search-row { gap: 8px; margin-bottom: 16px; }
  .search-box { padding: 0 10px; height: 44px; gap: 7px; }
  .search-box input { font-size: 12px; }
  .search-box > .lucide { width: 16px; height: 16px; }
  .sort-control { padding: 0 6px; min-width: 103px; width: 103px; }
  .sort-control .lucide { display: none; }
  .sort-control select { font-size: 10px; }
  .results-bar { padding: 16px 0 13px; }
  .prompt-grid { gap: 15px 12px; }
  .card-body { padding: 10px 11px 0; }
  .card-title { font-size: 13px; min-height: 24px; }
  .card-category { font-size: 9px; }
  .card-description { font-size: 10px; margin: 5px 0 10px; }
  .card-bottom { padding: 4px 7px 4px 10px; min-height: 43px; gap: 3px; }
  .card-id { font-size: 9px; }
  .card-tools .icon-button { width: 29px; min-width: 29px; height: 30px; }
  .card-tools .lucide { width: 14px; height: 14px; }
  .card-reference { top: 9px; left: 9px; font-size: 8px; }
  .site-footer { flex-wrap: wrap; justify-content: space-between; gap: 8px 15px; font-size: 9px; }
  .site-footer > span:nth-child(2) { display: none; }
  dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  .detail-content { padding: 16px 20px 20px; }
  .detail-visual { max-height: 230px; }
  .detail-visual img { max-height: 230px; }
  .detail-top { margin-bottom: 8px; }
  #detail-title { font-size: 22px; }
  .detail-actions { gap: 6px; }
  .detail-actions .primary-button, .detail-actions .secondary-button { padding: 9px 11px; font-size: 12px; }
  .studio-output { padding: 20px; }
  .field-pair { gap: 11px; }
  .studio-fields input, .studio-fields select, .studio-fields textarea, .save-draft input, #studio-result { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
