.display-content-panel { min-width: 0; }
.display-subtabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 13px; padding: 5px; border: 1px solid #ded8c7; border-radius: 12px; background: #eeeade; }
.display-subtab { display: grid; flex: 1 1 128px; place-content: center; min-width: 0; min-height: 40px; padding: 9px 12px; border: 1px solid #d2d7cc; border-radius: 8px; background: #fffdf6; color: #34463e; font-size: 12px; font-weight: 750; text-align: center; transition: background .15s,border-color .15s,box-shadow .15s; }
.display-subtab:hover { border-color: #777f69; background: #fff; }
.display-subtab[data-display-submodule="calendar:almanac"].active { border-color: #c74d42; background: #f7e4de; color: #8b3029; box-shadow: inset 0 -3px #c74d42; }
.display-subtab[data-display-submodule="calendar:movie"].active { border-color: #315d94; background: #e3eaf3; color: #24446c; box-shadow: inset 0 -3px #315d94; }
.display-subtab[data-display-submodule="calendar:month_calendar"].active { border-color: #303a36; background: #e2e6e0; color: #17231e; box-shadow: inset 0 -3px #252b28; }
.display-subtab[data-display-submodule="calendar:date_card"].active { border-color: #d5a626; background: #f8efce; color: #6d5013; box-shadow: inset 0 -3px #d5a626; }
.display-subtab[data-display-submodule="calendar:year_progress"].active { border-color: #38835d; background: #e0eee2; color: #285e43; box-shadow: inset 0 -3px #38835d; }
.display-subtab[data-display-submodule="canvas:editor"].active { border-color: #387958; background: #e1eee4; color: #24553a; box-shadow: inset 0 -3px #387958; }
.display-subtab[data-display-submodule="canvas:messages"].active { border-color: #c74d42; background: #f7e4de; color: #8b3029; box-shadow: inset 0 -3px #c74d42; }
.display-calendar-subtabs .display-subtab { flex: 1 1 120px; }
.display-content-panel { border-top: 4px solid #303a36; background: linear-gradient(180deg,#fffdf8 0,#fff 155px); }
.display-content-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 14px 0; }
.display-content-toolbar > label { flex: 0 1 260px; width: 260px; }
.display-content-toolbar > label:first-child { flex-basis: 180px; width: 180px; }
.display-content-toolbar label, .display-content-data-row label, .display-content-preview-actions label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; min-width: 0; }
.display-content-toolbar input, .display-content-toolbar select, .display-content-data-row select, .display-content-preview-actions input,
.dc-field input, .dc-field select, .dc-field textarea, .dc-city-search input, .dc-import textarea, .display-message-form textarea,
.display-message-form select { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; min-height: 36px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.display-content-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: end; }
.display-content-actions .button { width: max-content; flex: 0 0 auto; }
.display-content-form { --content-accent:#397b6b; display: grid; gap: 11px; min-width: 0; padding: 14px; border: 1px solid #e5e1d5; border-radius: 12px; background: #fbfaf5; }
#displayContentForm[data-kind="month_calendar"], #displayContentForm[data-kind="date_card"], #displayContentForm[data-kind="year_progress"] { --content-accent:#3a4140; }
#displayContentForm[data-kind="countdown"], #displayContentForm[data-kind="agenda"], #displayContentForm[data-kind="timetable"], #displayContentForm[data-kind="todo"] { --content-accent:#b64d43; }
#displayContentForm[data-kind="weather"], #displayContentForm[data-kind="news"], #displayContentForm[data-kind="market"] { --content-accent:#346d9b; }
#displayContentForm[data-kind="poetry"], #displayContentForm[data-kind="vocabulary"], #displayContentForm[data-kind="hitokoto"] { --content-accent:#3b825d; }
.dc-fields-grid { display: flex; flex-wrap: wrap; align-items: start; gap: 12px; min-width: 0; }
.dc-field { display: grid; gap: 5px; min-width: 0; color: var(--ink); font-size: 12px; font-weight: 700; }
.dc-field { flex: 0 1 240px; width: 240px; max-width: 100%; }
.dc-field[data-field-type="number"] { flex-basis: 120px; width: 120px; }
.dc-field[data-field-type="date"], .dc-field[data-field-type="month"] { flex-basis: 180px; width: 180px; }
.dc-field[data-field-type="time"] { flex-basis: 140px; width: 140px; }
.dc-field[data-field-type="datetime-local"] { flex-basis: 240px; width: 240px; }
.dc-field[data-field-type="text"] { flex-basis: 280px; width: 280px; }
.dc-field[data-field-type="url"], .dc-field[data-field-type="textarea"] { flex-basis: 560px; width: 560px; }
.dc-field[data-field-type="book-select"], .dc-field[data-field-type="poem-select"], .dc-field[data-field-type="template-ref"] { flex-basis: 340px; width: 340px; }
.dc-field[data-field-type="weekdays"] { flex-basis: 360px; width: 360px; }
.dc-field[data-field-key="text"] { flex-basis: 440px; width: 440px; }
.dc-field > span { line-height: 1.4; }
.dc-field.dc-checkbox { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 9px; border: 1px solid #e7e8df; border-radius: 8px; background: #fff; }
.dc-field.dc-checkbox { flex: 0 1 auto; width: auto; align-self: end; }
.dc-field.dc-checkbox > span { order: 2; }
.dc-field.dc-checkbox input { order: 1; width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--content-accent); }
.dc-group, .dc-row-card { min-width: 0; margin: 0; padding: 10px; border: 1px solid #dfe4dc; border-radius: 9px; }
.dc-group { border-top: 2px solid var(--content-accent); background: #fffefa; }
.dc-group legend { padding: 0 5px; color: var(--content-accent); font-size: 12px; font-weight: 800; }
.dc-array { display: grid; gap: 7px; min-width: 0; }
.dc-array-heading, .dc-row-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.dc-array-heading h3 { margin: 0; font-size: 13px; }
.dc-row-card { display: grid; gap: 8px; border-left: 3px solid var(--content-accent); background: #fffefa; }
.dc-row-heading strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.dc-row-heading .button-small, .dc-scalar-row > .button-small { justify-self: start; align-self: center; width: max-content; min-width: 0; flex: 0 0 auto; padding: 4px 8px; min-height: 27px; }
.dc-row-fields { align-items: end; }
.dc-scalar-list { display: flex; flex-wrap: wrap; gap: 7px; }
.dc-category-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 10px; border: 1px solid #d8ded5; border-radius: 99px; background: #fff; color: #53645a; font-size: 11px; font-weight: 650; cursor: pointer; }
.dc-category-chip input { width: 14px; height: 14px; margin: 0; accent-color: var(--content-accent); }
.dc-category-chip.selected { border-color: var(--content-accent); background: color-mix(in srgb,var(--content-accent) 11%,white); color: #253b30; }
.dc-empty { margin: 0; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; }
.dc-weekday-choices { display: flex; flex-wrap: wrap; gap: 6px 9px; }
.dc-weekday-choices label { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; }
.dc-weekday-choices input { width: 15px; height: 15px; min-height: 0; margin: 0; accent-color: var(--teal); }
.dc-city-search { box-sizing: border-box; width: min(100%, 520px); display: grid; grid-template-columns: minmax(0, 340px) auto; gap: 8px; align-items: center; padding: 12px; border: 1px solid #cad9e4; border-left: 4px solid #346d9b; border-radius: 10px; background: #f3f8fb; }
#displayContentForm[data-kind="weather"] { display: flex; flex-wrap: wrap; align-items: start; gap: 20px; }
#displayContentForm[data-kind="weather"] > .dc-fields-grid { padding-top: 4px; }
.dc-city-search .dc-array-heading { grid-column: 1 / -1; }
.dc-city-search .dc-array-heading h3 { margin: 0; font-size: 14px; }
.dc-city-selected { max-width: min(100%,500px); padding: 5px 9px; overflow-wrap: anywhere; border-radius: 7px; background: #e1edf5; color: #285579; font-size: 11px; font-weight: 750; text-align: right; }
.dc-city-selected[data-selected="false"] { background: #f3e8ce; color: #765414; }
.dc-city-search > input { grid-column: 1; }
.dc-city-search > button { grid-column: 2; }
.dc-city-results { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; font-size: 12px; color: var(--muted); }
.dc-city-result { border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; background: #fff; color: var(--ink); cursor: pointer; }
.dc-city-result:hover { border-color: var(--teal); background: var(--teal-soft); }
.dc-import { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.dc-import summary { cursor: pointer; font-size: 12px; font-weight: 700; }
.dc-import textarea { min-height: 110px; resize: vertical; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.display-content-data-row { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.display-content-data-row > div:first-child { flex: 1 1 250px; min-width: 0; }
.display-content-data-row strong { font-size: 12px; }
.display-content-data-row p { margin: 4px 0 0; }
.display-vocabulary-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; min-width: min(100%, 260px); }
.display-vocabulary-tools label { flex: 1 1 170px; }
.display-content-preview-actions { margin: 12px 0; }
.display-content-schedule { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 16px; }
.display-content-schedule h3 { margin: 2px 0; font-size: 14px; }
.display-content-schedule .screen-history { margin-bottom: 12px; }
.display-message-manager { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 0; padding: 14px; border: 1px solid #e1d7ca; border-left: 4px solid #c74d42; border-radius: 12px; background: #fffaf5; }
.display-message-panel { border-top: 4px solid #c74d42; }
.display-message-manager .section-heading { margin: 0; }
.display-message-manager h3 { margin: 0; font-size: 15px; }
.display-message-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; min-width: 0; }
.display-message-form label { flex: 0 1 240px; width: 240px; max-width: 100%; }
.display-message-form label:first-child { flex-basis: 560px; width: 560px; }
.display-message-form label { display: grid; gap: 5px; min-width: 0; font-size: 12px; font-weight: 700; }
.display-message-form textarea { min-height: 58px; resize: vertical; }
.display-message-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.display-message-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.display-message-item p { grid-column: 1 / -1; margin: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; }
.display-message-item small { align-self: center; color: var(--muted); font-size: 10px; }
.display-message-item .button { grid-column: 2; grid-row: 2; width: max-content; justify-self: end; }
.screen-content-block-picker { display: grid; gap: 4px; min-width: 0; font-size: 11px; font-weight: 700; }
.screen-content-block-picker select { min-width: 0; width: 100%; min-height: 35px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.screen-element.content-block-preview { display: grid; place-content: center; gap: 6px; padding: 8px; border: 1px dashed #315842; background: #e8efe8; color: #24382d; text-align: center; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.screen-element.content-block-preview strong { font-size: 13px; }
.screen-content-ref { font-size: 9px; color: #4a6352; }
.dc-preset-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dc-preset-actions small { color: var(--muted); font-size: 11px; }
.screen-variable-directory { display: grid; gap: 7px; padding: 8px 0; font-size: 11px; }
.screen-variable-directory summary { cursor: pointer; color: var(--muted); }
.screen-variable-directory > div { display: grid; gap: 7px; max-height: 260px; overflow: auto; }
.screen-variable-directory-item { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 7px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.screen-variable-directory-item code { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.screen-variable-directory-item small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.display-tabs[aria-label="显示内容类型"] { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.display-tabs[aria-label="显示内容类型"] .display-tab { gap: 3px; min-height: 48px; padding: 10px 12px; font-size: 12px; }
.display-tabs[aria-label="显示内容类型"] .display-tab span { line-height: 1.3; }
#displayPlanOverview { align-items: center; flex-direction: row; gap: 12px; min-height: 0; margin-bottom: 12px; padding: 10px 15px; border: 1px solid #d8d4c5; border-left: 4px solid #c99d35; border-radius: 10px; background: #fffdf6; color: #26362f; box-shadow: none; }
#displayPlanOverview .eyebrow { margin: 0 0 2px; color: #8c6a27; }
#displayPlanOverview h3 { margin: 0 0 2px; color: #65736a; font-size: 10px; }
#displayPlanOverview p { margin: 0 0 2px; font-size: 16px; line-height: 1.25; }
#displayPlanOverview small { color: #738078; font-size: 10px; line-height: 1.35; }
#displayPlanOverview .plan-side { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 10px; width: auto; }
#displayPlanOverview .plan-choice { gap: 5px; }
#displayPlanOverview .plan-choice span { padding: 5px 8px; border-color: #d7d9ce; border-radius: 6px; background: #f4f3ea; color: #6e796d; font-size: 10px; }
#displayPlanOverview .plan-choice b { color: #968455; font-size: 10px; }
#displayPlanOverview .plan-badge { padding: 5px 8px; border-color: #d6dace; border-radius: 99px; background: #edf3e9; color: #465a4d; }
#displayPlanOverview .plan-badge.running { border-color: #d4ae37; background: #f4e7b8; color: #4c401e; }
#displayPlanOverview[data-mode="none"] { border-left-color: #c7b578; background: #fffdf6; color: #334039; }
#displayPlanOverview[data-mode="almanac"] .plan-choice [data-plan="almanac"], #displayPlanOverview[data-mode="editor"] .plan-choice [data-plan="editor"] { border-color: #d4ae37; background: #f4e7b8; color: #4c401e; }
.dc-field input:focus, .dc-field select:focus, .dc-field textarea:focus, .dc-city-search input:focus { border-color: var(--content-accent, #397b6b); box-shadow: 0 0 0 3px color-mix(in srgb,var(--content-accent, #397b6b) 15%,transparent); outline: 0; }
/* Keep the workspace readable at desktop widths; field length follows its content. */
#display { max-width: 1240px; margin-inline: auto; }
#display .display-intro { display: none; }
body:has(#display:not([hidden])) .main-content { padding-top: 22px; }
body:has(#display:not([hidden])) .page-header { margin-bottom: 16px; padding-bottom: 14px; }
body:has(#display:not([hidden])) .page-header h1 { margin: 0; font-size: 28px; }
body:has(#display:not([hidden])) .page-header .eyebrow,
body:has(#display:not([hidden])) .page-header .page-subtitle { display: none; }
#display .view-heading { margin-bottom: 14px; }
#display .display-subtabs { width: fit-content; max-width: 100%; }
#display .display-subtab { flex: 0 1 160px; }
#display .card-panel { padding: 20px; box-shadow: none; }
#display .section-heading { align-items: center; margin-bottom: 8px; }
#display .section-heading .eyebrow { display: none; }
#display .section-heading h2 { margin: 0; font-size: 23px; }
#display .section-description { margin: 0 0 12px; }
#display .section-block { margin-bottom: 16px; }
#display .display-content-form { gap: 16px; padding: 14px; }
#display .dc-row-card { padding: 10px; }
#display .dc-array-heading { justify-content: flex-start; gap: 12px; }
#display .dc-array-heading > .button { min-height: 30px; padding: 4px 10px; }
#display .dc-city-search .dc-array-heading { justify-content: space-between; }
#display .dc-array[data-array-key="periods"] .dc-row-card { max-width: 620px; }
#display .dc-array[data-array-key="symbols"] .dc-row-card { max-width: 620px; }
#display .display-content-data-row > div:first-child { flex: 0 1 620px; }
#display .display-content-preview-actions label { width: 180px; }
#display .display-content-schedule { padding-top: 12px; margin-top: 12px; }
#displayPlanOverview > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
#displayPlanOverview .eyebrow, #displayPlanOverview p { margin: 0; }
#displayPlanOverview h3, #displayPlanOverview .plan-choice { display: none; }
#displayPlanOverview[data-mode="none"] small { display: none; }
#display .screen-template-main { display: flex; flex-wrap: wrap; gap: 12px; }
#display .screen-template-main label { width: 290px; max-width: 100%; }
#display .screen-template-quick { justify-content: flex-start; gap: 6px; }
#display .screen-template-quick .button { min-height: 32px; padding: 5px 9px; }
@media (max-width: 1000px) {
  .display-tabs[aria-label="显示内容类型"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .display-message-form button { justify-self: start; }
}
@media (max-width: 520px) {
  .display-tabs[aria-label="显示内容类型"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #displayPlanOverview { align-items: flex-start; flex-direction: column; }
  #displayPlanOverview .plan-side { width: 100%; justify-content: space-between; }
  #display .card-panel { padding: 12px; }
  #display .display-content-form { padding: 10px; }
  .display-content-toolbar > label, .display-content-toolbar > label:first-child { flex-basis: 100%; width: 100%; }
  .display-message-list { grid-template-columns: minmax(0, 1fr); }
  .dc-field { max-width: 100%; }
  .dc-city-search { padding: 10px; }
  .dc-city-search .dc-array-heading { flex-wrap: wrap; }
  .dc-city-search > button { padding-inline: 9px; }
  .display-content-data-row { align-items: stretch; }
  .display-vocabulary-tools { width: 100%; }
  .display-content-preview-actions { align-items: stretch; }
  .display-content-preview-actions label { width: 100%; }
}
