/* Taste / redesign-existing-projects: shared visual language for the existing app. */
:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --fg: #292c29;
  --muted: #73776f;
  --border: #e5e7e0;
  --accent: #88563d;
  --font-body: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: var(--font-body);
  --font-mono: var(--font-body);
  --soft: #f5f6f2;
  --danger: #a43c32;
  color-scheme: light;
}
body { font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3 { font-weight: 600; line-height: 1.35; letter-spacing: -.035em; }
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a, label.upload { touch-action: manipulation; }
button:focus-visible, a:focus-visible, label.upload:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.meta, .eyebrow, .pill, .tag, .num, .metric strong { font-variant-numeric: tabular-nums; }
.meta { font-size: 12px; line-height: 1.5; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: .06em; margin-bottom: 8px; }
.muted { line-height: 1.75; }
.btn, .icon-btn, .close { border-radius: 10px; min-height: 44px; font-size: 13px; font-weight: 600; }
.btn { padding: 10px 15px; line-height: 1.5; }
a.btn { display: inline-flex; justify-content: center; align-items: center; text-decoration: none; }
.btn.primary { background: var(--fg); border-color: var(--fg); }
.btn.danger, .btn.risk { color: var(--danger); border-color: #e8cec8; background: #fffafa; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
button:not(:disabled):active, label.upload:active { transform: translateY(1px); }
.card { border-radius: 16px; padding: 20px; box-shadow: 0 3px 14px #292c2903; }
.card h2 { font-size: 20px; margin-bottom: 10px; }
.card + .card { margin-top: 16px; }
.field { gap: 8px; margin: 16px 0; min-width: 0; }
.field label { font-size: 12px; font-weight: 500; }
.field input, .field select, .field textarea, .select { width: 100%; min-width: 0; border-radius: 10px; background: #fbfcf9; font-size: 14px; }
.pill, .tag { font-size: 11px; line-height: 1.4; padding: 6px 10px; background: var(--soft); border-color: transparent; }
.state-panel { border-style: solid; border-color: var(--border); border-radius: 14px; background: var(--soft); padding: 22px 20px; }
.state-panel strong { font-size: 16px; font-weight: 600; margin-bottom: 7px; }
.state-panel .muted { font-size: 13px; }
.dialog, .modal { border-radius: 20px; padding: 26px; }
.dialog h2, .modal h2 { font-size: 23px; }
.dialog-actions, .modal-actions { gap: 12px; margin-top: 24px; }
.mini-page .app { background: #fdfdfa; }
.mini-page .topbar { padding: 16px 22px; min-height: 78px; background: #fdfdfaf2; }
.brand-lockup { display: flex; align-items: center; gap: 11px; }
.brand-symbol { flex: 0 0 36px; width: 36px; height: 40px; color: var(--fg); }
.mini-page .brand { font-family: "Songti SC", "SimSun", serif; font-size: 25px; font-weight: 600; line-height: 1.2; letter-spacing: .12em; }
.brand-lockup .meta { font-size: 10px; letter-spacing: .14em; margin-top: 4px; }
.mini-page .view { padding: 28px 22px 36px; min-height: calc(100dvh - 158px); }
.mini-page #createView { padding-bottom: 132px; }
.section-head { margin-bottom: 24px; align-items: center; }
.section-head h1 { font-size: 28px; }
.section-head .pill { flex-shrink: 0; }
.mini-page .chat { gap: 18px; }
.login-card { margin-top: 32px; padding: 26px 24px; background: var(--surface); }
.login-card h2 { font-size: 23px; }
.login-card .field { margin: 24px 0 16px; }
.login-card .btn { min-height: 48px; }
.intro-steps { display: flex; gap: 0; list-style: none; padding: 0; margin: 28px 0 0; }
.intro-steps li { flex: 1; display: grid; gap: 7px; border-top: 1px solid var(--border); padding-top: 12px; font-size: 12px; color: var(--muted); }
.intro-steps b { font-size: 11px; font-weight: 500; letter-spacing: .04em; color: var(--accent); }
.mini-page .composer { width: calc(100% - 32px); max-width: 428px; padding: 7px; gap: 5px; bottom: calc(88px + env(safe-area-inset-bottom)); border: 1px solid var(--border); border-radius: 19px; background: #fff; box-shadow: 0 4px 24px #292c2910; align-items: center; }
.composer:focus-within { border-color: #a4ada0; box-shadow: 0 0 0 3px #89957f12; }
.mini-page .composer textarea { border: 0; outline: 0; border-radius: 0; background: transparent; font-size: 14px; padding: 12px 4px; min-height: 46px; line-height: 22px; }
.composer textarea::placeholder { color: #90958b; }
.mini-page .upload { width: 42px; min-width: 42px; height: 44px; border: 0; background: var(--soft); border-radius: 12px; cursor: pointer; }
.mini-page .send { flex-shrink: 0; width: 42px; height: 44px; border-radius: 12px; font-size: 22px; }
.mini-page .bottom-nav { height: calc(78px + env(safe-area-inset-bottom)); padding: 6px 14px max(6px, env(safe-area-inset-bottom)); background: #fdfdfaf7; }
.mini-page .nav-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: 12px; font-size: 11px; font-weight: 500; margin: 0 3px; }
.mini-page .nav-btn.active { background: var(--soft); color: var(--fg); font-weight: 600; }
.nav-icon { width: 21px; height: 21px; stroke-width: 1.65; }
.mini-page .material-grid { gap: 14px; margin-top: 22px; }
.mini-page .material-card { padding: 10px; gap: 0; border-radius: 14px; background: var(--surface); overflow: hidden; }
.material-card > div:first-child, .material-pick { min-width: 0; }
.mini-page .material-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: #f1f2ed; border-radius: 8px; margin-bottom: 12px; }
.mini-page .material-card strong { font-size: 14px; line-height: 1.55; padding-inline: 2px; font-weight: 600; }
.mini-page .material-card .muted { font-size: 11px; line-height: 1.6; padding-inline: 2px; margin-top: 5px; }
.material-actions { display: flex; align-items: stretch; gap: 6px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); }
.mini-page .material-actions .btn { width: auto; flex: 1; padding: 5px 2px; font-size: 11px; background: transparent; border-color: transparent; border-radius: 6px; }
.mini-page .material-actions .danger { flex: 0 0 40px; }
.material-actions .btn:hover { background: var(--soft); }
.material-actions .danger:hover { background: #fff0ed; }
.mini-page .list { gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.mini-page .list-item { min-height: 86px; padding: 16px; gap: 12px; }
.mini-page .list-item:last-child { border-bottom: 0; }
.mini-page .list-item strong { font-size: 14px; font-weight: 600; }
.mini-page .list-item small { font-size: 12px; }
.mini-page .list-item:hover { background: var(--soft); }
.mini-page .task-card { background: var(--surface); border-radius: 16px; }
.mini-page .task-body { padding: 22px 20px; }
.mini-page .task-body h2 { font-size: 21px; margin: 8px 0 12px; }
.mini-page .button-row { gap: 10px; margin-top: 18px; }
.mini-page #profileContent { display: grid; gap: 16px; }
.mini-page #profileContent .section-head { margin-bottom: 8px; }
.mini-page .identity { gap: 16px; }
.mini-page .avatar { border-radius: 16px; font-family: "Songti SC", "SimSun", serif; background: #eceee7; color: #495341; }
.mini-page .layer { background: #fdfdfa; }
.mini-page .layer-head { min-height: 80px; padding: 14px 20px; gap: 14px; }
.mini-page .layer-head .meta { margin-top: 3px; }
.mini-page .layer-body, .mini-page .module-body { padding: 24px 22px 40px; }
.mini-page .module-strip { padding: 16px 20px; gap: 8px; border-bottom: 1px solid var(--border); background: #f7f8f4; }
.mini-page .module-btn { min-height: 42px; border-radius: 9px; font-size: 12px; background: transparent; border-color: transparent; }
.mini-page .module-btn.active { background: var(--fg); }
.mini-page .room-preview { background: var(--surface); padding: 14px; margin-bottom: 20px; }
.mini-page .flow-status { background: #eef2e9; color: #49593f; border-color: #dce3d4; top: 78px; }
.admin-page .shell { grid-template-columns: 224px minmax(0, 1fr); }
.admin-page .sidebar { background: #fdfdfa; color: var(--fg); border-right: 1px solid var(--border); padding: 28px 16px; }
.admin-page .brand { font-family: "Songti SC", "SimSun", serif; font-size: 30px; font-weight: 600; padding: 0 14px 34px; letter-spacing: .13em; }
.admin-page .brand small { color: var(--muted); font: 11px var(--font-body); margin-top: 8px; letter-spacing: .12em; }
.admin-page .nav { gap: 5px; }
.admin-page .nav-btn { display: flex; align-items: center; gap: 12px; padding: 0 14px; min-height: 46px; color: #747b6e; border-radius: 9px; }
.admin-page .nav-btn b { font-size: 13px; font-weight: 500; }
.admin-page .nav-btn::before { content: ""; width: 5px; height: 5px; flex-shrink: 0; border: 1px solid currentColor; border-radius: 2px; }
.admin-page .nav-btn.active { background: #e9ece3; color: #34422d; }
.admin-page .nav-btn.active::before { background: currentColor; }
.admin-page .nav-btn.active b { font-weight: 600; }
.admin-page .sidebar-foot { color: var(--muted); border-color: var(--border); padding: 20px 14px 0; line-height: 1.9; }
.admin-page .topbar { min-height: 74px; padding: 14px 36px; background: #fdfdfaf0; }
.admin-page .env-badge { color: #526847; background: #edf1e7; border-color: transparent; font-size: 11px; }
.admin-page .content { max-width: 1360px; padding: 38px 40px 64px; }
.admin-page .page-head { margin-bottom: 30px; }
.admin-page .page-head h1 { font-size: 32px; }
.admin-page .lead { font-size: 13px; margin-top: 10px; }
.admin-page .grid { gap: 18px; }
.admin-page .card { padding: 24px; }
.admin-page .card h2 { font-size: 18px; }
.admin-page .metric strong { font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.55; }
.admin-page .metric strong.num { font-size: 32px; letter-spacing: -.035em; line-height: 1.35; }
.admin-page .grid > .card + .card { margin-top: 0; }
.admin-page [data-admin-pattern] > .grid + * { margin-top: 20px; }
.admin-page .env-badge:before { background: currentColor; }
.admin-page .table-wrap { border-radius: 13px; }
.admin-page .table th { font-size: 11px; font-weight: 500; background: #f4f5f0; }
.admin-page .table td { height: 58px; font-size: 13px; }
.admin-page .table th, .admin-page .table td { padding: 14px 20px; }
.admin-page .table button { color: #6b513e; font-size: 12px; text-decoration: none; font-weight: 600; }
.admin-page .table button:hover { text-decoration: underline; }
.admin-page .notice { background: #f7f3eb; border-color: #e8decf; }
.admin-page .drawer { padding: 30px; }
.admin-page .drawer h2 { font-size: 25px; }
@media (hover: hover) {
  .btn:not(:disabled):hover { border-color: #c4cabe; background: #f0f2eb; }
  .btn.primary:not(:disabled):hover { color: #fff; background: #40493a; border-color: #40493a; }
  .btn.danger:not(:disabled):hover, .btn.risk:not(:disabled):hover { color: var(--danger); background: #fff0ed; border-color: #e8cec8; }
  .admin-page .nav-btn:hover { background: #eef0e9; color: var(--fg); }
}
@media (min-width: 700px) {
  .mini-page { padding: 28px; }
  .mini-page .app { min-height: calc(100dvh - 56px); border-radius: 26px; box-shadow: 0 0 0 1px #dde0d6, 0 16px 60px #3d443c09; }
  .mini-page .bottom-nav { bottom: 28px; border-radius: 0 0 26px 26px; }
  .mini-page .composer { bottom: 116px; }
  .mini-page .workbench { inset: 28px calc((100vw - 460px) / 2); border-radius: 26px; }
}
@media (min-width: 1200px) {
  .admin-page [data-environment-summary] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .admin-page .shell { grid-template-columns: 168px minmax(0, 1fr); }
  .admin-page .content { padding: 28px 24px 48px; }
  .admin-page .topbar { padding-inline: 24px; }
}
@media (max-width: 680px) {
  .admin-page .shell { display: block; }
  .admin-page .sidebar { padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .admin-page .nav-btn { gap: 7px; padding: 0 12px; }
  .admin-page .topbar { padding: 12px 16px; min-height: 62px; }
  .admin-page .content { padding: 26px 16px 40px; }
  .admin-page .page-head h1 { font-size: 27px; }
  .admin-page .card { padding: 20px; }
  .admin-page .drawer { padding: 22px; }
}
@media (max-width: 374px) {
  .mini-page .view, .mini-page .module-body, .mini-page .layer-body { padding-inline: 16px; }
  .mini-page .material-grid { gap: 10px; }
  .mini-page .material-card { padding: 8px; }
  .login-card { padding: 22px 18px; }
  .section-head h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: no-preference) {
  button, a.btn { transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
}

/* Feedback stays beside the result so users can refer to the image while writing. */
.feedback-panel { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--border); }
.feedback-panel h3 { margin: 4px 0 8px; font-size: 20px; letter-spacing: -.02em; }
.feedback-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.feedback-choices .btn { padding: 15px 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; text-align: left; height: auto; }
.feedback-choices strong { font-size: 14px; font-weight: 600; }
.feedback-choices span { font-size: 11px; font-weight: 400; color: var(--muted); line-height: 1.6; }
.feedback-choices [aria-expanded="true"], .feedback-choices [aria-pressed="true"] { border-color: #7b896d; background: #edf1e7; }
.feedback-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 18px 0 10px; font-size: 13px; font-weight: 600; }
.feedback-label span { font-size: 11px; color: var(--muted); font-weight: 400; }
.feedback-issues { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.feedback-issues .btn { min-height: 40px; padding: 9px 7px; font-size: 12px; }
.feedback-issues [aria-pressed="true"] { background: #e9eee1; border-color: #879775; color: #34422d; }
.feedback-panel textarea { box-sizing: border-box; display: block; width: 100%; min-height: 105px; resize: vertical; background: #fafbf7; border: 1px solid var(--border); border-radius: 12px; padding: 13px; font: 13px/1.8 var(--font-body); color: var(--fg); }
.feedback-panel textarea:focus-visible, .feedback-panel button:focus-visible { outline: 2px solid #6d805c; outline-offset: 3px; }
.feedback-panel textarea::placeholder { color: #929889; }
.feedback-caption { font-size: 11px; line-height: 1.8; color: var(--muted); margin: 8px 0; }
[data-feedback-count] { text-align: right; font-variant-numeric: tabular-nums; }
.feedback-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 16px; }
.feedback-status { font-size: 12px; line-height: 1.8; color: #526446; margin: 14px 0 0; }
.feedback-status:empty { display: none; }
.feedback-status[data-state="error"], .feedback-status[role="alert"] { color: #914c35; }
.feedback-saved { margin-top: 12px; padding: 14px; border-radius: 10px; background: #f1f4ed; font-size: 12px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-panel [hidden] { display: none; }
.mini-page:has(#createView.active [data-feedback-editor]:not([hidden])) .composer { display: none; }
.feedback-panel textarea { scroll-margin-bottom: 110px; }
.feedback-actions { scroll-margin-bottom: 110px; }
@media (prefers-reduced-motion: no-preference) { .feedback-panel button:active { transform: translateY(1px); } }
.feedback-inbox { background: #fdfdfa; padding: 26px; border-radius: 18px; }
.feedback-inbox-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.feedback-inbox-head h2 { font-size: 24px; margin: 6px 0 10px; }
.feedback-inbox-head p { font-size: 13px; line-height: 1.7; }
.feedback-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; border-block: 1px solid var(--border); margin: 24px 0; padding: 20px 0; }
.feedback-metrics span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.feedback-metrics strong { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.feedback-filters { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.feedback-filters label, .feedback-review label { display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 500; }
.feedback-filters select, .feedback-filters input, .feedback-review select, .feedback-review textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: #fafbf7; min-height: 42px; font-size: 13px; min-width: 0; width: 100%; }
.feedback-search { flex: 1; min-width: 200px; }
.feedback-list-count { font-size: 12px; color: var(--muted); margin: 24px 0 8px; }
.feedback-entry { padding: 20px 0; border-bottom: 1px solid var(--border); }
.feedback-entry-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; font-size: 11px; color: var(--muted); }
.feedback-state { padding: 4px 8px; background: #f6efdf; color: #87662e; border-radius: 5px; }
.feedback-state[data-review-state="in_progress"] { background: #eaf0e3; color: #546742; }
.feedback-state[data-review-state="resolved"], .feedback-state[data-review-state="dismissed"] { background: #eceee8; color: #66735b; }
.feedback-entry-body { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.feedback-entry-body > div { min-width: 0; flex: 1; }
.feedback-entry-body > button { flex-shrink: 0; }
.feedback-entry h3 { font-size: 17px; }
.feedback-entry h3 span { font: 11px var(--font-body); color: var(--muted); margin-left: 14px; }
.feedback-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.feedback-tags span { font-size: 11px; color: #626e57; background: #f0f2eb; border-radius: 4px; padding: 3px 7px; }
.feedback-excerpt { font-size: 13px; line-height: 1.8; color: #646d5c; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.feedback-pagination { display: flex; justify-content: flex-end; gap: 8px; margin: 22px 0; }
.feedback-governance-note { font-size: 11px; line-height: 1.8; }
.feedback-empty { padding: 48px 15px; text-align: center; background: #f5f7f0; border-radius: 12px; margin-top: 15px; }
.feedback-empty h3 { font-size: 19px; margin-bottom: 12px; }
.feedback-empty p { font-size: 13px; color: var(--muted); line-height: 1.8; }
.feedback-data-title { margin: 30px 0 18px; font-size: 21px; }
.feedback-detail-time { font-size: 11px; color: var(--muted); margin: 18px 0; }
.feedback-detail-block { padding: 16px 0; border-bottom: 1px solid var(--border); }
.feedback-detail h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.feedback-detail-block p { font-size: 13px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-references { font-size: 12px; margin: 22px 0; color: var(--muted); }
.feedback-references summary { cursor: pointer; min-height: 32px; }
.feedback-references dl { line-height: 1.7; }
.feedback-references dd { margin: 0 0 12px; overflow-wrap: anywhere; }
.feedback-review { padding: 22px 18px; background: #f1f4ec; border-radius: 12px; }
.feedback-review label { margin-bottom: 14px; }
.feedback-review textarea { min-height: 130px; resize: vertical; line-height: 1.8; }
.feedback-review .muted, [data-feedback-review-error] { font-size: 12px; line-height: 1.8; margin-bottom: 12px; }
[data-feedback-review-error] { color: #875b3c; }
.feedback-history { padding-top: 28px; }
.feedback-history article { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.feedback-history time { display: block; font-size: 11px; color: var(--muted); margin: 6px 0; }
.feedback-history p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.feedback-images { margin: 22px 0; padding: 18px; border: 1px solid var(--border); border-radius: 12px; }
.feedback-images .muted, [data-feedback-image-status] { font-size: 12px; line-height: 1.8; margin: 10px 0; }
.feedback-images label { display: grid; gap: 8px; font-size: 12px; margin: 16px 0; }
.feedback-images input { width: 100%; box-sizing: border-box; border: 1px solid var(--border); padding: 12px; border-radius: 9px; background: #fafbf7; font-size: 12px; }
[data-feedback-image-grid] { display: grid; gap: 16px; }
[data-feedback-image-grid] figure { margin: 0; }
[data-feedback-image-grid] img { display: block; width: 100%; max-height: 320px; object-fit: contain; border-radius: 9px; background: #edeFE8; }
[data-feedback-image-grid] figcaption { font-size: 12px; margin-top: 8px; color: var(--muted); }
.feedback-inbox [hidden], .feedback-detail [hidden] { display: none; }
@media (max-width: 680px) { .feedback-inbox { padding: 20px 16px; } .feedback-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } .feedback-filters label { flex: 1; min-width: 120px; } .feedback-filters .feedback-search { min-width: 100%; } .feedback-entry-body { align-items: flex-start; flex-direction: column; gap: 12px; } .feedback-inbox-head h2 { font-size: 22px; } }
