.schedule-entry-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 8px;
  min-width: 0;
}

.schedule-entry-title strong { min-width: 0; overflow-wrap: anywhere; }
.schedule-import-header-tools { display: flex; align-items: center; gap: 8px; }
.schedule-import-header-tools button[data-schedule-record] { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid color-mix(in srgb, var(--front-red) 25%, transparent); border-radius: 4px; background: var(--front-tint); color: var(--front-red); font: 700 12px Arial, "Microsoft YaHei", sans-serif; cursor: pointer; }
.schedule-import-header-tools button[data-schedule-record] svg { width: 15px; height: 15px; }
.schedule-category {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--category-color), transparent 74%);
  border-radius: 4px;
  background: color-mix(in srgb, var(--category-color), white 91%);
  color: var(--category-color);
  font: 700 11px/1.3 Arial, "Microsoft YaHei", sans-serif;
  white-space: nowrap;
}
.schedule-category-course { --category-color: #315d89; }
.schedule-category-meeting { --category-color: #73538f; }
.schedule-category-travel { --category-color: #247d77; }
.schedule-category-exam { --category-color: #a23b37; }
.schedule-category-shopping { --category-color: #a06126; }
.schedule-category-task { --category-color: #476e42; }
.schedule-category-personal { --category-color: #9a4c70; }
.schedule-category-other { --category-color: var(--front-red); }

#schedule-editor-dialog select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #dfe3de;
  border-radius: 4px;
  background: #fafbf9;
  color: #252b27;
  font: inherit;
  font-size: 0.82rem;
}

.schedule-record-dialog {
  width: min(920px, calc(100% - 28px));
  max-height: min(88vh, 850px);
  max-width: none;
  background: var(--front-paper);
  color: var(--front-ink);
  overflow: auto;
}
.schedule-record-shell { padding: 24px 28px 26px; }
.schedule-record-dialog header { padding-bottom: 15px; }
.schedule-record-modes { display: flex; gap: 7px; flex-wrap: wrap; margin: 18px 0 21px; }
.schedule-record-modes button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, var(--front-ink) 13%, transparent);
  border-radius: 5px;
  background: var(--front-paper);
  color: var(--front-muted);
  font: 700 13px Arial, "Microsoft YaHei", sans-serif;
  cursor: pointer;
}
.schedule-record-modes button[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--front-red) 40%, transparent);
  background: var(--front-tint);
  color: var(--front-red);
}
.schedule-record-modes button:disabled { cursor: default; opacity: .65; }
.schedule-record-modes svg { width: 16px; height: 16px; }
.schedule-record-grid { display: grid; grid-template-columns: minmax(235px, .82fr) minmax(0, 1.4fr); gap: 26px; }
.schedule-record-capture {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 19px;
  border: 1px solid color-mix(in srgb, var(--front-ink) 9%, transparent);
  border-radius: 6px;
  background: var(--front-wash);
}
.schedule-record-clock { display: flex; align-items: center; gap: 10px; font: 700 43px/1.15 ui-monospace, Consolas, monospace; color: var(--front-ink); font-variant-numeric: tabular-nums; }
.schedule-record-light { width: 12px; height: 12px; border-radius: 50%; background: color-mix(in srgb, var(--front-red) 30%, var(--front-paper)); }
.schedule-record-dialog.is-recording .schedule-record-light { background: var(--front-red); animation: schedule-record-pulse 2.2s ease-in-out infinite; }
@keyframes schedule-record-pulse { 50% { opacity: .35; } }
.schedule-record-capture > p { margin: 12px 0 0; color: var(--front-muted); font-size: 13px; line-height: 1.6; }
.schedule-record-capture #schedule-record-status { min-height: 42px; margin-top: 18px; }
.schedule-record-capture small { margin-top: auto; padding-top: 18px; color: var(--front-muted); font-size: 11px; line-height: 1.5; }
.schedule-record-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.schedule-record-buttons button, #schedule-record-download, #schedule-record-save, .schedule-record-note-actions a, .schedule-record-image, .schedule-record-speakers button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--front-ink) 17%, transparent);
  border-radius: 5px;
  background: var(--front-paper);
  color: var(--front-ink);
  font: 700 12px Arial, "Microsoft YaHei", sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.schedule-record-buttons .primary, #schedule-record-save.primary { border-color: var(--front-red); background: var(--front-red); color: var(--front-on-accent, white); }
.schedule-record-buttons button:disabled, #schedule-record-download:disabled, #schedule-record-save:disabled { opacity: .55; cursor: default; }
.schedule-record-buttons svg, #schedule-record-download svg, #schedule-record-save svg, .schedule-record-image svg { width: 15px; height: 15px; }
#schedule-record-player { width: 100%; height: 42px; margin: 4px 0 12px; }
.schedule-record-writing { min-width: 0; }
.schedule-record-writing label { margin-bottom: 13px; color: var(--front-muted); }
.schedule-record-writing input, .schedule-record-writing textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--front-ink) 17%, transparent);
  border-radius: 5px;
  background: var(--front-paper);
  color: var(--front-ink);
  font: 14px/1.6 Arial, "Microsoft YaHei", sans-serif;
}
.schedule-record-writing textarea { min-height: 250px; max-height: 410px; resize: vertical; }
.schedule-record-writing input { min-height: 42px; padding: 9px 11px; }
.schedule-record-writing textarea { padding: 11px 12px; }
.schedule-record-writebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.schedule-record-dialog .schedule-record-image { display: inline-flex; width: auto; margin: 0 !important; color: var(--front-red) !important; }
.schedule-record-speakers { display: flex; gap: 5px; }
#schedule-record-image-status { color: var(--front-muted); font-size: 12px; }
.schedule-record-images { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.schedule-record-images:empty { display: none; }
.schedule-record-images img { width: 56px; height: 56px; object-fit: cover; border: 1px solid color-mix(in srgb, var(--front-ink) 12%, transparent); border-radius: 4px; }
.schedule-record-note-actions { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin-top: 18px; }

html[data-theme="dark"] .schedule-category { background: color-mix(in srgb, var(--category-color) 25%, var(--front-paper)); color: color-mix(in srgb, var(--category-color) 52%, white); border-color: color-mix(in srgb, var(--category-color) 45%, transparent); }
html[data-theme="dark"] #schedule-editor-dialog select { background: #292c2d; color: #e9ece9; border-color: #505556; }
@media (max-width: 700px) {
  .schedule-record-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .schedule-record-shell { padding: 18px 16px 28px; }
  .schedule-record-grid { grid-template-columns: 1fr; gap: 18px; }
  .schedule-record-capture { padding: 15px; }
  .schedule-record-clock { font-size: 34px; }
  .schedule-record-writing textarea { min-height: 220px; }
}
@media (prefers-reduced-motion: reduce) { .schedule-record-dialog.is-recording .schedule-record-light { animation: none; } }
