:root {
  color-scheme: light;
  --page: #f8f8fa;
  --surface: #ffffff;
  --ink: #25262d;
  --muted: #898b9a;
  --line: #ededf2;
  --pink: #fa6599;
  --pink-strong: #ef4e88;
  --pink-soft: #fff0f6;
  --field: #f9f9fb;
  --radius: 21px;
  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

/* Hide the scroll indicator without disabling wheel, touch or keyboard scrolling. */
html, body, textarea, .app, .copy-sheet {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html {
  min-width: 320px;
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font: 14px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button { color: inherit; }
button:disabled { opacity: 1; cursor: default; }
button, input, textarea { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
h1, h2, h3, p { margin: 0; }
svg { flex-shrink: 0; }

.icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.app {
  width: 100%;
  max-width: 640px;
  min-height: 100svh;
  margin: 0 auto;
  background: var(--page);
}

.topbar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  height: 66px;
  padding: 0 13px;
  background: var(--page);
}

.topbar-title {
  text-align: center;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: .5px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
}

.topbar .icon { width: 24px; height: 24px; }
.content { padding: 8px 16px 20px; }
.hero { position: relative; padding: 15px 4px 22px; }
.hero-title {
  font-family: "Songti SC", "Noto Serif CJK SC", SimSun, serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -1px;
}
.hero-title em, .intro-title em { color: var(--pink); font-style: normal; }
.hero-description { margin-top: 12px; color: var(--muted); font-size: 13px; }
.hero-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; }
.hero-heading .hero-title { flex-shrink: 0; }
.hero-title.category-hero-title { font-size: 32px; }
.signature {
  color: #f69dbd;
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: 16px;
  font-style: italic;
  white-space: nowrap;
  transform: rotate(-9deg);
}
.hero-bottom { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 15px; }
.hero-spark { position: absolute; top: 7px; right: 12px; color: #ffbbd3; }
.hero-spark .icon { width: 17px; height: 17px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 43px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  white-space: nowrap;
}
.button-primary {
  border-color: transparent;
  background: linear-gradient(110deg, #fc79a7, #f66099);
  color: white;
  box-shadow: 0 6px 17px #f6659920;
}
.button-round { border-radius: 99px; }
.button-soft { border-color: #ffe0ec; background: #fff4f8; color: var(--pink-strong); }
.button-muted { background: #eeeef3; border-color: #eeeef3; color: #6e7180; }
.button-small { min-height: 34px; padding: 7px 12px; font-size: 12px; border-radius: 10px; }
.button-text { border: 0; padding: 4px 0; min-height: 28px; background: transparent; color: var(--muted); }

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid #e8e8ee;
  border-radius: 99px;
  background: white;
  color: #999ba7;
  font-size: 13px;
}
.search-box span { flex: 1; }
.filter-stack { display: grid; gap: 13px; margin: 22px 0 25px; }
.filter-row { display: flex; align-items: flex-start; gap: 12px; }
.filter-label { padding-top: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 33px;
  padding: 6px 13px;
  border: 1px solid #e9e9ef;
  border-radius: 99px;
  background: white;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}
.chip-selected { border-color: #ffe8f1; background: var(--pink-soft); color: var(--pink-strong); }
.chip-dashed { border-style: dashed; border-color: #d4d5e0; color: var(--muted); }
.filter-row .chip { padding: 5px 8px; font-size: 11px; min-height: 31px; }
.filter-row .chip-list { gap: 6px; }
.section-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 14px; }
.section-toolbar h2 { font-size: 15px; font-weight: 650; }
.sort-label { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.sort-label .icon { width: 15px; height: 15px; }
.library-list { display: grid; gap: 12px; }
.prompt-card {
  padding: 18px 17px 13px;
  border: 1px solid #eaeaf0;
  border-radius: 17px;
  background: white;
  box-shadow: 0 3px 9px #30304402;
}
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-heading h3 { font-size: 17px; font-weight: 650; line-height: 1.5; }
.card-heading .icon-button { width: 24px; height: 25px; color: #727480; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 9px 0 10px; }
.badge { padding: 2px 8px; border-radius: 7px; background: #f4f4f7; color: #717380; font-size: 11px; line-height: 1.8; }
.model-badge { color: #e96091; background: #fff0f6; }
.prompt-excerpt { color: #656772; font-size: 13px; line-height: 1.85; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 15px; }
.timestamp { color: var(--muted); font-size: 11px; }
.parameter-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.parameter-pill { display: inline-flex; gap: 5px; padding: 2px 8px; background: #f6f6f8; border-radius: 7px; font-size: 11px; }
.parameter-pill b { color: var(--pink-strong); font-weight: 500; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr .7fr; gap: 6px; margin-top: 10px; }
.card-actions .button { padding: 7px 4px; }
.card-actions .icon { width: 14px; height: 14px; }
.card-time { margin-top: 9px; text-align: right; }

.intro { position: relative; padding: 24px 7px 27px; }
.intro-title { font-size: 26px; font-weight: 700; line-height: 1.4; letter-spacing: -.8px; }
.intro p { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.85; }
.intro .signature { display: block; text-align: right; margin-top: 9px; font-size: 14px; }
.panel { margin-bottom: 12px; padding: 20px 19px; border-radius: var(--radius); background: white; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 15px; }
.panel-header h2, .field-label { font-size: 16px; font-weight: 650; }
.panel-note { color: var(--muted); font-size: 11px; }
.field { display: grid; gap: 11px; }
.field + .field { margin-top: 23px; }
.field-control {
  display: block;
  width: 100%;
  min-height: 45px;
  padding: 13px 14px;
  border: 1px solid #e8e8f0;
  border-radius: 13px;
  outline: none;
  background: var(--field);
  color: #595d6d;
  font-size: 13px;
  line-height: 1.9;
  resize: none;
  overflow-wrap: anywhere;
}
.field-control::placeholder { color: #a0a3b1; }
.field-control:focus-visible { outline: 2px solid #ffc5dc; outline-offset: 3px; }
.input-area { min-height: 225px; }
.input-area-structured { min-height: 270px; font-size: 12px; }
.text-block { white-space: pre-wrap; overflow-wrap: anywhere; }
.input-note { margin-top: 11px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.input-note .icon { width: 14px; height: 14px; margin-right: 4px; }
.field .chip { padding: 7px 15px; font-size: 12px; }
.model-options { display: grid; grid-template-columns: .8fr 1.55fr 1fr .8fr .8fr; gap: 6px; }
.model-options .chip { min-width: 0; padding: 7px 3px; font-size: 11px; }
.parse-action { display: grid; justify-items: center; gap: 12px; margin-top: 22px; }
.parse-action .button { width: 90%; }
.parse-action p { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.parse-action .icon { width: 14px; height: 14px; }
.action-bar { display: grid; grid-template-columns: .8fr 1.3fr; gap: 12px; padding: 13px 3px 8px; }
.action-bar .button { min-height: 46px; border-radius: 99px; }
.design-note { padding: 23px 12px 17px; color: #9193a1; font-size: 10px; text-align: center; letter-spacing: .3px; }

.detail-header { padding-top: 23px; padding-bottom: 22px; }
.detail-title { font-size: 25px; line-height: 1.4; font-weight: 650; letter-spacing: -.6px; }
.metadata { display: grid; grid-template-columns: .85fr .85fr 1.3fr; margin-top: 21px; }
.metadata-item { padding: 0 12px; border-right: 1px solid var(--line); }
.metadata-item:first-child { padding-left: 0; }
.metadata-item:last-child { padding-right: 0; border: 0; }
.metadata-label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.metadata .chip { padding: 4px 11px; min-height: 30px; font-size: 11px; }
.metadata .chip-list { gap: 4px; }
.time-record { display: flex; flex-wrap: wrap; gap: 3px 13px; margin-top: 21px; color: var(--muted); font-size: 11px; }
.parameters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.parameter-box { padding: 12px 9px; border: 1px solid var(--line); border-radius: 13px; background: #fcfcfd; text-align: center; }
.parameter-box-wide { grid-column: span 2; }
.parameter-key { display: block; color: var(--pink-strong); font-size: 12px; }
.parameter-value { display: block; margin-top: 5px; font-size: 13px; overflow-wrap: anywhere; }
.parameter-description { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.p-asset-list { display: grid; gap: 8px; }
.p-asset-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fcfcfd;
}
.p-asset-content { flex: 1; min-width: 0; }
.p-asset-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.p-asset-label { color: var(--pink-strong); font-size: 12px; }
.p-asset-code { display: block; margin-top: 5px; font-size: 12px; overflow-wrap: anywhere; }
.p-asset-row > .icon { width: 15px; height: 15px; color: var(--muted); }
.p-add { margin-top: 12px; }
.quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.quick-actions .button { flex-direction: column; gap: 7px; min-height: 66px; padding: 10px 3px; font-size: 11px; }
.reference-list { display: grid; gap: 9px; }
.reference-row { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; }
.reference-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #fff0f6; color: var(--pink-strong); }
.reference-description { flex: 1; min-width: 0; }
.reference-description strong { font-size: 12px; font-weight: 500; }
.reference-description p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.reference-row > .icon { width: 15px; height: 15px; color: #9a9ca9; }
.raw-row { display: flex; align-items: center; justify-content: space-between; }
.raw-row h2 { font-size: 16px; font-weight: 650; }
.raw-row span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.management-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 6px 0; }
.management-actions .button { gap: 5px; min-height: 39px; padding: 7px 4px; font-size: 11px; border-radius: 99px; }
.management-actions .icon { width: 15px; height: 15px; }
.edit-parameters .parameter-box { position: relative; text-align: left; }
.edit-parameters .parameter-value { font-size: 12px; }
.edit-parameters .icon { position: absolute; top: 9px; right: 8px; width: 12px; height: 12px; color: #9a9cab; }
.reference-edit { display: flex; gap: 8px; margin-top: 7px; color: var(--pink-strong); font-size: 10px; }

.category-heading { margin-top: 22px; margin-bottom: 15px; }
.category-heading h2 { font-size: 17px; }
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.category-card { padding: 23px 18px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.category-card > .icon { color: #efa0be; margin-bottom: 17px; width: 24px; height: 24px; }
.category-card h3 { font-size: 19px; font-weight: 500; margin-bottom: 10px; }
.category-card p { color: var(--muted); font-size: 11px; }
.category-card .badge { display: inline-block; margin-top: 17px; }
.category-list { display: grid; gap: 10px; }
.category-row { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.category-row h3 { font-size: 16px; font-weight: 500; }
.category-row p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.category-help { display: flex; align-items: center; gap: 7px; margin: 21px 5px 10px; color: var(--muted); font-size: 11px; }
.category-help .icon { color: #f791b7; width: 15px; height: 15px; }

.sheet-scene { position: relative; min-height: 100svh; overflow: hidden; background: #f8f8fa; }
.sheet-backdrop { height: 254px; overflow: hidden; background: #f8f8fa; }
.sheet-scrim { position: absolute; z-index: 1; inset: 0 0 auto; height: 285px; background: #24252b68; }
.copy-sheet { position: relative; z-index: 2; margin-top: -24px; padding: 11px 20px 0; border-radius: 28px 28px 0 0; background: white; }
.sheet-handle { width: 37px; height: 4px; margin: 0 auto 16px; border-radius: 99px; background: #d5d5df; }
.sheet-title { display: flex; align-items: center; justify-content: space-between; }
.sheet-title h1 { font-size: 23px; font-weight: 650; }
.sheet-subtitle { color: var(--muted); font-size: 12px; margin-top: 4px; }
.selection-tools { display: flex; gap: 20px; margin: 15px 0 23px; color: var(--muted); font-size: 12px; }
.selection-tools span + span { border-left: 1px solid #dcdde5; padding-left: 20px; }
.copy-group { margin-top: 21px; }
.copy-group h2 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.selection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.selection-item { display: flex; align-items: center; gap: 10px; min-height: 49px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 12px; background: #fdfdfe; }
.selection-item-selected { border-color: #ffd6e6; background: #fff7fa; }
.selection-item small { display: block; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.selection-item > .timestamp { margin-left: auto; }
.check-circle { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 19px; height: 19px; border: 1px solid #d8d9e3; border-radius: 50%; background: white; }
.selection-item-selected .check-circle { background: var(--pink); border-color: var(--pink); color: white; }
.check-circle .icon { width: 13px; height: 13px; stroke-width: 2; }
.selection-list { display: grid; gap: 8px; }
.copy-preview { font-size: 12px; line-height: 1.95; }
.sheet-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0 12px; margin-top: 19px; border-top: 1px solid var(--line); }
.sheet-footer p { color: var(--muted); font-size: 12px; }
.sheet-footer strong { color: var(--pink-strong); font-size: 17px; font-weight: 600; }
.sheet-footer .button { font-size: 13px; }

@media (min-width: 520px) {
  .content { padding-left: 27px; padding-right: 27px; }
  .topbar { padding-left: 24px; padding-right: 24px; }
  .hero { padding-top: 28px; padding-bottom: 30px; }
  .hero-heading { gap: 24px; }
  .hero-title { font-size: 42px; }
  .signature { font-size: 21px; }
  .filter-row .chip { padding: 6px 14px; font-size: 12px; }
  .prompt-excerpt { font-size: 13px; }
  .prompt-card { padding: 22px; }
  .panel { padding: 24px; }
  .parameters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .copy-sheet { padding-left: 28px; padding-right: 28px; }
}

@media (max-width: 359px) {
  .content { padding-left: 12px; padding-right: 12px; }
  .hero-title { font-size: 31px; }
  .signature { font-size: 12px; }
  .intro-title { font-size: 23px; }
  .panel { padding: 17px 15px; }
  .filter-row { gap: 8px; }
  .metadata-item { padding-left: 7px; padding-right: 7px; }
  .metadata .chip { padding: 4px 8px; }
}
