.desk-bar, .desk-tools, .desk-nav, .desk-record-actions, .desk-dialog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
}
.desk-bar { padding: 1.15rem var(--panel-inset, 24px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.desk-bar label, .desk-tools label { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.desk-bar > span, .desk-meta { color: var(--muted); font-size: .85rem; }
.desk-nav { flex-basis: 100%; }
.desk-tools input, .desk-tools select, .desk-bar select, .desk-form input:not([type=checkbox], [type=radio]), .desk-form select, .desk-form textarea {
  min-width: 0; border: 1px solid var(--control-line); border-radius: 8px; padding: .55rem .65rem; color: var(--ink); background: var(--paper);
}
.desk-tools .button, .desk-nav .button, .desk-record-actions .button { min-height: 40px; }
.panel > :is(.desk-tools, .desk-calendar, .desk-record, .desk-note, .desk-empty) { margin-inline: var(--panel-inset, 24px); }
.panel > :is(.desk-calendar, .desk-record, .desk-note, .desk-empty):last-child { margin-bottom: var(--panel-inset, 24px); }
.desk-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .7rem; }
.desk-day { min-width: 0; min-height: 6.25rem; padding: .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.desk-day > span { display: block; color: var(--muted); font-size: .8rem; margin-bottom: .55rem; }
.desk-day small, .desk-day button { display: block; text-align: left; width: 100%; overflow-wrap: anywhere; }
.desk-day button { padding: .24rem .34rem; margin-top: .23rem; white-space: normal; }
.desk-today { border-color: var(--accent); background: var(--accent-soft); }
.desk-record { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; margin-top: .85rem; }
.desk-record-head, .desk-dialog-head { justify-content: space-between; }
.desk-record-head { display: flex; align-items: start; flex-wrap: wrap; gap: .75rem; }
.desk-note { white-space: pre-wrap; overflow-wrap: anywhere; margin: .55rem 0; line-height: 1.65; }
.desk-record details { margin-top: .4rem; }
.desk-empty { color: var(--muted); padding: .65rem 0; }
.desk-dialog { width: min(45rem, calc(100vw - 1.5rem)); max-height: 88vh; overflow: auto; padding: 1.45rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.desk-dialog::backdrop { background: rgb(31 41 55 / 45%); }
.desk-dialog h2 { margin: 0; }
.desk-form { display: grid; gap: 1rem; margin-top: 1rem; }
.desk-form > label { display: grid; gap: .45rem; font-weight: 600; }
.desk-form > label[hidden] { display: none; }
.desk-form > .desk-check { display: flex; align-items: center; }
.desk-renewal { border: 1px solid var(--line); border-radius: 8px; }
.desk-renewal input { accent-color: var(--accent); }
.desk-status { margin: 0; color: var(--accent-deep); }
.desk-ai p { margin: .25rem 0 0; }
.desk-history-label { margin-top: .8rem; font-size: .85rem; color: var(--muted); }
@media (max-width: 1120px) { .desk-calendar { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 500px) {
  .desk-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desk-dialog { padding: 1rem; }
  .desk-record { padding: .85rem; }
}
