:root {
  color: #1d1b20;
  background: transparent;
  font-family: "FangSong", "仿宋", "STFangsong", serif;
  font-size: 16px;
  line-height: 1.65;
  --paper: #ffffff;
  --paper-soft: #f1f3f8;
  --paper-deep: #e8edf5;
  --ink: #1d1b20;
  --muted: #5f6368;
  --input-placeholder: #7c8088;
  --accent: #aa6108;
  --accent-dark: #844a02;
  --line: #c8cdd7;
  --line-soft: #e1e5ec;
  --focus: #c97c27;
  --danger: #b3261e;
  --gold: #d98218;
  --vermilion: #c43b33;
  --comment-red: #d4473e;
  --qinghua-blue: #0a5fd0;
  --jade: #009486;
}

* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; background: var(--paper); isolation: isolate; }
.dragon-background { position: fixed; z-index: 0; inset: 0; pointer-events: none; }
.dragon-background img { position: absolute; display: block; width: min(850px, 60vw); height: auto; opacity: .60; }
.dragon-background .dragon-upper-left { top: -22px; left: -24px; }
.dragon-background .dragon-lower-right { right: -24px; bottom: -22px; }
@media (min-width: 981px) {
  .dragon-background .dragon-upper-left { width: min(574px, 40.5vw); }
  .dragon-background .dragon-lower-right { width: min(510px, 36vw); }
  .dragon-background .dragon-upper-left { top: -44px; left: -48px; }
  .dragon-background .dragon-lower-right { right: -48px; bottom: -44px; }
  .page-header .site-title img { width: 420px; }
}
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: var(--accent-dark); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(201, 124, 39, .42); outline-offset: 2px; }

.page { position: relative; z-index: 1; width: min(1040px, calc(100% - 80px)); margin: 0 auto; padding: 42px 0 72px; }
.page-header { margin-bottom: 28px; padding: 0 0 24px; border-bottom: 1px solid var(--line); background: transparent; }
.page-header > h1 { text-align: right; }
.site-title { line-height: 0; }
.site-title img { display: block; width: clamp(250px, 52vw, 350px); max-width: 100%; height: auto; margin-left: auto; }
.title-note-trigger { display: block; margin-left: auto; padding: 0; border: 0; border-radius: 2px; background: transparent; box-shadow: none; }
.title-note-trigger:hover { border: 0; background: transparent; box-shadow: none; }
.title-note-trigger:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.page-header .notice { text-align: right; }

.eyebrow { margin: 0 0 8px; color: var(--gold); font-size: .86rem; font-weight: 600; letter-spacing: .18em; }
h1, h2, h3, h4 { color: var(--qinghua-blue); font-family: "FangSong", "仿宋", "STFangsong", serif; font-weight: 600; }
h1 { margin: 0; color: var(--qinghua-blue); font-size: clamp(2.15rem, 4vw, 3rem); line-height: 1.25; letter-spacing: .015em; }
.notice { margin: 10px 0 0; color: var(--muted); font-size: .96rem; }

.search-panel, .result-card, .message, .detail-section { background: var(--paper); border: 1px solid var(--line-soft); border-radius: 8px; box-shadow: 0 1px 2px rgba(30, 45, 70, .08); }
.search-panel { padding: 26px 44px 30px; }
.search-heading-row { display: flex; align-items: last baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.search-panel h2 { margin: 0; font-size: 1.55rem; }
.search-heading-row > span { color: var(--muted); font-size: .72rem; line-height: 1.55; text-align: right; white-space: nowrap; }
.search-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px 22px; }
label, fieldset { display: grid; gap: 6px; }
label span, legend { color: var(--jade); font-size: .86rem; font-weight: 600; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--input-placeholder); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--gold); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201, 124, 39, .16); }
.search-form label > span { font-size: 1rem; }
.search-form input, .search-form select { height: 37px; padding: 5px 8px; font-size: .86rem; line-height: 1.2; }
.inline-picker-wrap { position: relative; display: block; color: var(--ink); font-weight: 400; }
.inline-picker-wrap input { padding-right: 34px; }
.inline-picker-wrap select { position: absolute; z-index: 1; top: 0; right: 0; width: 34px; height: 37px; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.inline-picker-icon { position: absolute; top: 0; right: 0; display: grid; width: 34px; height: 37px; place-items: center; border-left: 1px solid var(--line-soft); color: var(--jade); font-family: Arial, sans-serif; font-size: 1.05rem; line-height: 1; pointer-events: none; }
.inline-picker-glyph { transform: translateY(-4px); }
.inline-picker-wrap:focus-within .inline-picker-icon { border-left-color: var(--accent); color: var(--accent); }
.year-range { grid-template-columns: 1fr auto 1fr; align-items: end; margin: 0; padding: 0; border: 0; }
.year-range legend { grid-column: 1 / -1; }
.year-separator { display: flex; align-items: center; height: 37px; padding: 0 2px; color: #81796d; transform: scaleX(.67); transform-origin: center; }
.form-actions { display: flex; align-items: center; gap: 20px; grid-column: 1 / -1; padding-top: 4px; }
.form-actions button { height: 37px; padding-block: 0; border-color: var(--vermilion); background: var(--vermilion); }
.form-actions button:hover { border-color: #922926; background: #922926; }
button { padding: 10px 26px; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent); color: #fff; cursor: pointer; box-shadow: 0 1px 2px rgba(30, 45, 70, .16); }
button:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.form-actions a { display: inline-flex; align-items: center; height: 37px; padding: 0; border: 0; background: transparent; color: var(--vermilion); font-size: .92rem; text-decoration: none; }
.form-actions a:hover { background: transparent; color: #922926; text-decoration: underline; text-underline-offset: 3px; }

.results { margin-top: 34px; }
.results > h2 { margin: 0 0 14px; font-size: 1.65rem; font-variant-numeric: tabular-nums; }
.download-actions { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--paper); }
.download-actions, .download-actions label span { color: var(--ink); }
.download-range-form { display: grid; grid-template-columns: auto auto auto minmax(170px, 1fr) repeat(3, auto); align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.download-range-form label { display: flex; align-items: center; gap: 6px; }
.download-range-form input[type=number] { width: 46px; padding: 2px 3px; appearance: textfield; background: #fff; font-size: .7rem; font-variant-numeric: tabular-nums; text-align: center; }
.download-range-form input[type=number]::-webkit-inner-spin-button,
.download-range-form input[type=number]::-webkit-outer-spin-button,
.page-jump input[type=number]::-webkit-inner-spin-button,
.page-jump input[type=number]::-webkit-outer-spin-button { margin: 0; appearance: none; }
.download-range-label { color: var(--ink); font-size: .9rem; font-weight: 700; white-space: nowrap; }
.download-range-summary { color: var(--ink); font-size: .82rem; line-height: 1.45; }
.download-button { display: inline-flex; align-items: center; justify-content: center; min-height: 22px; padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; background: #fff; box-shadow: none; color: var(--ink); font-size: .7rem; line-height: 1.25; text-decoration: none; white-space: nowrap; }
button.download-button { cursor: pointer; }
.download-button:hover { border-color: var(--gold); background: #fff7e8; color: var(--accent-dark); }
.disabled-download, .disabled-download:hover { color: #aaa398; background: #eeeae2; border-color: var(--line); cursor: not-allowed; }
.download-limit-note { color: var(--ink); font-size: .86rem; }

.result-list { display: grid; gap: 10px; }
.result-card { position: relative; padding: 18px 44px; overflow: hidden; font-family: "KaiTi", "楷体", "STKaiti", serif; font-weight: 575; }
.result-card::before { display: none; }
.result-card:hover { border-color: rgba(243, 182, 64, .88); box-shadow: 0 3px 8px rgba(30, 45, 70, .12); }
.result-card h3 { margin: 0 0 9px; font-size: 1.08rem; font-weight: 600; line-height: 1.4; }
.result-number { margin-right: 3px; color: var(--qinghua-blue); font-family: "FangSong", "仿宋", "STFangsong", serif; font-size: 1em; font-variant-numeric: tabular-nums; font-weight: 500; }
.result-title { color: var(--qinghua-blue); text-decoration: none; }
.result-title:hover { color: #8c302a; text-decoration: none; }
.metadata { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5px 28px; margin: 0; line-height: 1.45; }
.metadata div { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; }
dt { color: var(--jade); font-size: .88rem; font-weight: 575; }
dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.metadata dd { font-family: "FangSong", "仿宋", "STFangsong", serif; font-size: .88rem; }
.comment { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.comment h4 { margin: 0; color: var(--jade); font-family: inherit; font-size: .86rem; font-weight: 575; }
.comment-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-bottom: 3px; }
.comment-date { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; color: var(--ink); font-family: "FangSong", "仿宋", "STFangsong", serif; font-size: .88rem; white-space: nowrap; }
.comment-date-label { color: var(--jade); font-family: "KaiTi", "楷体", "STKaiti", serif; }
.comment p { margin: 0; color: #3b3934; line-height: 1.55; white-space: pre-wrap; }
.comment.has-comment p { color: var(--comment-red); }
.comment.is-collapsible p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.comment.is-collapsible.is-expanded p { display: block; overflow: visible; }
.comment-toggle { margin-top: 6px; padding: 0; border: 0; background: transparent; color: #69543d; font-size: .86rem; text-decoration: underline; text-underline-offset: 3px; }
.comment-toggle:hover { background: transparent; color: #3f3225; }

.message { padding: 22px 24px; }
.error { color: var(--danger); border-color: #d9b4ae; background: #fff9f7; }
.empty { color: #68645c; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 7px; margin-top: 26px; }
.pagination a, .pagination span { min-width: 22px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 0; background: rgba(255, 255, 255, .7); font-size: .7rem; text-align: center; text-decoration: none; }
.pagination a:hover { border-color: var(--gold); background: #fff2d5; }
.pagination .current { background: rgba(243, 182, 64, .78); border-color: rgba(243, 182, 64, .88); color: #342200; }
.pagination .disabled, .pagination .ellipsis { color: #999286; border-color: transparent; background: transparent; }
.page-jump { display: flex; align-items: center; gap: 7px; margin-left: 9px; }
.pagination-actions { display: flex; align-items: center; gap: 7px; }
.page-jump label { display: inline; font-size: .88rem; }
.page-jump input[type="number"] { width: 46px; padding: 2px 3px; appearance: textfield; font-size: .7rem; text-align: center; }
.page-jump input[type="hidden"] { display: none; }
.page-jump button { padding: 2px 6px; border-color: rgba(243, 182, 64, .88); background: rgba(243, 182, 64, .78); color: #342200; font-size: .7rem; }
.page-jump button:hover { border-color: #e6a23a; background: #e6a23a; color: #342200; }

.detail-page { width: min(1040px, calc(100% - 80px)); }
.detail-back { margin-bottom: 22px; font-size: .9rem; }
.detail-back a { color: var(--vermilion); text-decoration: none; }
.detail-back a:hover { color: #922926; }
.detail-back-bottom { margin: 26px 0 0; }
.detail-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); background: transparent; }
.detail-header h1 { font-size: clamp(1.85rem, 4vw, 2.65rem); }
.detail-section { margin-bottom: 14px; padding: 22px 28px 24px; }
.detail-section h2 { margin: 0 0 17px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); font-size: 1.28rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 32px; margin: 0; }
.detail-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail-grid div { display: grid; gap: 4px; }
.detail-grid .detail-wide { grid-column: 1 / -1; }
.detail-header .eyebrow { color: #f3b640; }
.full-comment { padding: 0; line-height: 1.9; white-space: pre-wrap; }
.full-comment.has-comment { color: var(--comment-red); }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.tag-list li { padding: 4px 10px; border: 1px solid #e4b3ad; border-radius: 999px; background: #fff0ee; color: var(--comment-red); font-size: .86rem; }
.not-found { max-width: 680px; margin: 80px auto; }
.site-notes { width: 64%; margin: 58px auto 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; line-height: 1.75; text-align: center; }
.site-notes p { margin: 0; }
.site-record { margin-top: 8px !important; }
.site-record a { color: inherit; text-decoration: none; }
.site-record a:hover, .site-record a:focus-visible { color: var(--qinghua-blue); text-decoration: underline; }
.site-record .feedback-entry { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 0; background: rgba(255, 255, 255, .7); color: var(--ink); font-size: .7rem; line-height: 1.25; text-decoration: none; transform: translateX(-1em); }
.site-record .feedback-entry:hover, .site-record .feedback-entry:focus-visible { border-color: var(--gold); background: #fff2d5; color: var(--accent-dark); text-decoration: none; }
.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; }
.dragon-note-trigger { position: fixed; z-index: 0; top: 0; left: 0; width: min(430px, 33vw); height: min(338px, 26vw); padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; cursor: pointer; }
.dragon-note-trigger:hover { border: 0; background: transparent; box-shadow: none; }
.dragon-note-trigger:focus-visible { outline: 2px solid var(--gold); outline-offset: -3px; }
.dragon-note { position: fixed; z-index: 4; top: 28px; left: min(430px, 33vw); width: min(316px, calc(100vw - min(430px, 33vw) - 28px)); padding: 20px 40px 18px 24px; border: 1px solid rgba(174, 181, 192, .92); border-radius: 4px; background: rgba(250, 251, 253, .98); box-shadow: 0 8px 28px rgba(20, 30, 40, .18); color: var(--ink); }
.dragon-note[hidden] { display: none; }
.dragon-note p { margin: 0 0 8px; font-family: "FangSong", "仿宋", "STFangsong", serif; font-size: .88rem; line-height: 1.7; }
.dragon-note p:last-child { margin-bottom: 0; }
.dragon-note-work { color: #f3b640; font-family: "KaiTi", "楷体", "STKaiti", serif; }
.dragon-note-close { position: absolute; top: 11px; right: 12px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; color: var(--muted); font-family: Arial, sans-serif; font-size: 1.35rem; line-height: 1; }
.dragon-note-close:hover, .dragon-note-close:focus-visible { background: rgba(95, 99, 104, .12); color: var(--ink); }
.title-note { position: fixed; z-index: 4; top: 132px; right: max(28px, calc((100vw - 1040px) / 2)); width: min(560px, calc(100vw - 56px)); max-height: calc(100vh - 160px); padding: 22px 42px 20px 26px; overflow-y: auto; border: 1px solid rgba(174, 181, 192, .92); border-radius: 4px; background: rgba(250, 251, 253, .98); box-shadow: 0 8px 28px rgba(20, 30, 40, .18); color: var(--ink); }
.title-note[hidden] { display: none; }
.title-note-intro { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-family: "FangSong", "仿宋", "STFangsong", serif; font-size: .88rem; line-height: 1.7; }
.title-note-intro img { flex: 0 0 auto; width: 174px; height: auto; }
.title-note-sources { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.title-note-sources li { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 3px; font-family: "FangSong", "仿宋", "STFangsong", serif; font-size: .88rem; line-height: 1.55; }
.title-note-sources img { display: block; width: 24px; max-height: 28px; object-fit: contain; }
.title-note-close { position: absolute; top: 11px; right: 12px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; color: var(--muted); font-family: Arial, sans-serif; font-size: 1.35rem; line-height: 1; }
.title-note-close:hover, .title-note-close:focus-visible { background: rgba(95, 99, 104, .12); color: var(--ink); }
.palette-mark { position: fixed; right: 22px; bottom: 24px; z-index: 2; display: grid; gap: 3px; padding: 7px; border: 1px solid rgba(200, 205, 215, .8); border-radius: 5px; background: rgba(255, 255, 255, .82); box-shadow: 0 2px 8px rgba(30, 45, 70, .1); }
.palette-mark span, .palette-mark button { width: 14px; height: 14px; border: 0; border-radius: 2px; padding: 0; }
.palette-mark button { cursor: pointer; }
.palette-gold { background: #f3b640; }
.palette-vermilion { background: var(--vermilion); }
.palette-blue { background: var(--qinghua-blue); }
.palette-jade { background: var(--jade); }
.palette-gray { background: #aeb5c0; }
.palette-note { position: fixed; z-index: 4; right: 52px; bottom: 24px; width: min(316px, calc(100vw - 80px)); padding: 20px 40px 18px 24px; border: 1px solid rgba(174, 181, 192, .92); border-radius: 4px; background: rgba(250, 251, 253, .98); box-shadow: 0 8px 28px rgba(20, 30, 40, .18); color: var(--ink); }
.palette-note[hidden] { display: none; }
.palette-note p { margin: 0; font-family: "FangSong", "仿宋", "STFangsong", serif; font-size: .88rem; line-height: 1.7; }
.palette-note-gold { color: #f3b640; }
.palette-note-vermilion { color: var(--vermilion); }
.palette-note-blue { color: var(--qinghua-blue); }
.palette-note-jade { color: var(--jade); }
.palette-note-close { position: absolute; top: 11px; right: 12px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; color: var(--muted); font-family: Arial, sans-serif; font-size: 1.35rem; line-height: 1; }
.palette-note-close:hover, .palette-note-close:focus-visible { background: rgba(95, 99, 104, .12); color: var(--ink); }
@media (max-width: 980px) {
  .dragon-note-trigger { width: min(430px, 52vw); height: min(338px, 41vw); }
  .dragon-note { top: 18px; left: min(360px, 40vw); width: min(302px, calc(100vw - min(360px, 40vw) - 18px)); }
  .page, .detail-page { width: min(1040px, calc(100% - clamp(64px, calc(28.64vw - 67.6px), 213px))); }
  .download-actions { align-items: stretch; flex-direction: column; }
  .download-range-form { display: flex; flex-wrap: wrap; }
  .download-range-summary { flex: 1 1 230px; }
  .disabled-download { align-self: center; }
}

@media (max-width: 760px) {
  .dragon-background img { width: min(590px, 70vw); }
  .page, .detail-page { padding: 28px 0 56px; }
  .page-header { margin-bottom: 20px; }
  .search-panel { padding: 22px; }
  .search-form, .metadata, .detail-grid { grid-template-columns: 1fr; }
  .download-range-form { display: flex; flex-wrap: wrap; }
  .download-range-summary { flex-basis: 100%; order: 4; }
  .download-range-form .download-button { order: 5; }
  .metadata div { grid-template-columns: 74px minmax(0, 1fr); }
  .comment-heading { grid-template-columns: 1fr; gap: 1px; }
  .comment-date { grid-template-columns: 74px minmax(0, 1fr); }
  .result-card { padding: 14px 20px 15px; }
  .detail-grid .detail-wide { grid-column: auto; }
  .pagination { justify-content: center; }
  .pagination-actions { justify-content: center; }
  .page-jump { width: auto; justify-content: center; margin: 0; white-space: nowrap; }
  .site-notes { width: 88%; margin-top: 42px; }
  .palette-mark { right: 12px; bottom: 16px; gap: 2px; padding: 5px; }
  .palette-mark span, .palette-mark button { width: 11px; height: 11px; }
}

@media (max-width: 480px) {
  .dragon-note-trigger { width: min(320px, 72vw); height: min(252px, 57vw); }
  .dragon-note { top: 12px; left: 14px; width: calc(100vw - 28px); padding: 17px 21px 16px; }
  .title-note { top: 12px; right: 14px; width: calc(100vw - 28px); max-height: calc(100vh - 24px); padding: 18px 36px 17px 20px; }
  .title-note-intro { align-items: flex-start; flex-direction: column; }
  .dragon-background img { width: min(430px, 85vw); }

  .palette-mark { right: 9px; bottom: 12px; padding: 4px; }
  .palette-mark span, .palette-mark button { width: 9px; height: 9px; }
  h1 { font-size: 2rem; }
  .year-range { grid-template-columns: 1fr; }
  .year-separator { display: none; }
  .form-actions { justify-content: space-between; }
  .download-range-form label { flex: 1 1 120px; }
  .download-range-form input[type=number] { flex: 1; min-width: 0; }
  .download-button { flex: 1 1 auto; }
  .metadata div { grid-template-columns: 1fr; gap: 1px; }
}
.memorial-text-section { padding-bottom: 28px; }
.text-version-controls { display: flex; gap: 8px; margin: -3px 0 15px; }
.text-version-controls button { min-height: 30px; padding: 3px 11px; border-color: var(--line); background: #fff; color: var(--ink); font-size: .82rem; box-shadow: none; }
.text-version-controls button[aria-pressed="true"] { border-color: var(--jade); background: #e8f5f2; color: #006b61; }
.memorial-body-text { color: #34312c; font-family: "FangSong", "仿宋", "STFangsong", serif; font-size: 1rem; line-height: 2; white-space: pre-wrap; overflow-wrap: anywhere; }
.text-unavailable { margin: 0; color: var(--muted); }
.keyword-mode-switch { position: relative; display: inline-grid; grid-template-columns: repeat(2, 1fr); width: 72px; height: 28px; padding: 2px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.keyword-mode-switch::before { position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc(50% - 2px); border-radius: 2px; background: var(--vermilion); content: ""; transition: transform .18s ease; }
.keyword-mode-switch.is-or::before { transform: translateX(100%); }
.form-actions .keyword-mode-choice { position: relative; z-index: 1; min-width: 0; height: 24px; padding: 0; border: 0; border-radius: 0; appearance: none; -webkit-appearance: none; box-shadow: none; background: transparent !important; color: #922926; font-size: .82rem; font-weight: 400; line-height: 1; cursor: pointer; }
.form-actions .keyword-mode-choice.is-active { color: #fff; }
.form-actions .keyword-mode-choice:hover { border-color: transparent; background: transparent; color: var(--accent-dark); }
.form-actions .keyword-mode-choice.is-active:hover { color: #fff; }

.keyword-field-heading { display:flex; align-items:center; justify-content:space-between; } .field-keyword-switch { display: inline-grid; grid-template-columns: repeat(2, 1fr); align-items: center; box-sizing: border-box; width: 42px; height: 18px; padding: 1px; border: 0; border-radius: 3px; background: transparent; } .search-form .field-keyword-switch button { min-width: 0; height: 14px; padding: 0; border: 0; border-radius: 0; appearance: none; -webkit-appearance: none; box-shadow: none; background: transparent; color: #922926; font-size: .68rem; font-weight: 400; line-height: 1; } .field-keyword-switch button.is-active { border-radius: 2px; background: var(--vermilion); color: #fff; }

.feedback-page .detail-header { text-align: right; }
.feedback-page .detail-header h1 { font-size: clamp(1.65rem, 3.6vw, 2.4rem); }
.feedback-intro { max-width: 720px; margin: 12px 0 0 auto; color: var(--muted); font-size: .94rem; text-align: right; }
.feedback-section { margin-bottom: 24px; padding: 24px 28px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--paper); box-shadow: 0 1px 2px rgba(30, 45, 70, .08); }
.feedback-section h2 { margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); font-size: 1.2rem; }
.feedback-form, .admin-feedback-form { display: grid; gap: 16px; }
.feedback-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.feedback-form .form-actions button { height: 32px; padding-inline: 12px; font-size: .94rem; line-height: 1.2; }
.feedback-form > label > span, .feedback-form-row > label > span, .admin-feedback-form > label > span { color: var(--jade); font-size: .94rem; font-weight: 600; }

.feedback-form-row input, .feedback-category-picker-wrap select, .feedback-body-field textarea { height: 37px; min-height: 37px; padding: 5px 8px; font-family: inherit; font-size: .86rem; font-weight: 400; line-height: 1.2; }
.feedback-category-picker-wrap select { position: static; width: 100%; margin: 0; padding: 5px 34px 5px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); opacity: 1; appearance: none; -webkit-appearance: none; }
.feedback-category-picker-wrap select:invalid { color: var(--input-placeholder); opacity: 1; }
.feedback-category-picker-wrap .inline-picker-icon { height: 100%; }
.feedback-body-field textarea { padding: 9px 8px; resize: vertical; }
.feedback-privacy-note { padding: 12px 14px; border-left: 3px solid var(--gold); background: #fff9eb; color: #5d513c; font-size: .88rem; line-height: 1.7; }
.feedback-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.feedback-success { margin-bottom: 16px; border-color: #a9d6ce; background: #f1fbf8; color: #006b61; }
.feedback-empty { margin: 0; color: #68645c; }
.feedback-list-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.feedback-list-heading h2 { margin: 0; padding: 0; border: 0; }
.feedback-filter { display: flex; align-items: center; gap: 7px; }
.feedback-filter-picker-wrap select { position: static; width: 105px; height: 30px; margin: 0; padding: 3px 28px 3px 8px; border: 1px solid var(--line); border-radius: 4px; font-size: .82rem; font-weight: 400; opacity: 1; appearance: none; -webkit-appearance: none; }
.feedback-filter-picker-wrap .inline-picker-icon { height: 30px; }
.feedback-list { column-count: 2; column-gap: 10px; }
.feedback-card { display: inline-block; width: 100%; margin: 0 0 10px; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 7px; background: #fff; break-inside: avoid; }
.feedback-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--muted); font-size: .82rem; }
.feedback-category, .feedback-status { padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.feedback-category { background: #e8f5f2; color: #006b61; }
.feedback-status-pending { background: #fff2d5; color: #765000; }
.feedback-status-published { background: #e8f5f2; color: #006b61; }
.feedback-status-hidden { background: #f2f2f2; color: #5f6368; }
.feedback-reference { margin: 8px 0 0; overflow: hidden; color: var(--muted); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.feedback-body { display: -webkit-box; margin: 8px 0 0; overflow: hidden; color: #34312c; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.feedback-list .feedback-body { font-size: .86rem; }
.feedback-card.is-expanded .feedback-body { display: block; overflow: visible; }
.feedback-toggle { margin-top: 5px; padding: 0; border: 0; background: transparent; box-shadow: none; color: #69543d; font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; }
.feedback-toggle:hover, .feedback-toggle:focus-visible { background: transparent; color: #3f3225; }
.feedback-toggle[hidden] { display: none; }
.feedback-reply { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--vermilion); background: #fff7f6; }
.feedback-reply h3 { margin: 0 0 5px; color: var(--vermilion); font-size: 1rem; }
.feedback-reply p { margin: 0; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-feedback-page { max-width: 960px; }
.admin-feedback-form { margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.admin-feedback-form select { max-width: 160px; }
.admin-feedback-form textarea { min-height: 86px; resize: vertical; line-height: 1.6; }
.admin-feedback-form button { justify-self: start; }
@media (max-width: 760px) { .feedback-section { padding: 20px; } .feedback-card { padding: 16px; } .feedback-form-row { grid-template-columns: 1fr; } .feedback-list { column-count: 1; } }
@media (max-width: 380px) { .feedback-list-heading { align-items: flex-start; flex-direction: column; } }
