.tf-meeting-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tf-meeting-controls select {
  min-width: 240px;
}

.tf-view-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.tf-view-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.tf-view-tabs button.active {
  background: var(--panel);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.tf-meeting-back-row {
  display: flex;
  justify-content: flex-start;
  margin: -2px 0 10px;
}

.tf-dplus-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(130px, 0.35fr);
  gap: 22px;
  align-items: center;
  margin-bottom: 14px;
  padding: 22px 26px;
  overflow: hidden;
  border: 1px solid #a91f2d;
  border-radius: 12px;
  background: linear-gradient(120deg, #6d101c 0%, #a31529 56%, #7c1421 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(109, 16, 28, 0.2);
}

.tf-dplus-banner.empty {
  grid-template-columns: 1fr;
  border-color: var(--line);
  background: var(--soft);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

.tf-dplus-copy,
.tf-dplus-base {
  display: grid;
  gap: 5px;
}

.tf-dplus-copy span,
.tf-dplus-base span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.tf-dplus-copy strong {
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.25;
}

.tf-dplus-number {
  color: #fff;
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 0.95;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.16);
}

.tf-dplus-base {
  justify-items: end;
  text-align: right;
}

.tf-dplus-base time {
  font-size: 15px;
  font-weight: 900;
}

.tf-summary-list {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.tf-summary-card {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.tf-summary-card.expanded {
  border-color: rgba(215, 0, 91, 0.32);
}

.tf-summary-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px 16px 0;
}

.tf-summary-card-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.tf-summary-card-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tf-summary-card-title time,
.tf-summary-card-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tf-summary-card-title strong {
  font-size: 17px;
  overflow-wrap: anywhere;
}

.tf-summary-card-preview {
  display: grid;
  gap: 5px;
  padding: 0 16px 14px;
}

.tf-summary-card-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.tf-summary-card-preview p strong {
  margin-right: 6px;
  color: var(--ink);
}

.tf-summary-card-detail {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.tf-summary-card-detail > section {
  display: grid;
  gap: 9px;
}

.tf-summary-card-detail h4,
.tf-summary-card-detail p {
  margin: 0;
}

.tf-minutes-excerpt {
  color: var(--text);
  line-height: 1.65;
  white-space: pre-line;
}

.tf-summary-action-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tf-summary-action-group {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tf-summary-action-group > header,
.tf-summary-action-item,
.tf-comment-item header,
.tf-comment-form > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.tf-summary-action-group > header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tf-summary-action-item {
  justify-content: flex-start;
  font-size: 12px;
}

.tf-summary-action-item > strong {
  flex: 1;
  min-width: 0;
}

.tf-summary-action-item.done > strong {
  color: var(--muted);
  text-decoration: line-through;
}

.tf-comment-list,
.tf-summary-comments,
.tf-comment-form {
  display: grid;
  gap: 8px;
}

.tf-comment-item {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tf-comment-item header > div {
  display: grid;
  gap: 2px;
}

.tf-comment-item time {
  color: var(--muted);
  font-size: 11px;
}

.tf-comment-item p {
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tf-comment-form textarea {
  min-height: 76px;
  resize: vertical;
}

.tf-summary-card-footer {
  display: flex;
  justify-content: flex-end;
}

.tf-hero {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--panel) 0%, var(--blue-soft) 52%, var(--brand-soft) 100%);
  box-shadow: var(--shadow-sm);
}

.tf-meeting-overview {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.tf-overview-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tf-overview-facts > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.tf-overview-facts > div > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tf-hero-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 12px 14px;
  align-items: start;
  padding: 16px;
}

.tf-hero-grid label {
  display: grid;
  gap: 6px;
  align-content: start;
}

.tf-hero-grid .tf-hero-title-field {
  grid-column: span 2;
}

.tf-hero-grid .tf-attendee-field {
  grid-column: 1 / -1;
}

.tf-hero-grid .tf-hero-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.tf-hero-grid label span,
.tf-unit-rows span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tf-hero-grid strong {
  min-height: 20px;
  color: var(--ink);
  font-size: 13px;
}

.tf-attendee-field {
  min-width: 210px;
}

.tf-attendee-chips {
  min-height: 28px;
}

.tf-attendee-field textarea {
  min-height: 58px;
}

.tf-attendee-autocomplete {
  display: grid;
  grid-template-columns: minmax(96px, 0.8fr) minmax(130px, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.tf-attendee-autocomplete input {
  min-width: 0;
}

.tf-format-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
}

.tf-format-toolbar button {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
}

.tf-format-toolbar button:hover {
  border-color: var(--brand);
}

.tf-color-group {
  display: inline-flex;
  gap: 4px;
  padding: 0 4px;
}

.tf-color-group span {
  display: block;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(32, 36, 42, 0.15);
  border-radius: 50%;
}

.tf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 14px;
  align-items: start;
}

.tf-main,
.tf-side {
  display: grid;
  gap: 14px;
}

.tf-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.tf-tabs button {
  min-width: 92px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tf-tabs button.active {
  background: var(--panel);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.tf-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tf-team-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tf-team-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.tf-team-head h4 {
  margin: 0;
  font-size: 16px;
}

.tf-section-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}

.tf-team-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.tf-unit-rows {
  display: grid;
  gap: 6px;
}

.tf-unit-rows > div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.tf-unit-chip {
  display: inline-flex;
  max-width: 100%;
  margin: 0 4px 4px 0;
  padding: 3px 7px;
  border: 1px solid #d8e3f2;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.tf-unit-chip.muted {
  border-color: var(--line);
  background: var(--soft);
  color: var(--muted);
}

.tf-rich-editor,
.tf-timeline-editor {
  min-height: 104px;
  max-width: 100%;
  padding: 10px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  line-height: 1.55;
  outline: none;
}

.tf-rich-editor:focus,
.tf-timeline-editor:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(215, 0, 91, 0.12);
}

.tf-rich-editor.readonly,
.tf-timeline-editor.readonly {
  background: var(--soft);
  color: var(--muted);
}

.tf-save-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
}

.tf-revision-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.tf-revision-head,
.tf-revision-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.tf-revision-list {
  display: grid;
  gap: 8px;
}

.tf-revision-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tf-revision-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tf-revision-item span,
.tf-revision-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.tf-archive-panel,
.tf-attachments-panel {
  display: grid;
  gap: 10px;
}

.tf-search-input {
  width: 100%;
}

.tf-archive-list,
.tf-attachment-list {
  display: grid;
  gap: 8px;
}

.tf-archive-item {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
}

.tf-archive-item.active,
.tf-archive-item:hover {
  border-color: rgba(215, 0, 91, 0.42);
  background: var(--brand-soft);
}

.tf-archive-item span {
  display: grid;
  gap: 2px;
}

.tf-archive-item em,
.tf-archive-item small,
.tf-attachment-item span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.tf-attachment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.tf-attachment-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tf-attachment-item a {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.tf-agenda-panel .panel-head,
.tf-action-status-panel .panel-head,
.tf-schedule-board-panel .panel-head,
.tf-team-manager .panel-head,
.tf-ai-panel .panel-head {
  align-items: start;
}

.tf-action-status-panel {
  display: grid;
  gap: 10px;
}

.tf-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.tf-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0e8f62;
}

.tf-action-group {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.tf-action-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 8px;
  align-items: center;
}

.tf-action-row em {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.tf-action-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(150px, 0.8fr) auto;
  gap: 8px;
  padding: 12px;
  border: 1px dashed #b7c7db;
  border-radius: 8px;
  background: var(--blue-soft);
}

.tf-action-item-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(180px, 0.55fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tf-action-item-check {
  padding-top: 5px;
}

.tf-action-item-body,
.tf-action-edit-grid,
.tf-action-send-controls {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.tf-action-item-top,
.tf-action-row-actions,
.tf-action-task-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tf-action-title-input {
  width: 100%;
  font-weight: 800;
}

.tf-action-edit-grid {
  grid-template-columns: minmax(130px, 0.55fr) minmax(0, 1fr);
}

.tf-action-edit-grid textarea {
  min-height: 58px;
}

.tf-action-task-line {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.tf-action-task-line em {
  font-style: normal;
}

.tf-empty-state {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.tf-timeline-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tf-schedule-board-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.tf-schedule-window-actions {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.tf-schedule-window-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.tf-schedule-board-list {
  display: grid;
  gap: 10px;
  max-height: min(68vh, 720px);
  padding: 2px 8px 2px 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.tf-schedule-date-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.tf-schedule-date-card.today {
  border-color: rgba(215, 0, 91, 0.42);
  background: var(--brand-soft);
}

.tf-schedule-date-head {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-content: start;
  align-items: center;
}

.tf-schedule-date-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tf-schedule-column {
  display: grid;
  grid-template-rows: auto minmax(64px, 1fr);
  min-width: 0;
  border-left: 1px solid var(--line);
}

.tf-schedule-column:first-child {
  border-left: 0;
}

.tf-schedule-column > header {
  padding: 9px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.tf-schedule-column-items {
  display: grid;
  align-content: start;
  min-width: 0;
}

.tf-schedule-column-empty {
  padding: 18px 12px;
  color: #c2c8d0;
  text-align: center;
}

.tf-schedule-date-head time {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
}

.tf-today-badge {
  border-color: rgba(215, 0, 91, 0.22);
  background: #f8dfe9;
  color: #8f1748;
}

.tf-schedule-date-entries,
.tf-schedule-entry-items {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.tf-schedule-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 9px;
  border-bottom: 1px solid #edf0f4;
}

.tf-schedule-entry:last-child {
  border-bottom: 0;
}

.tf-schedule-entry.assembly {
  grid-template-columns: minmax(0, 1fr);
}

.tf-schedule-item {
  display: grid;
  grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.tf-schedule-source {
  justify-content: center;
  width: fit-content;
  min-width: 92px;
  white-space: normal;
  text-align: center;
}

.tf-schedule-source.party-a {
  border-color: #e2cdd2;
  background: #f3e6e9;
  color: #783f4b;
}

.tf-schedule-source.party-b {
  border-color: #cad8e8;
  background: #e7eef6;
  color: #355c7c;
}

.tf-schedule-source.tf-team {
  border-color: #cdddcf;
  background: #e8f0e9;
  color: #3f6849;
}

.tf-schedule-source.assembly {
  border-color: #d8cee3;
  background: #eee9f3;
  color: #654c78;
}

.tf-schedule-content {
  min-width: 0;
}

.tf-schedule-content .tf-timeline-editor {
  min-height: 44px;
  padding: 7px 9px;
}

.tf-schedule-content .tf-timeline-editor.readonly {
  border-color: transparent;
  background: transparent;
}

.tf-timeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
  align-items: center;
  max-width: 100%;
}

.tf-schedule-date-input {
  width: 148px;
}

.tf-timeline-calendar-toggle {
  justify-content: flex-start;
  font-size: 12px;
}

.tf-team-form {
  display: grid;
  grid-template-columns: 96px minmax(140px, 1fr) 76px minmax(150px, 1fr) minmax(150px, 1fr) minmax(140px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.tf-team-form select[multiple] {
  min-height: 76px;
}

.tf-team-inline-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.tf-team-inline-form input[name="name"],
.tf-team-inline-form input[name="metaHtml"] {
  grid-column: 1 / -1;
}

.tf-team-manager-list {
  display: grid;
  gap: 4px;
}

.tf-ai-panel {
  position: sticky;
  top: 64px;
}

.tf-ai-history {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.tf-ai-message {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.tf-ai-message.assistant {
  background: var(--panel);
}

.tf-ai-message strong {
  display: block;
  margin-bottom: 6px;
  color: var(--brand);
}

.tf-ai-action-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.tf-ai-action-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.tf-ai-action-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.tf-ai-action-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.tf-ai-compare-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 10px;
}

.tf-compare-progress {
  display: grid;
  gap: 8px;
}

.tf-compare-progress > div {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.tf-compare-progress p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.tf-ai-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.tf-empty-panel {
  border-style: dashed;
}

.tf-modal-backdrop .case-modal {
  width: min(860px, calc(100vw - 28px));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tf-modal-backdrop .case-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  flex: 0 0 auto;
  padding: 22px 24px;
  background: var(--panel);
}

.tf-modal-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.tf-modal-form .field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.tf-modal-form .field > label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.tf-modal-form > .toolbar:last-child,
.tf-modal-form > .toolbar.span-2 {
  position: sticky;
  bottom: -24px;
  z-index: 2;
  justify-content: flex-end;
  margin: 2px -24px -24px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -8px 18px rgba(20, 24, 31, 0.06);
}

.tf-modal-form .span-2 {
  grid-column: 1 / -1;
}

.tf-carry-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tf-bulk-modal {
  max-height: calc(100dvh - 48px);
}

.tf-bulk-preview {
  overflow: auto;
}

.tf-bulk-preview table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.tf-bulk-preview th,
.tf-bulk-preview td {
  padding: 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.tf-bulk-preview textarea {
  width: 100%;
  min-height: 48px;
}

@media (max-width: 1100px) {
  .tf-layout,
  .tf-hero-grid,
  .tf-overview-facts,
  .tf-team-grid,
  .tf-team-form,
  .tf-attachment-form,
  .tf-attachment-item {
    grid-template-columns: 1fr;
  }

  .tf-side,
  .tf-ai-panel {
    position: static;
  }

  .tf-meeting-controls select,
  .tf-timeline-add input,
  .tf-timeline-add select,
  .tf-timeline-add button {
    width: 100%;
  }

  .tf-revision-head,
  .tf-revision-item,
  .tf-ai-compare-bar,
  .tf-attendee-autocomplete,
  .tf-modal-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tf-action-item-card,
  .tf-action-add-form,
  .tf-action-edit-grid {
    grid-template-columns: 1fr;
  }

  .tf-schedule-date-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tf-schedule-column:nth-child(odd) {
    border-left: 0;
  }

  .tf-schedule-column:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .tf-schedule-window-actions,
  .tf-schedule-date-card,
  .tf-schedule-entry,
  .tf-schedule-item,
  .tf-summary-card-heading,
  .tf-summary-action-groups,
  .tf-dplus-banner {
    grid-template-columns: 1fr;
  }

  .tf-schedule-date-columns {
    grid-template-columns: 1fr;
  }

  .tf-schedule-column,
  .tf-schedule-column:nth-child(odd) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .tf-schedule-column:first-child {
    border-top: 0;
  }

  .tf-summary-card-top {
    grid-template-columns: 1fr;
  }

  .tf-summary-card-top > .ghost {
    width: 100%;
  }

  .tf-dplus-banner {
    gap: 12px;
    padding: 18px;
  }

  .tf-dplus-base {
    justify-items: start;
    text-align: left;
  }

  .tf-schedule-window-actions span {
    grid-row: 1;
  }

  .tf-schedule-date-card {
    gap: 10px;
    padding: 12px;
  }

  .tf-schedule-date-head,
  .tf-timeline-actions {
    width: 100%;
  }

  .tf-schedule-source {
    min-width: 0;
    max-width: 100%;
  }

  .tf-schedule-date-input {
    width: 100%;
  }

  .tf-modal-backdrop {
    padding: 6px;
  }

  .tf-modal-backdrop .case-modal {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
  }

  .tf-modal-backdrop .case-modal-head {
    padding: 16px;
  }

  .tf-modal-form {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .tf-modal-form .span-2 {
    grid-column: 1;
  }

  .tf-modal-form > .toolbar:last-child,
  .tf-modal-form > .toolbar.span-2 {
    bottom: -16px;
    margin: 0 -16px -16px;
    padding: 14px 16px;
  }

  .tf-bulk-preview {
    max-width: calc(100vw - 44px);
  }
}

/* --- tf-unit-combobox --- */
.tf-unit-combobox {
  position: relative;
  min-width: 0;
}

.tf-team-form select.tf-unit-combobox-select[multiple] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.tf-unit-combobox-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: text;
}

.tf-unit-combobox:focus-within .tf-unit-combobox-control {
  border-color: var(--brand);
  outline: 1px solid var(--brand);
}

.tf-unit-combobox-chips {
  display: contents;
}

.tf-unit-combobox-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  min-height: 26px;
  padding: 2px 4px 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 700;
}

.tf-unit-combobox-chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-unit-combobox .tf-unit-combobox-chip-remove {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  line-height: 1;
}

.tf-unit-combobox .tf-unit-combobox-chip-remove:hover,
.tf-unit-combobox .tf-unit-combobox-chip-remove:focus-visible {
  background: var(--soft);
  color: var(--brand);
}

.tf-unit-combobox .tf-unit-combobox-input {
  flex: 1 1 110px;
  width: auto;
  min-width: 80px;
  min-height: 28px;
  padding: 2px;
  border: 0;
  outline: 0;
  background: transparent;
}

.tf-unit-combobox-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 240px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tf-unit-combobox .tf-unit-combobox-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: var(--panel);
  text-align: left;
}

.tf-unit-combobox .tf-unit-combobox-option.selected {
  background: var(--brand-soft);
  color: var(--brand);
}

.tf-unit-combobox .tf-unit-combobox-option.selected::after {
  content: "✓";
  margin-left: 8px;
}

.tf-unit-combobox .tf-unit-combobox-option.active {
  outline: 1px solid var(--brand);
}

.tf-unit-combobox-empty {
  padding: 10px 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* --- tf-schedule board redesign (목업 2026-07-21) --- */
.tf-schedule-column.party-a { --col: #ef4444; --col-soft: #fff1f1; --col-line: #fecaca; }
.tf-schedule-column.party-b { --col: #2563eb; --col-soft: #eff6ff; --col-line: #bfdbfe; }
.tf-schedule-column.tf-team { --col: #16a34a; --col-soft: #f0fdf4; --col-line: #bbf7d0; }
.tf-schedule-column.assembly { --col: #9333ea; --col-soft: #faf5ff; --col-line: #e9d5ff; }

.tf-sit-dark .tf-schedule-column.party-a,
[data-theme="dark"] .tf-schedule-column.party-a { --col: #f87171; --col-soft: rgba(239, 68, 68, 0.14); --col-line: rgba(239, 68, 68, 0.38); }
.tf-sit-dark .tf-schedule-column.party-b,
[data-theme="dark"] .tf-schedule-column.party-b { --col: #60a5fa; --col-soft: rgba(37, 99, 235, 0.16); --col-line: rgba(37, 99, 235, 0.4); }
.tf-sit-dark .tf-schedule-column.tf-team,
[data-theme="dark"] .tf-schedule-column.tf-team { --col: #4ade80; --col-soft: rgba(22, 163, 74, 0.15); --col-line: rgba(22, 163, 74, 0.4); }
.tf-sit-dark .tf-schedule-column.assembly,
[data-theme="dark"] .tf-schedule-column.assembly { --col: #c084fc; --col-soft: rgba(147, 51, 234, 0.16); --col-line: rgba(147, 51, 234, 0.4); }

.tf-schedule-date-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.tf-schedule-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--col, var(--line));
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.tf-schedule-column:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.tf-schedule-column > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 8px;
  border-bottom: 0;
  background: transparent;
}

.tf-schedule-column > header .tf-schedule-source {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--col, var(--ink));
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.tf-schedule-count {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  background: var(--soft);
  border-radius: 999px;
  padding: 2px 9px;
}

.tf-schedule-column-items {
  padding: 0 12px;
  flex: 1;
}

.tf-schedule-entry {
  border-bottom: 1px dashed var(--line);
  padding: 9px 0;
}

.tf-schedule-entry:last-child {
  border-bottom: 0;
}

.tf-schedule-column-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.tf-schedule-column-add {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.tf-schedule-column-add:hover {
  background: var(--col-soft, var(--soft));
  color: var(--col, var(--ink));
}

.tf-schedule-column-blank {
  flex: 1;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.tf-schedule-blank-emoji {
  font-size: 24px;
  opacity: 0.55;
}

.tf-schedule-column-blank .tf-schedule-column-add {
  border: 1px dashed var(--line);
  margin-top: 4px;
}

.tf-schedule-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.tf-schedule-legend-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.tf-schedule-legend-dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--line);
}

.tf-schedule-legend-dot.party-a::before { background: #ef4444; }
.tf-schedule-legend-dot.party-b::before { background: #2563eb; }
.tf-schedule-legend-dot.tf-team::before { background: #16a34a; }
.tf-schedule-legend-dot.assembly::before { background: #9333ea; }

.tf-schedule-entry .tf-timeline-actions {
  opacity: 0;
  transition: opacity 0.14s ease;
}

.tf-schedule-entry:hover .tf-timeline-actions,
.tf-schedule-entry:focus-within .tf-timeline-actions {
  opacity: 1;
}

@media (hover: none) {
  .tf-schedule-entry .tf-timeline-actions {
    opacity: 0.65;
  }
}

/* --- tf-schedule-time-chip --- */
.tf-schedule-time-chip {
  display: inline-flex;
  align-items: center;
  margin-right: 5px;
  padding: 1px 6px;
  border: 1px solid var(--col-line);
  border-radius: 999px;
  background: var(--col-soft);
  color: var(--col);
  font-size: 0.8em;
  font-weight: 800;
  line-height: 1.4;
  vertical-align: baseline;
}
