:root {
  --bg: #08112b;
  --bg-panel: #0b1533;
  --bg-panel-2: #0f1c44;
  --line: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --danger: #ef4444;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
}

body {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.cf-root[data-page="home"] {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 220px;
  grid-template-rows: minmax(0, 1fr) 110px;
  height: 100vh;
  min-height: 0;
  background: var(--bg);
  color: var(--text);
}

.cf-sidebar-left,
.cf-sidebar-right {
  min-height: 0;
  overflow: auto;
  background: var(--bg-panel);
  border-right: 1px solid var(--line);
}

.cf-sidebar-right {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.cf-sidebar-header,
.cf-main-header,
.cf-chat-header {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.cf-tree-toolbar {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.cf-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-panel-2);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}

.cf-btn.small {
  padding: 4px 8px;
  font-size: 12px;
}

.cf-btn.danger {
  color: #fff;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.45);
}

.cf-danger-link {
  color: #b91c1c !important;
}

.cf-btn:hover {
  filter: brightness(1.08);
}

.cf-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-panel);
}

.cf-selected {
  font-size: 14px;
}

.cf-muted {
  color: var(--muted);
}

.cf-calendar {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 8px;
}

.fc {
  height: 100% !important;
  color: var(--text);
}

.fc .fc-scrollgrid,
.fc .fc-scrollgrid table {
  border-color: var(--line);
}

.fc .fc-col-header-cell-cushion,
.fc .fc-daygrid-day-number,
.fc .fc-toolbar-title {
  color: var(--text);
}

.fc .fc-button {
  background: var(--bg-panel-2);
  border-color: var(--line);
  color: var(--text);
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background: var(--accent);
  border-color: var(--accent);
}

.fc .fc-day-today {
  background: rgba(255, 226, 89, 0.14) !important;
}

.fc .fc-daygrid-day-top {
  justify-content: center;
}

.fc .fc-daygrid-day-number {
  float: none !important;
  width: 100%;
  text-align: center;
  padding: 4px 0;
}

/* Month: no internal scroll */
.fc-dayGridMonth-view .fc-scroller,
.fc-dayGridMonth-view .fc-scroller-liquid-absolute {
  overflow: hidden !important;
}

.fc-dayGridMonth-view .fc-daygrid-day-frame {
  min-height: 72px !important;
  height: auto !important;
}

.fc-dayGridMonth-view .fc-daygrid-day-events {
  min-height: 2.2em;
}

/* Week pseudo gantt */
.fc-dayGridWeek-view .fc-event.cf-week-timed {
  position: relative;
  left: calc(var(--cf-start-pct, 0) * 1%);
  width: calc(var(--cf-width-pct, 100) * 1%);
  background: var(--cf-bar-color, var(--accent)) !important;
  border-color: var(--cf-bar-color, var(--accent)) !important;
}

/* Day */
.fc-timeGridDay-view .fc-timegrid-event {
  border-radius: 6px;
}

.fc-timeGridDay-view .fc-timegrid-event .fc-event-main {
  padding: 2px 4px;
  font-size: 12px;
}

/* Tree */
.cf-tree {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.cf-tree-item,
.cf-tree li {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  cursor: pointer;
  user-select: none;
}

.cf-tree-item.active,
.cf-tree li.active {
  background: rgba(59, 130, 246, 0.18);
}

.cf-tree-toggle {
  width: 18px;
  height: 18px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}

.cf-tree-toggle.placeholder {
  visibility: hidden;
}

.cf-tree-name {
  flex: 1 1 auto;
}

.indent {
  display: inline-block;
  flex: none;
}

/* Right sidebar */
#cf-members {
  padding: 8px;
}

.cf-member-row,
.cf-friend-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-panel-2);
  cursor: pointer;
}

.cf-member-main {
  min-width: 0;
  overflow: hidden;
}

.cf-member-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cf-member-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cf-member-role {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cf-select {
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 6px;
  max-width: 84px;
}

/* Chat */
.cf-chatbar {
  min-height: 110px;
  max-height: 110px;
  display: grid;
  grid-template-rows: 28px 1fr 44px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  z-index: 20;
}

.cf-chat-header,
.cf-chat-messages,
.cf-chat-form {
  background: var(--bg);
}

.cf-chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
}

.cf-chat-messages {
  min-height: 0;
  overflow: auto;
  padding: 6px 8px;
}

.cf-chat-line {
  margin: 0 0 6px 0;
  font-size: 12px;
}

.cf-chat-line .who {
  font-weight: 700;
  margin-right: 6px;
}

.cf-chat-line .at {
  color: var(--muted);
  margin-right: 6px;
}

.cf-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 6px 8px;
  border-top: 1px solid var(--line);
}

#cf-chat-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--bg-panel-2);
  color: var(--text);
}

/* Modal */
.cf-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.cf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.cf-modal-panel {
  position: relative;
  width: min(640px, calc(100vw - 32px));
  margin: 80px auto 0;
  background: #fff;
  color: #111827;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.cf-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
}

.cf-modal-body {
  padding: 14px;
}

.cf-field {
  margin-bottom: 12px;
}

.cf-field label {
  display: block;
  margin-bottom: 4px;
  color: #475569;
  font-size: 13px;
}

.cf-field input[type="text"],
.cf-field input[type="datetime-local"] {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
}

.cf-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cf-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#cf-ev-meta {
  color: #64748b;
  font-size: 12px;
}

/* scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.25) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.25);
  border-radius: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}


/* composer overlay like ChatGPT */
.cf-chatbar {
  position: relative;
  overflow: visible;
  transition: max-height .18s ease, min-height .18s ease;
}

.cf-chatbar.expanded {
  min-height: 110px;
  max-height: 110px;
  overflow: visible;
}

.cf-chatbar.expanded .cf-chat-form {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 5;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
}

.cf-chatbar.expanded .cf-chat-messages {
  padding-bottom: 120px;
}

#cf-chat-input {
  resize: none;
  min-height: 38px;
  max-height: 120px;
  line-height: 1.4;
}

.cf-chatbar.expanded #cf-chat-input {
  min-height: 88px;
}

/* share requests */
.cf-share-requests {
  padding: 8px;
  border-top: 1px solid var(--line);
}

.cf-share-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cf-share-request {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
  background: var(--bg-panel-2);
}

.cf-share-request-title {
  font-size: 13px;
  font-weight: 700;
}

.cf-share-request-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.cf-share-request-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

/* share modal */
.cf-share-modal-panel { max-width: 760px; }
.cf-share-list {
  max-height: 220px;
  overflow: auto;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.cf-check-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  margin-bottom: 8px;
  color: #111827;
}

.cf-check-row small {
  grid-column: 2;
}

/* === CF_CHATBAR_FULL_WIDTH_FIX === */
.cf-root[data-page="home"] > .cf-chatbar {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

.cf-root[data-page="home"] > .cf-chatbar .cf-chat-header,
.cf-root[data-page="home"] > .cf-chatbar .cf-chat-messages,
.cf-root[data-page="home"] > .cf-chatbar .cf-chat-form {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

.cf-root[data-page="home"] > .cf-chatbar .cf-chat-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
}

.cf-root[data-page="home"] > .cf-chatbar #cf-chat-input {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.cf-root[data-page="home"] > .cf-chatbar .cf-chat-messages {
  overflow: auto !important;
}

.cf-root[data-page="home"] > .cf-chatbar .cf-chat-header {
  padding-left: 8px !important;
  padding-right: 8px !important;
}
/* === END CF_CHATBAR_FULL_WIDTH_FIX === */


/* color palette */
.cf-color-palette {
  display: grid;
  grid-template-columns: repeat(5, 24px);
  gap: 8px;
  margin-top: 8px;
}

.cf-color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.65);
  cursor: pointer;
  padding: 0;
  appearance: none;
}

.cf-color-swatch.active {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

/* === CF_CHAT_EXPAND_HIDE_LINK_PATCH === */
#cf-ev-add-link {
  display: none !important;
}

.cf-root[data-page="home"] > .cf-chatbar {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

.cf-root[data-page="home"] > .cf-chatbar .cf-chat-header,
.cf-root[data-page="home"] > .cf-chatbar .cf-chat-messages,
.cf-root[data-page="home"] > .cf-chatbar .cf-chat-form {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

.cf-chatbar {
  position: relative;
  transition: height 0.18s ease, max-height 0.18s ease, box-shadow 0.18s ease;
}

.cf-chatbar.expanded {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 320px !important;
  max-height: 320px !important;
  grid-template-rows: 36px 1fr 64px !important;
  z-index: 400;
  box-shadow: 0 -16px 36px rgba(0, 0, 0, 0.35);
}

.cf-chatbar.expanded .cf-chat-header,
.cf-chatbar.expanded .cf-chat-messages,
.cf-chatbar.expanded .cf-chat-form {
  background: var(--bg) !important;
}

.cf-chatbar.expanded .cf-chat-messages {
  min-height: 0;
  overflow: auto;
  padding: 10px 12px;
}

.cf-chatbar.expanded .cf-chat-form {
  display: grid !important;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 12px;
  align-items: stretch;
}

.cf-chatbar.expanded #cf-chat-input {
  min-height: 44px;
  padding: 12px 14px;
  font-size: 14px;
}
/* === END CF_CHAT_EXPAND_HIDE_LINK_PATCH === */


/* === CF_TIMEGRID_WEEK_FIX === */
.fc-timeGridWeek-view .fc-timegrid-event {
  border-radius: 6px;
}
.fc-timeGridWeek-view .fc-timegrid-event .fc-event-main {
  padding: 2px 4px;
  font-size: 12px;
}
/* === END CF_TIMEGRID_WEEK_FIX === */

/* === CF_GROUP_UI_FIX === */

#cf-group-tree li,
#cf-group-tree .cf-tree-item {
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
}

.cf-tree-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity .15s ease;
}

#cf-group-tree li:hover .cf-tree-actions,
#cf-group-tree li:focus-within .cf-tree-actions,
#cf-group-tree .cf-tree-item:hover .cf-tree-actions,
#cf-group-tree .cf-tree-item:focus-within .cf-tree-actions {
  opacity: 1;
}

.cf-tree-action {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255,255,255,.12);
  background: var(--bg-panel-2);
  color: var(--text);
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  line-height: 1;
}

.cf-tree-action:hover {
  filter: brightness(1.08);
}

@media (hover: none), (max-width: 900px) {
  .cf-tree-actions {
    opacity: 1;
  }

  .cf-tree-action {
    width: 28px;
    height: 28px;
  }
}

#cf-group-modal .cf-modal-panel {
  width: min(520px, calc(100vw - 32px));
}

#cf-group-modal .cf-field select,
#cf-group-modal .cf-field input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: #111827;
}

/* メンバー行のはみ出し再防止 */
.cf-member-row {
  grid-template-columns: minmax(0, 1fr) auto !important;
}

.cf-member-main {
  min-width: 0;
  overflow: hidden;
}

.cf-member-actions {
  flex-shrink: 0;
}
/* === END CF_GROUP_UI_FIX === */

/* === CF_SEARCH_AND_GROUP_MODAL === */
.cf-sidebar-header,
.cf-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cf-sidebar-header h2,
.cf-main-header h2 {
  margin: 0;
}

.cf-main-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cf-main-actions .cf-btn {
  white-space: nowrap;
}

.cf-inline-form,
.cf-logout-form,
.cf-mobile-menu-form {
  margin: 0;
}

.cf-inline-form {
  display: inline-flex;
}

.cf-mobile-menu-form {
  display: block;
}

.cf-mobile-menu-form .cf-mobile-menu-btn {
  width: 100%;
}

.cf-field input[type="search"],
.cf-field select,
.cf-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #111827;
}

.cf-field textarea {
  resize: vertical;
}

.cf-field-inline-action {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.cf-inline-note {
  margin-bottom: 12px;
}

.cf-form-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
  font-size: 13px;
}

.cf-notice {
  margin-bottom: 16px;
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 12px;
}

.cf-group-modal-panel,
.cf-search-modal-panel {
  width: min(760px, calc(100vw - 32px));
}

.cf-group-friends-section,
.cf-search-section {
  margin-bottom: 16px;
}

.cf-search-section-title {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.cf-search-results {
  max-height: 260px;
  overflow: auto;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}

.cf-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
}

.cf-search-row:last-child {
  border-bottom: 0;
}

.cf-search-row.clickable {
  cursor: pointer;
}

.cf-search-row.clickable:hover {
  background: #f8fafc;
}

.cf-search-row-main {
  min-width: 0;
}

.cf-search-row-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  word-break: break-word;
}

.cf-search-row-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cf-search-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cf-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  border: 1px solid #cbd5e1;
  color: #334155;
  background: #f8fafc;
}

.cf-tag.success {
  color: #166534;
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}

.cf-tag.pending {
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
}

.cf-empty-state {
  padding: 12px;
  font-size: 13px;
  color: #64748b;
}

.cf-group-friend-list .cf-check-row,
#cf-group-friend-list .cf-check-row {
  margin-bottom: 0;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
}

#cf-group-friend-list .cf-check-row:last-child {
  border-bottom: 0;
}

#cf-group-friend-list .cf-check-row span {
  color: #111827;
}

#cf-group-friend-list .cf-check-row small {
  color: #64748b;
}
/* === END CF_SEARCH_AND_GROUP_MODAL === */


/* === CF_RENDER_FREEZE_HOTFIX === */
.cf-chatbar.expanded {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  height: 110px !important;
  max-height: 110px !important;
  min-height: 110px !important;
  grid-template-rows: 28px 1fr 44px !important;
  z-index: 20 !important;
  box-shadow: none !important;
}

.cf-chatbar.expanded .cf-chat-header,
.cf-chatbar.expanded .cf-chat-messages,
.cf-chatbar.expanded .cf-chat-form {
  background: var(--bg) !important;
}

.cf-chatbar.expanded .cf-chat-form {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  display: grid !important;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 6px 8px !important;
  align-items: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.cf-chatbar.expanded .cf-chat-messages {
  padding: 6px 8px 6px !important;
}

.cf-chatbar.expanded #cf-chat-input {
  min-height: 38px !important;
  max-height: 84px !important;
  padding: 8px 10px !important;
  font-size: 14px !important;
}
/* === END CF_RENDER_FREEZE_HOTFIX === */


/* === CF_MOBILE_DRAWER_LAYOUT === */
.cf-mobile-overlay,
.cf-mobile-menu {
  display: none;
}

@media (max-width: 900px) {
  html,
  body {
    height: 100dvh;
  }

  body {
    overflow: hidden;
  }

  .cf-root[data-page="home"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    height: 100dvh;
    min-height: 100dvh;
    position: relative;
    overflow: hidden;
  }

  .cf-root[data-page="home"] > .cf-main {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    padding-bottom: 72px;
  }

  .cf-root[data-page="home"] > .cf-chatbar {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 64px;
    max-height: 64px;
    height: 64px;
    grid-template-rows: 28px auto;
    background: rgba(8, 17, 43, 0.98);
    backdrop-filter: blur(10px);
    z-index: 240;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-header {
    padding: 4px 10px;
    font-size: 12px;
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-messages {
    display: none;
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-form {
    border-top: 0;
    padding: 6px 8px 8px;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px;
    align-items: center;
  }

  .cf-root[data-page="home"] > .cf-chatbar #cf-chat-input,
  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-form .cf-btn {
    font-size: 16px !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar #cf-chat-input {
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 10px 12px !important;
    line-height: 1.35;
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-form .cf-btn {
    min-width: 64px;
    min-height: 44px;
    padding: 0 14px;
    align-self: stretch;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar,
  .cf-root[data-page="home"] > .cf-chatbar.expanded {
    min-height: min(58dvh, 420px) !important;
    max-height: min(58dvh, 420px) !important;
    height: min(58dvh, 420px) !important;
    grid-template-rows: 32px minmax(0, 1fr) auto !important;
    z-index: 260;
    box-shadow: 0 -18px 36px rgba(0, 0, 0, 0.38);
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-messages,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-messages {
    display: block;
    min-height: 0;
    overflow: auto;
    padding: 8px 10px 4px !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-form,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-form {
    padding: 8px 10px 10px !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar #cf-chat-input,
  .cf-root[data-page="home"] > .cf-chatbar.expanded #cf-chat-input {
    min-height: 72px !important;
    max-height: 132px !important;
  }

  .cf-main-header {
    padding: 8px;
    gap: 8px;
  }

  .cf-selected {
    min-width: 0;
  }

  #cf-selected-group {
    display: inline-block;
    max-width: calc(100vw - 112px);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
  }

  .cf-main-actions {
    flex-wrap: nowrap;
  }

  #cf-mode-home,
  #cf-open-search,
  .cf-logout-form {
    display: none !important;
  }

  #cf-create-group {
    min-width: 40px;
    min-height: 36px;
    padding: 4px 0;
    font-size: 18px;
    line-height: 1;
  }

  .cf-calendar {
    padding: 6px 6px 0;
    overflow: auto;
  }

  .fc {
    min-height: 100%;
  }

  .fc .fc-toolbar {
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }

  .fc .fc-toolbar-title {
    font-size: 16px;
  }

  .fc .fc-button {
    padding: 6px 8px;
    font-size: 12px;
  }

  .fc .fc-header-toolbar {
    margin-bottom: 0.5em;
  }

  .cf-calendar.cf-month-view .fc-scrollgrid-sync-table tbody tr {
    height: var(--cf-month-cell-size, 48px) !important;
  }

  .cf-calendar.cf-month-view .fc-daygrid-day-frame {
    min-height: var(--cf-month-cell-size, 48px) !important;
    max-height: var(--cf-month-cell-size, 48px) !important;
    height: var(--cf-month-cell-size, 48px) !important;
    overflow: hidden !important;
  }

  .cf-calendar.cf-month-view .fc-daygrid-day-events {
    min-height: 0;
    max-height: calc(var(--cf-month-cell-size, 48px) - 18px);
    overflow: hidden;
  }

  .cf-calendar.cf-month-view .fc-daygrid-day-bottom {
    margin-top: 1px;
  }

  .cf-sidebar-left,
  .cf-sidebar-right {
    position: fixed;
    top: 0;
    bottom: 64px;
    width: min(86vw, 340px);
    max-width: 340px;
    z-index: 220;
    opacity: 0;
    pointer-events: none;
    overflow: auto;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, opacity 0.2s ease;
    will-change: transform;
  }

  .cf-sidebar-left {
    left: 0;
    transform: translateX(-105%);
    border-right: 1px solid var(--line);
  }

  .cf-sidebar-right {
    right: 0;
    transform: translateX(105%);
    border-left: 1px solid var(--line);
  }

  .cf-root.cf-mobile-left-open .cf-sidebar-left,
  .cf-root.cf-mobile-right-open .cf-sidebar-right {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .cf-mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 210;
  }

  .cf-root.cf-mobile-left-open .cf-mobile-overlay,
  .cf-root.cf-mobile-right-open .cf-mobile-overlay,
  .cf-root.cf-mobile-menu-open .cf-mobile-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .cf-mobile-menu {
    display: block;
    position: fixed;
    top: 58px;
    right: 12px;
    width: min(76vw, 240px);
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(11, 21, 51, 0.98);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
    z-index: 230;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
  }

  .cf-root.cf-mobile-menu-open .cf-mobile-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .cf-mobile-menu-btn {
    width: 100%;
    display: block;
    margin: 0;
    padding: 11px 12px;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
  }

  .cf-mobile-menu-btn:hover,
  .cf-mobile-menu-btn:focus-visible {
    background: rgba(59, 130, 246, 0.18);
    outline: none;
  }

  .cf-sidebar-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-panel);
  }
}

@media (max-width: 640px) {
  .cf-field-row {
    grid-template-columns: 1fr;
  }

  .cf-modal-panel,
  .cf-share-modal-panel,
  .cf-group-modal-panel,
  .cf-search-modal-panel {
    width: min(calc(100vw - 16px), 640px);
    margin-top: 24px;
    max-height: calc(100vh - 48px);
  }

  .cf-modal-body {
    max-height: calc(100vh - 120px);
    overflow: auto;
  }
}

@media (max-width: 420px) {
  .fc .fc-toolbar-title {
    font-size: 14px;
  }

  .fc .fc-button {
    padding: 5px 6px;
    font-size: 11px;
  }

  .cf-calendar.cf-month-view {
    --cf-month-cell-size: 42px;
  }

  .fc .fc-daygrid-day-number,
  .fc .fc-col-header-cell-cushion {
    font-size: 12px;
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-form {
    grid-template-columns: minmax(0, 1fr) 64px !important;
  }
}
/* === END CF_MOBILE_DRAWER_LAYOUT === */


/* === CF_MOBILE_USABILITY_TUNE_20260320 === */
@media (hover: none), (max-width: 900px) {
  #cf-group-tree .cf-tree-actions,
  #cf-group-tree li .cf-tree-actions,
  #cf-group-tree .cf-tree-item .cf-tree-actions {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

.cf-calendar.cf-month-view .fc-daygrid-day-frame {
  min-height: 0 !important;
}

.fc-dayGridMonth-view .fc-daygrid-event-harness {
  margin-top: 0 !important;
}

.fc-dayGridMonth-view .fc-daygrid-block-event {
  min-height: 12px;
  border-radius: 4px;
}

.fc-dayGridMonth-view .fc-daygrid-block-event .fc-event-main {
  padding: 0 3px !important;
  line-height: 12px;
  font-size: 9px;
}

.fc-dayGridMonth-view .fc-event-time {
  display: none !important;
}

.fc-dayGridMonth-view .fc-event-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cf-modal {
  z-index: 620;
}

@media (max-width: 900px) {
  .cf-root[data-page="home"] > .cf-chatbar {
    min-height: 60px;
    max-height: 60px;
    height: 60px;
    grid-template-rows: 24px auto;
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-header {
    padding: 4px 10px 2px;
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-form {
    padding: 6px 8px 8px;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar,
  .cf-root[data-page="home"] > .cf-chatbar.expanded {
    position: fixed !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    min-height: min(44dvh, 320px) !important;
    max-height: min(44dvh, 320px) !important;
    height: min(44dvh, 320px) !important;
    grid-template-rows: 28px minmax(0, 1fr) auto !important;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    overflow: hidden;
    box-shadow: 0 -18px 36px rgba(0, 0, 0, 0.38);
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-header,
  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-messages,
  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-form,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-header,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-messages,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-form {
    background: rgba(8, 17, 43, 0.98) !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-messages,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-messages {
    display: block;
    min-height: 0;
    overflow: auto;
    padding: 8px 10px 4px !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-form,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-form {
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar #cf-chat-input,
  .cf-root[data-page="home"] > .cf-chatbar.expanded #cf-chat-input {
    min-height: 64px !important;
    max-height: 104px !important;
  }

  .fc-dayGridMonth-view .fc-daygrid-day-frame {
    min-height: 48px !important;
  }

  .cf-modal-panel,
  .cf-share-modal-panel,
  .cf-group-modal-panel,
  .cf-search-modal-panel {
    width: min(calc(100vw - 12px), 640px);
    margin: 8px auto 0;
    max-height: calc(100dvh - 16px);
    display: flex;
    flex-direction: column;
  }

  .cf-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-bottom: 12px;
  }

  .cf-modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: 12px;
    padding-top: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e5e7eb;
    background: #fff;
  }
}

@media (max-width: 420px) {
  .fc-dayGridMonth-view .fc-daygrid-block-event {
    min-height: 13px;
  }

  .fc-dayGridMonth-view .fc-daygrid-block-event .fc-event-main {
    padding: 0 3px !important;
    line-height: 13px;
    font-size: 9px;
  }
}
/* === END CF_MOBILE_USABILITY_TUNE_20260320 === */


/* === CF_PUBLIC_POLICY_PAGES === */
.cf-policy-page {
  height: 100vh;
  overflow: auto;
  box-sizing: border-box;
  padding: 24px 16px;
  background: var(--bg);
}

.cf-policy-card {
  max-width: 860px;
  margin: 0 auto;
  background: #ffffff;
  color: #111827;
  border-radius: 16px;
  padding: 24px 22px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.cf-policy-card h1,
.cf-policy-card h2 {
  color: #111827;
}

.cf-policy-card h1 {
  margin: 0 0 12px;
  font-size: 28px;
}

.cf-policy-card h2 {
  margin: 24px 0 10px;
  font-size: 18px;
}

.cf-policy-card p,
.cf-policy-card li,
.cf-policy-card code {
  color: #334155;
  line-height: 1.7;
}

.cf-policy-card ul,
.cf-policy-card ol {
  margin: 8px 0 0 22px;
  padding: 0;
}

.cf-policy-lead {
  margin: 0 0 16px;
}

.cf-policy-notice {
  margin: 18px 0 10px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  border-radius: 12px;
}

.cf-policy-notice.cf-danger-notice {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.cf-delete-email a {
  font-weight: 700;
}

.cf-delete-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cf-account-delete-form {
  margin-top: 18px;
}

.cf-account-delete-submit {
  font-weight: 700;
}

.cf-policy-links,
.cf-auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cf-policy-links {
  margin-top: 18px;
}

.cf-policy-meta {
  margin-top: 20px;
  color: #64748b !important;
  font-size: 13px;
}

.cf-login .cf-auth-links {
  margin-top: 18px;
}

@media (max-width: 640px) {
  .cf-policy-page {
    padding: 12px 10px 18px;
  }

  .cf-policy-card {
    padding: 18px 16px;
    border-radius: 12px;
  }

  .cf-policy-card h1 {
    font-size: 24px;
  }
}
/* === END CF_PUBLIC_POLICY_PAGES === */

/* === CF_AI_CHAT_MVP === */
.cf-root[data-page="home"] > .cf-chatbar {
  min-height: 136px;
  max-height: 136px;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.cf-root[data-page="home"] > .cf-chatbar .cf-chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cf-chat-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.cf-chat-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-panel-2);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.cf-chat-tab.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.cf-ai-line {
  margin: 0 0 10px 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.cf-ai-line.user {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.18);
}

.cf-ai-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11px;
}

.cf-ai-role {
  font-weight: 700;
}

.cf-ai-at {
  color: var(--muted);
}

.cf-ai-body {
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.cf-ai-recommendations {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.cf-ai-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.cf-ai-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: var(--bg-panel);
}

.cf-ai-card-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.cf-ai-card-desc {
  font-size: 12px;
  margin-bottom: 4px;
}

.cf-ai-card-meta,
.cf-ai-card-reason {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  line-height: 1.45;
}

.cf-ai-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

@media (max-width: 900px) {
  .cf-root[data-page="home"] > .cf-chatbar {
    min-height: 84px;
    max-height: 84px;
    height: 84px;
    grid-template-rows: auto auto;
  }

  .cf-chat-tabs {
    width: 100%;
    order: 3;
    margin-left: 0;
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-header {
    align-items: flex-start;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar,
  .cf-root[data-page="home"] > .cf-chatbar.expanded {
    min-height: min(52dvh, 360px) !important;
    max-height: min(52dvh, 360px) !important;
    height: min(52dvh, 360px) !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
  }

  .cf-ai-card-actions .cf-btn {
    flex: 1 1 auto;
  }
}
/* === END CF_AI_CHAT_MVP === */


/* === CF_AI_CHAT_DESKTOP_EXPAND_RESTORE === */
@media (min-width: 901px) {
  .cf-root[data-page="home"] > .cf-chatbar {
    position: relative;
    overflow: visible;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    min-height: min(42vh, 340px) !important;
    max-height: min(42vh, 340px) !important;
    height: min(42vh, 340px) !important;
    grid-template-rows: 40px minmax(0, 1fr) auto !important;
    z-index: 520 !important;
    box-shadow: 0 -18px 36px rgba(0, 0, 0, 0.38) !important;
    border-top: 1px solid var(--line);
    overflow: hidden !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-header,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-messages,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-form {
    background: rgba(8, 17, 43, 0.98) !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-messages {
    display: block !important;
    min-height: 0 !important;
    overflow: auto !important;
    padding: 10px 12px 6px !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-form {
    position: static !important;
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 10px !important;
    padding: 10px 12px 12px !important;
    align-items: stretch !important;
    border-top: 1px solid var(--line) !important;
    box-shadow: none !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded #cf-chat-input {
    min-height: 84px !important;
    max-height: 140px !important;
    padding: 12px 14px !important;
  }
}
/* === END CF_AI_CHAT_DESKTOP_EXPAND_RESTORE === */



/* === CF_AI_CHAT_DESKTOP_FORM_LIFT === */
@media (min-width: 901px) {
  .cf-root[data-page="home"] > .cf-chatbar.expanded {
    left: 12px !important;
    right: 12px !important;
    bottom: 10px !important;
    min-height: min(38vh, 300px) !important;
    max-height: min(38vh, 300px) !important;
    height: min(38vh, 300px) !important;
    border-radius: 14px !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-messages {
    padding: 8px 12px 2px !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-form {
    position: sticky !important;
    bottom: 0 !important;
    padding: 8px 12px 12px !important;
    background: rgba(8, 17, 43, 0.99) !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded #cf-chat-input {
    min-height: 56px !important;
    max-height: 96px !important;
  }
}
/* === END CF_AI_CHAT_DESKTOP_FORM_LIFT === */



/* === CF_AI_CHAT_COMPOSER_UPWARD_PANEL_V2 === */
.cf-root[data-page="home"] {
  --cf-chatbar-collapsed-height: 86px;
  --cf-chatbar-expanded-height: min(52vh, 420px);
  --cf-chatbar-shell-width: min(calc(100vw - 24px), 1120px);
  --cf-chatbar-panel-bg: rgba(8, 17, 43, 0.98);
}

.cf-root[data-page="home"] > .cf-chatbar {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  display: grid !important;
  grid-template-rows: auto !important;
  align-items: end !important;
  gap: 0 !important;
  min-height: var(--cf-chatbar-collapsed-height) !important;
  max-height: var(--cf-chatbar-collapsed-height) !important;
  height: var(--cf-chatbar-collapsed-height) !important;
  padding: 10px 12px 12px !important;
  background: transparent !important;
  border-top: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  position: relative !important;
  z-index: 40 !important;
  transition: height 0.22s ease, min-height 0.22s ease, max-height 0.22s ease !important;
}

.cf-root[data-page="home"] > .cf-chatbar > .cf-chat-panel {
  display: none;
  min-height: 0;
}

.cf-root[data-page="home"] > .cf-chatbar .cf-chat-header,
.cf-root[data-page="home"] > .cf-chatbar .cf-chat-messages,
.cf-root[data-page="home"] > .cf-chatbar .cf-chat-form {
  width: var(--cf-chatbar-shell-width) !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.cf-root[data-page="home"] > .cf-chatbar .cf-chat-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: end !important;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-top: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 18px !important;
  background: var(--cf-chatbar-panel-bg) !important;
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.34) !important;
  position: relative !important;
}

.cf-root[data-page="home"] > .cf-chatbar #cf-chat-input {
  min-height: 44px !important;
  max-height: 120px !important;
  height: 44px;
  resize: none !important;
  padding: 11px 13px !important;
  line-height: 1.45 !important;
  background: rgba(15, 28, 68, 0.96) !important;
}

.cf-root[data-page="home"] > .cf-chatbar .cf-chat-form .cf-btn {
  min-height: 44px;
  align-self: stretch;
}

.cf-root[data-page="home"] > .cf-chatbar.expanded,
.cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  min-height: var(--cf-chatbar-expanded-height) !important;
  max-height: var(--cf-chatbar-expanded-height) !important;
  height: var(--cf-chatbar-expanded-height) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  align-items: stretch !important;
  padding-top: 12px !important;
  z-index: 540 !important;
  pointer-events: auto !important;
}

.cf-root[data-page="home"] > .cf-chatbar.expanded > .cf-chat-panel,
.cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar > .cf-chat-panel {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: stretch !important;
  min-height: 0;
  height: 100% !important;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: var(--cf-chatbar-panel-bg);
  box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  pointer-events: auto;
}

.cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-header,
.cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-messages,
.cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-header,
.cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-messages {
  background: transparent !important;
}

.cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-header,
.cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-header {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 8px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
}

.cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-messages,
.cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-messages {
  display: block !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px 8px !important;
}

.cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-form,
.cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-form {
  align-self: stretch !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  pointer-events: auto;
}

.cf-root[data-page="home"] > .cf-chatbar.expanded #cf-chat-input,
.cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar #cf-chat-input {
  min-height: 72px !important;
  max-height: 150px !important;
}

@media (min-width: 901px) {
  .cf-root[data-page="home"] {
    grid-template-rows: minmax(0, 1fr) 92px !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-form {
    grid-template-columns: minmax(0, 1fr) 88px !important;
  }
}

@media (max-width: 900px) {
  .cf-root[data-page="home"] {
    --cf-chatbar-collapsed-height: 80px;
    --cf-chatbar-expanded-height: min(56dvh, 420px);
    --cf-chatbar-shell-width: calc(100vw - 16px);
  }

  .cf-root[data-page="home"] > .cf-main {
    padding-bottom: calc(var(--cf-chatbar-collapsed-height) + 8px) !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar {
    grid-row: 1 !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 240 !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-form {
    grid-template-columns: minmax(0, 1fr) 72px !important;
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-form .cf-btn {
    min-width: 72px;
  }
}
/* === END CF_AI_CHAT_COMPOSER_UPWARD_PANEL_V2 === */


/* === CF_AI_CHAT_SCROLL_REPAIR === */
.cf-root[data-page="home"] > .cf-chatbar .cf-chat-messages {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 901px) {
  .cf-root[data-page="home"] {
    grid-template-rows: minmax(0, 1fr) 88px !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar {
    display: block !important;
    min-height: 88px !important;
    max-height: 88px !important;
    height: 88px !important;
    background: transparent !important;
    border-top: 0 !important;
    overflow: visible !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-header,
  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-messages {
    display: none !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px !important;
    align-items: end !important;
    padding: 10px 12px !important;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;
    background: rgba(8, 17, 43, 0.98) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24) !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar #cf-chat-input {
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 12px 14px !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 10px !important;
    min-height: min(40vh, 340px) !important;
    max-height: min(40vh, 340px) !important;
    height: min(40vh, 340px) !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: rgba(8, 17, 43, 0.98) !important;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;
    box-shadow: 0 -18px 36px rgba(0, 0, 0, 0.38) !important;
    z-index: 620 !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-header {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid var(--line) !important;
    background: rgba(8, 17, 43, 0.98) !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-messages {
    display: block !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 10px 12px 8px !important;
    background: rgba(8, 17, 43, 0.98) !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-form {
    display: grid !important;
    flex: 0 0 auto !important;
    position: static !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px !important;
    align-items: end !important;
    padding: 10px 12px 12px !important;
    border: 0 !important;
    border-top: 1px solid var(--line) !important;
    border-radius: 0 !important;
    background: rgba(8, 17, 43, 0.99) !important;
    box-shadow: none !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded #cf-chat-input {
    min-height: 64px !important;
    max-height: 120px !important;
  }
}

@media (max-width: 900px) {
  .cf-root[data-page="home"] > .cf-main {
    padding-bottom: 82px !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar {
    display: block !important;
    min-height: 82px !important;
    max-height: 82px !important;
    height: 82px !important;
    overflow: hidden !important;
    background: rgba(8, 17, 43, 0.98) !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-header,
  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-messages {
    display: none !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    align-items: center !important;
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    border-top: 0 !important;
    background: transparent !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar #cf-chat-input {
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 10px 12px !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar,
  .cf-root[data-page="home"] > .cf-chatbar.expanded {
    min-height: min(58dvh, 420px) !important;
    max-height: min(58dvh, 420px) !important;
    height: min(58dvh, 420px) !important;
    display: flex !important;
    flex-direction: column !important;
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 -18px 36px rgba(0, 0, 0, 0.38) !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-header,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-header {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    padding: 8px 10px !important;
    border-bottom: 1px solid var(--line) !important;
    background: rgba(8, 17, 43, 0.98) !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-messages,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-messages {
    display: block !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 8px 10px 6px !important;
    background: rgba(8, 17, 43, 0.98) !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-form,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-form {
    display: grid !important;
    flex: 0 0 auto !important;
    position: static !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    align-items: center !important;
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    border-top: 1px solid var(--line) !important;
    background: rgba(8, 17, 43, 0.99) !important;
    box-shadow: none !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar #cf-chat-input,
  .cf-root[data-page="home"] > .cf-chatbar.expanded #cf-chat-input {
    min-height: 72px !important;
    max-height: 128px !important;
  }
}
/* === END CF_AI_CHAT_SCROLL_REPAIR === */

/* === CF_MOBILE_CHAT_THIRD_WEEK_LIFT_V2 === */
@media (max-width: 900px) {
  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar,
  .cf-root[data-page="home"] > .cf-chatbar.expanded {
    min-height: min(74dvh, 620px) !important;
    max-height: min(74dvh, 620px) !important;
    height: min(74dvh, 620px) !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-header,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-header {
    padding: 6px 10px !important;
    font-size: 12px !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-messages,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-messages {
    padding: 8px 10px 6px !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-form,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-form {
    padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar #cf-chat-input,
  .cf-root[data-page="home"] > .cf-chatbar.expanded #cf-chat-input {
    min-height: 64px !important;
    max-height: 112px !important;
  }
}

@media (max-width: 420px) {
  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar,
  .cf-root[data-page="home"] > .cf-chatbar.expanded {
    min-height: min(76dvh, 600px) !important;
    max-height: min(76dvh, 600px) !important;
    height: min(76dvh, 600px) !important;
  }
}
/* === END CF_MOBILE_CHAT_THIRD_WEEK_LIFT_V2 === */

/* === CF_AI_CHAT_WEEK12_LIFT_V3 === */
/* Opened chat panel should rise to around the week of Apr 12 on month view. */
@media (min-width: 901px) {
  .cf-root[data-page="home"] > .cf-chatbar.expanded,
  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar {
    min-height: min(68vh, 620px) !important;
    max-height: min(68vh, 620px) !important;
    height: min(68vh, 620px) !important;
    z-index: 720 !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-header,
  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-header {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-messages,
  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-messages {
    padding-top: 8px !important;
    padding-bottom: 6px !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar.expanded #cf-chat-input,
  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar #cf-chat-input {
    min-height: 56px !important;
    max-height: 104px !important;
  }
}

@media (max-width: 900px) {
  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar,
  .cf-root[data-page="home"] > .cf-chatbar.expanded {
    min-height: min(80dvh, 700px) !important;
    max-height: min(80dvh, 700px) !important;
    height: min(80dvh, 700px) !important;
    z-index: 720 !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-header,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-header {
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-messages,
  .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-messages {
    padding-top: 8px !important;
    padding-bottom: 6px !important;
  }

  .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar #cf-chat-input,
  .cf-root[data-page="home"] > .cf-chatbar.expanded #cf-chat-input {
    min-height: 64px !important;
    max-height: 112px !important;
  }
}
/* === END CF_AI_CHAT_WEEK12_LIFT_V3 === */

/* === CF_MONTH_EVENT_STACK_FIX === */
/* Month view should keep same-day and multi-day bars visible as separate rows. */
.fc-dayGridMonth-view .fc-daygrid-day-events {
  min-height: 3.8em !important;
  overflow: visible !important;
}

.fc-dayGridMonth-view .fc-daygrid-event-harness {
  margin-top: 2px !important;
}

.fc-dayGridMonth-view .fc-daygrid-event {
  min-height: 18px !important;
  line-height: 1.25 !important;
  overflow: hidden !important;
}

.fc-dayGridMonth-view .fc-daygrid-day-frame {
  overflow: visible !important;
}
/* === END CF_MONTH_EVENT_STACK_FIX === */


/* === CF_SAFE_MONTH_UI_TUNING_V1 === */
/* Month view: make header more compact and ensure room for 2 event bars */

.cf-calendar .fc-toolbar-title {
  font-size: clamp(28px, 3vw, 44px) !important;
  line-height: 1.08 !important;
  font-weight: 700 !important;
}

.cf-calendar .fc-header-toolbar {
  margin-bottom: 8px !important;
  gap: 8px !important;
}

.cf-calendar .fc-button,
.cf-calendar .fc-button-group .fc-button {
  font-size: 14px !important;
  line-height: 1.2 !important;
  padding: 8px 14px !important;
}

.cf-calendar .fc-toolbar.fc-header-toolbar {
  padding-top: 0 !important;
  padding-bottom: 4px !important;
}

/* month only */
.cf-calendar.cf-month-view .fc-daygrid-day-frame {
  min-height: 96px !important;
}

.cf-calendar.cf-month-view .fc-daygrid-day-top {
  padding-top: 4px !important;
}

.cf-calendar.cf-month-view .fc-daygrid-day-number {
  font-size: 14px !important;
  line-height: 1.1 !important;
}

.cf-calendar.cf-month-view .fc-daygrid-day-events {
  min-height: 40px !important; /* 2 rows */
  margin-top: 2px !important;
  overflow: visible !important;
}

.cf-calendar.cf-month-view .fc-daygrid-event-harness {
  margin-top: 2px !important;
}

.cf-calendar.cf-month-view .fc-daygrid-block-event,
.cf-calendar.cf-month-view .fc-daygrid-event {
  min-height: 18px !important;
  border-radius: 5px !important;
}

.cf-calendar.cf-month-view .fc-daygrid-block-event .fc-event-main,
.cf-calendar.cf-month-view .fc-daygrid-event .fc-event-main {
  font-size: 11px !important;
  line-height: 18px !important;
  padding: 0 4px !important;
}

@media (max-width: 1200px) {
  .cf-calendar .fc-toolbar-title {
    font-size: clamp(24px, 2.8vw, 36px) !important;
  }

  .cf-calendar .fc-button,
  .cf-calendar .fc-button-group .fc-button {
    font-size: 13px !important;
    padding: 7px 12px !important;
  }

  .cf-calendar.cf-month-view .fc-daygrid-day-frame {
    min-height: 88px !important;
  }
}

@media (max-width: 768px) {
  .cf-calendar .fc-toolbar-title {
    font-size: clamp(22px, 2.6vw, 30px) !important;
  }

  .cf-calendar .fc-button,
  .cf-calendar .fc-button-group .fc-button {
    font-size: 12px !important;
    padding: 6px 10px !important;
  }

  .cf-calendar.cf-month-view .fc-daygrid-day-frame {
    min-height: 80px !important;
  }

  .cf-calendar.cf-month-view .fc-daygrid-day-events {
    min-height: 36px !important;
  }

  .cf-calendar.cf-month-view .fc-daygrid-block-event .fc-event-main,
  .cf-calendar.cf-month-view .fc-daygrid-event .fc-event-main {
    font-size: 10px !important;
    line-height: 16px !important;
  }
}
/* === END CF_SAFE_MONTH_UI_TUNING_V1 === */



/* === CF_COMPACT_MONTH_UI_V2 === */
/* Smaller month header, thinner event bars, thinner collapsed chat composer. */

/* --- FullCalendar header / toolbar --- */
.cf-calendar .fc-toolbar-title,
.fc .fc-toolbar-title {
  font-size: clamp(22px, 2.2vw, 32px) !important;
  line-height: 1.02 !important;
  font-weight: 700 !important;
}

.cf-calendar .fc-header-toolbar,
.fc .fc-header-toolbar {
  margin-bottom: 4px !important;
  padding-top: 0 !important;
  padding-bottom: 2px !important;
  gap: 6px !important;
}

.cf-calendar .fc-button,
.cf-calendar .fc-button-group .fc-button,
.fc .fc-button,
.fc .fc-button-group .fc-button {
  font-size: 12px !important;
  line-height: 1.1 !important;
  padding: 4px 9px !important;
  min-height: 30px !important;
  height: 30px !important;
  border-radius: 5px !important;
}

.cf-calendar .fc-prev-button,
.cf-calendar .fc-next-button,
.fc .fc-prev-button,
.fc .fc-next-button {
  width: 38px !important;
  min-width: 38px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.cf-calendar .fc-today-button,
.fc .fc-today-button {
  min-width: 58px !important;
}

.cf-calendar .fc-button .fc-icon,
.fc .fc-button .fc-icon {
  font-size: 1em !important;
  line-height: 1 !important;
}

/* --- Month grid date numbers --- */
.cf-calendar.cf-month-view .fc-daygrid-day-top,
.fc-dayGridMonth-view .fc-daygrid-day-top {
  padding-top: 2px !important;
}

.cf-calendar.cf-month-view .fc-daygrid-day-number,
.fc-dayGridMonth-view .fc-daygrid-day-number {
  font-size: 12px !important;
  line-height: 1 !important;
  padding: 2px 0 !important;
}

/* --- Month event bars: about half height of previous 18px bars --- */
.cf-calendar.cf-month-view .fc-daygrid-day-events,
.fc-dayGridMonth-view .fc-daygrid-day-events {
  min-height: 28px !important;
  margin-top: 1px !important;
  overflow: visible !important;
}

.cf-calendar.cf-month-view .fc-daygrid-event-harness,
.fc-dayGridMonth-view .fc-daygrid-event-harness {
  margin-top: 1px !important;
}

.cf-calendar.cf-month-view .fc-daygrid-block-event,
.cf-calendar.cf-month-view .fc-daygrid-event,
.fc-dayGridMonth-view .fc-daygrid-block-event,
.fc-dayGridMonth-view .fc-daygrid-event {
  min-height: 11px !important;
  height: 11px !important;
  max-height: 11px !important;
  border-radius: 3px !important;
  overflow: hidden !important;
}

.cf-calendar.cf-month-view .fc-daygrid-block-event .fc-event-main,
.cf-calendar.cf-month-view .fc-daygrid-event .fc-event-main,
.fc-dayGridMonth-view .fc-daygrid-block-event .fc-event-main,
.fc-dayGridMonth-view .fc-daygrid-event .fc-event-main {
  font-size: 9px !important;
  line-height: 11px !important;
  height: 11px !important;
  max-height: 11px !important;
  padding: 0 3px !important;
  overflow: hidden !important;
}

.cf-calendar.cf-month-view .fc-event-title,
.fc-dayGridMonth-view .fc-event-title {
  line-height: 11px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Keep enough room for two thin bars. */
.cf-calendar.cf-month-view .fc-daygrid-day-frame,
.fc-dayGridMonth-view .fc-daygrid-day-frame {
  min-height: 84px !important;
}

/* --- Collapsed chat composer: thinner only when not expanded --- */
.cf-root[data-page="home"]:not(.cf-mobile-chat-open) > .cf-chatbar:not(.expanded) {
  min-height: 76px !important;
  max-height: 76px !important;
  height: 76px !important;
  grid-template-rows: 22px minmax(0, 1fr) 34px !important;
}

.cf-root[data-page="home"]:not(.cf-mobile-chat-open) > .cf-chatbar:not(.expanded) .cf-chat-header {
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  font-size: 11px !important;
}

.cf-root[data-page="home"]:not(.cf-mobile-chat-open) > .cf-chatbar:not(.expanded) .cf-chat-messages {
  padding-top: 2px !important;
  padding-bottom: 2px !important;
}

.cf-root[data-page="home"]:not(.cf-mobile-chat-open) > .cf-chatbar:not(.expanded) .cf-chat-form {
  padding: 4px 8px !important;
  gap: 6px !important;
  align-items: center !important;
}

.cf-root[data-page="home"]:not(.cf-mobile-chat-open) > .cf-chatbar:not(.expanded) #cf-chat-input {
  min-height: 30px !important;
  max-height: 32px !important;
  height: 32px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

.cf-root[data-page="home"]:not(.cf-mobile-chat-open) > .cf-chatbar:not(.expanded) .cf-chat-form .cf-btn {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

/* Narrow screens */
@media (max-width: 900px) {
  .cf-calendar .fc-toolbar-title,
  .fc .fc-toolbar-title {
    font-size: clamp(19px, 4.8vw, 26px) !important;
  }

  .cf-calendar .fc-button,
  .cf-calendar .fc-button-group .fc-button,
  .fc .fc-button,
  .fc .fc-button-group .fc-button {
    font-size: 11px !important;
    padding: 3px 7px !important;
    min-height: 28px !important;
    height: 28px !important;
  }

  .cf-calendar .fc-prev-button,
  .cf-calendar .fc-next-button,
  .fc .fc-prev-button,
  .fc .fc-next-button {
    width: 34px !important;
    min-width: 34px !important;
  }

  .cf-calendar.cf-month-view .fc-daygrid-day-frame,
  .fc-dayGridMonth-view .fc-daygrid-day-frame {
    min-height: 74px !important;
  }

  .cf-calendar.cf-month-view .fc-daygrid-block-event,
  .cf-calendar.cf-month-view .fc-daygrid-event,
  .fc-dayGridMonth-view .fc-daygrid-block-event,
  .fc-dayGridMonth-view .fc-daygrid-event {
    min-height: 10px !important;
    height: 10px !important;
    max-height: 10px !important;
  }

  .cf-calendar.cf-month-view .fc-daygrid-block-event .fc-event-main,
  .cf-calendar.cf-month-view .fc-daygrid-event .fc-event-main,
  .fc-dayGridMonth-view .fc-daygrid-block-event .fc-event-main,
  .fc-dayGridMonth-view .fc-daygrid-event .fc-event-main,
  .cf-calendar.cf-month-view .fc-event-title,
  .fc-dayGridMonth-view .fc-event-title {
    font-size: 8px !important;
    line-height: 10px !important;
    height: 10px !important;
    max-height: 10px !important;
  }

  .cf-root[data-page="home"]:not(.cf-mobile-chat-open) > .cf-chatbar:not(.expanded) {
    min-height: 58px !important;
    max-height: 58px !important;
    height: 58px !important;
    grid-template-rows: 20px 38px !important;
  }

  .cf-root[data-page="home"]:not(.cf-mobile-chat-open) > .cf-chatbar:not(.expanded) .cf-chat-messages {
    display: none !important;
  }

  .cf-root[data-page="home"]:not(.cf-mobile-chat-open) > .cf-chatbar:not(.expanded) #cf-chat-input {
    min-height: 32px !important;
    max-height: 32px !important;
    height: 32px !important;
    font-size: 12px !important;
  }

  .cf-root[data-page="home"]:not(.cf-mobile-chat-open) > .cf-chatbar:not(.expanded) .cf-chat-form .cf-btn {
    min-height: 32px !important;
    height: 32px !important;
    font-size: 12px !important;
  }
}
/* === END CF_COMPACT_MONTH_UI_V2 === */



/* === CF_MONTH_EVENT_LANES_V1 === */
/* Put same-day events below connected multi-day bars in month view. */
.fc-dayGridMonth-view .fc-event.cf-month-lane-top,
.cf-calendar.cf-month-view .fc-event.cf-month-lane-top {
  z-index: 2 !important;
}

.fc-dayGridMonth-view .fc-event.cf-month-lane-lower,
.cf-calendar.cf-month-view .fc-event.cf-month-lane-lower {
  transform: translateY(12px) !important;
  z-index: 3 !important;
}

.fc-dayGridMonth-view .fc-daygrid-day-events,
.cf-calendar.cf-month-view .fc-daygrid-day-events {
  min-height: 30px !important;
  overflow: visible !important;
}

@media (max-width: 900px) {
  .fc-dayGridMonth-view .fc-event.cf-month-lane-lower,
  .cf-calendar.cf-month-view .fc-event.cf-month-lane-lower {
    transform: translateY(10px) !important;
  }
}
/* === END CF_MONTH_EVENT_LANES_V1 === */

/* === CF_MOBILE_CONNECTED_MONTH_BARS_V2 === */
/* Mobile month view keeps connected multi-day bars and leaves room for same-day events below them. */
@media (max-width: 900px) {
  .cf-calendar.cf-month-view .fc-scrollgrid-sync-table tbody tr,
  .fc-dayGridMonth-view .fc-scrollgrid-sync-table tbody tr {
    height: auto !important;
  }

  .cf-calendar.cf-month-view .fc-daygrid-day-frame,
  .fc-dayGridMonth-view .fc-daygrid-day-frame {
    min-height: max(62px, var(--cf-month-cell-size, 48px)) !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .cf-calendar.cf-month-view .fc-daygrid-day-events,
  .fc-dayGridMonth-view .fc-daygrid-day-events {
    min-height: 30px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .cf-calendar.cf-month-view .fc-daygrid-event-harness,
  .fc-dayGridMonth-view .fc-daygrid-event-harness {
    overflow: visible !important;
  }

  .cf-calendar.cf-month-view .fc-event.cf-month-lane-top,
  .fc-dayGridMonth-view .fc-event.cf-month-lane-top {
    z-index: 4 !important;
  }

  .cf-calendar.cf-month-view .fc-event.cf-month-lane-lower,
  .fc-dayGridMonth-view .fc-event.cf-month-lane-lower {
    transform: translateY(12px) !important;
    z-index: 5 !important;
  }
}
/* === END CF_MOBILE_CONNECTED_MONTH_BARS_V2 === */
/* === CF_ADMIN_OPS_V1 === */
.cf-admin-page,
.cf-report-page {
  min-height: 100vh;
  background: #f8fafc;
  color: #0f172a;
  padding: 24px;
  box-sizing: border-box;
}

.cf-admin-page h1,
.cf-report-page h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.cf-admin-page h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.cf-admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.cf-admin-nav-link,
.cf-admin-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font-size: 13px;
}

.cf-admin-chip.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.cf-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.cf-admin-header p,
.cf-report-card p {
  margin: 0;
  color: #64748b;
}

.cf-admin-range {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.cf-admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.cf-admin-card,
.cf-admin-panel,
.cf-report-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.cf-admin-card {
  padding: 14px;
}

.cf-admin-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 6px;
}

.cf-admin-card strong {
  display: block;
  font-size: 22px;
}

.cf-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.cf-admin-panel {
  padding: 16px;
  overflow-x: auto;
}

.cf-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cf-admin-table th,
.cf-admin-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.cf-admin-table th {
  color: #475569;
  font-weight: 600;
  background: #f8fafc;
}

.cf-admin-detail-table th {
  width: 180px;
}

.cf-admin-pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  max-height: 520px;
  overflow: auto;
  font-size: 12px;
}

.cf-admin-form,
.cf-report-form {
  display: grid;
  gap: 12px;
}

.cf-admin-form-row {
  display: grid;
  gap: 6px;
}

.cf-admin-form-row input,
.cf-admin-form-row select,
.cf-admin-form-row textarea,
.cf-report-form input,
.cf-report-form select,
.cf-report-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
}

.cf-report-page {
  display: flex;
  justify-content: center;
}

.cf-report-card {
  width: min(840px, 100%);
  padding: 20px;
}

.cf-notice {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px 0;
}

@media (max-width: 720px) {
  .cf-admin-page,
  .cf-report-page {
    padding: 12px;
  }

  .cf-admin-header {
    display: block;
  }
}

/* === CF_PROBLEM_REPORT_MODAL_V2 === */
.cf-plus-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cf-create-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 160px;
  padding: 6px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.cf-create-menu-item {
  width: 100%;
  display: block;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  color: #0f172a;
  cursor: pointer;
}

.cf-create-menu-item:hover,
.cf-create-menu-item:focus {
  background: #f1f5f9;
  outline: none;
}

.cf-create-menu-item.cf-danger-link:hover,
.cf-create-menu-item.cf-danger-link:focus {
  background: #fef2f2;
}

.cf-mobile-menu-btn.danger {
  color: #fecaca;
}

.cf-mobile-menu-btn.danger:hover,
.cf-mobile-menu-btn.danger:focus-visible {
  background: rgba(239, 68, 68, 0.18);
}

.cf-problem-report-panel {
  width: min(560px, calc(100vw - 28px));
}

.cf-problem-report-help {
  margin: 0 0 12px;
  line-height: 1.5;
}

.cf-report-card-compact {
  max-width: 640px;
}
/* === END CF_PROBLEM_REPORT_MODAL_V2 === */


/* === CF_AI_CHAT_INPUT_GUARD_V1 === */
.cf-chat-error {
  margin: 6px 12px 0;
  font-size: 12px;
  line-height: 1.5;
  color: #fecaca;
}

.cf-chat-form .cf-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
/* === END CF_AI_CHAT_INPUT_GUARD_V1 === */

/* === CF_FEEDBACK_UI_TUNE_V1 === */
/* Feedback: make the chat composer look editable, add light background mode. */
[data-cf-theme="light"] {
  --bg: #f8fafc;
  --bg-panel: #ffffff;
  --bg-panel-2: #e2e8f0;
  --line: rgba(15, 23, 42, 0.14);
  --text: #0f172a;
  --muted: #475569;
  --accent: #2563eb;
}

[data-cf-theme="light"] body,
html[data-cf-theme="light"] body,
html[data-cf-theme="light"] .cf-root[data-page="home"] {
  background: #f8fafc;
  color: #0f172a;
}

html[data-cf-theme="light"] .cf-root[data-page="home"] {
  --cf-chatbar-panel-bg: rgba(255, 255, 255, 0.98);
}

html[data-cf-theme="light"] .cf-main,
html[data-cf-theme="light"] .cf-sidebar-left,
html[data-cf-theme="light"] .cf-sidebar-right,
html[data-cf-theme="light"] .cf-chatbar,
html[data-cf-theme="light"] .cf-chat-header,
html[data-cf-theme="light"] .cf-chat-messages,
html[data-cf-theme="light"] .cf-chat-form,
html[data-cf-theme="light"] .cf-root[data-page="home"] > .cf-chatbar,
html[data-cf-theme="light"] .cf-root[data-page="home"] > .cf-chatbar.expanded,
html[data-cf-theme="light"] .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar,
html[data-cf-theme="light"] .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-header,
html[data-cf-theme="light"] .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-messages,
html[data-cf-theme="light"] .cf-root[data-page="home"] > .cf-chatbar.expanded .cf-chat-form,
html[data-cf-theme="light"] .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-header,
html[data-cf-theme="light"] .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-messages,
html[data-cf-theme="light"] .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar .cf-chat-form {
  background: #ffffff !important;
  color: #0f172a !important;
}

html[data-cf-theme="light"] .cf-root[data-page="home"] > .cf-chatbar .cf-chat-form,
html[data-cf-theme="light"] .cf-root[data-page="home"] > .cf-chatbar.expanded,
html[data-cf-theme="light"] .cf-root[data-page="home"] > .cf-chatbar.expanded > .cf-chat-panel,
html[data-cf-theme="light"] .cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar > .cf-chat-panel {
  border-color: rgba(15, 23, 42, 0.14) !important;
  box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.12) !important;
}

html[data-cf-theme="light"] .fc,
html[data-cf-theme="light"] .fc .fc-col-header-cell-cushion,
html[data-cf-theme="light"] .fc .fc-daygrid-day-number,
html[data-cf-theme="light"] .fc .fc-toolbar-title,
html[data-cf-theme="light"] .cf-tree-toggle,
html[data-cf-theme="light"] .cf-mobile-menu-btn,
html[data-cf-theme="light"] .cf-ai-card-title,
html[data-cf-theme="light"] .cf-ai-body,
html[data-cf-theme="light"] .cf-chat-line {
  color: #0f172a !important;
}

html[data-cf-theme="light"] .cf-btn,
html[data-cf-theme="light"] .cf-chat-tab,
html[data-cf-theme="light"] .fc .fc-button,
html[data-cf-theme="light"] .cf-tree-action {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
}

html[data-cf-theme="light"] .cf-chat-tab.active,
html[data-cf-theme="light"] .fc .fc-button-primary:not(:disabled).fc-button-active,
html[data-cf-theme="light"] .fc .fc-button-primary:not(:disabled):active {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
}

html[data-cf-theme="light"] .cf-mobile-menu {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
}

html[data-cf-theme="light"] .cf-mobile-menu-btn:hover,
html[data-cf-theme="light"] .cf-mobile-menu-btn:focus-visible,
html[data-cf-theme="light"] .cf-tree-item.active,
html[data-cf-theme="light"] .cf-tree li.active {
  background: rgba(37, 99, 235, 0.12) !important;
}

.cf-root[data-page="home"] > .cf-chatbar #cf-chat-input,
.cf-root[data-page="home"] > .cf-chatbar.expanded #cf-chat-input,
.cf-root[data-page="home"].cf-mobile-chat-open > .cf-chatbar #cf-chat-input {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #94a3b8 !important;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.04) !important;
  caret-color: #2563eb !important;
}

.cf-root[data-page="home"] > .cf-chatbar #cf-chat-input::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

.cf-root[data-page="home"] > .cf-chatbar #cf-chat-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22) !important;
  outline: none !important;
}

.cf-root[data-page="home"] > .cf-chatbar #cf-chat-input:disabled,
.cf-root[data-page="home"] > .cf-chatbar #cf-chat-input[aria-disabled="true"] {
  background: #e5e7eb !important;
  color: #9ca3af !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed !important;
}

.cf-chat-form .cf-btn:disabled,
.cf-chat-tab:disabled,
.cf-btn:disabled {
  background: #e5e7eb !important;
  color: #94a3b8 !important;
  border-color: #cbd5e1 !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  filter: none !important;
}

.cf-chat-error {
  color: #fecaca;
}

html[data-cf-theme="light"] .cf-chat-error {
  color: #b91c1c;
}
/* === END CF_FEEDBACK_UI_TUNE_V1 === */


/* === CF_ANDROID_MOBILE_BACK_NAV_BRIDGE === */
.cf-btn.active,
.cf-btn[aria-current="page"] {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

@media (max-width: 900px) {
  .cf-mobile-menu-btn.active,
  .cf-mobile-menu-btn[aria-current="page"] {
    background: rgba(37, 99, 235, 0.24);
    color: #fff;
    font-weight: 700;
  }
}
/* === END CF_ANDROID_MOBILE_BACK_NAV_BRIDGE === */

/* === CF_HIDE_REDUNDANT_CHAT_HEADER_BUTTONS === */
#cf-chat-back,
#cf-chat-minimize {
  display: none !important;
}
/* === END CF_HIDE_REDUNDANT_CHAT_HEADER_BUTTONS === */

/* === CF_MOBILE_CALENDAR_UI_TUNE_20260607 === */
@media (max-width: 640px) {
  .cf-main-actions,
  .cf-modal-actions,
  .cf-delete-actions,
  .cf-ai-card-actions {
    gap: 8px;
  }

  .cf-main-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .cf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 42px;
    max-width: 100%;
    padding: 9px 12px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: normal;
  }

  .cf-btn.small {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .cf-mobile-menu-btn {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 44px;
    padding: 12px;
    line-height: 1.2;
  }

  .cf-calendar .fc-toolbar,
  .fc .fc-toolbar {
    gap: 6px !important;
    align-items: center;
  }

  .cf-calendar .fc-toolbar-chunk,
  .fc .fc-toolbar-chunk {
    min-width: 0;
  }

  .cf-calendar .fc-toolbar-title,
  .fc .fc-toolbar-title {
    max-width: 100%;
    overflow: hidden;
    font-size: 1rem !important;
    line-height: 1.2 !important;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .cf-calendar .fc-button,
  .cf-calendar .fc-button-group .fc-button,
  .fc .fc-button,
  .fc .fc-button-group .fc-button {
    min-height: 38px !important;
    height: auto !important;
    padding: 6px 9px !important;
    font-size: 0.85rem !important;
    line-height: 1.15 !important;
  }

  .cf-calendar .fc-prev-button,
  .cf-calendar .fc-next-button,
  .fc .fc-prev-button,
  .fc .fc-next-button {
    width: 40px !important;
    min-width: 40px !important;
  }

  .cf-calendar .fc-today-button,
  .fc .fc-today-button {
    min-width: 54px !important;
  }

  .cf-root[data-page="home"]:not(.cf-mobile-chat-open) > .cf-chatbar:not(.expanded) {
    min-height: 66px !important;
    max-height: 66px !important;
    height: 66px !important;
    grid-template-rows: 20px 46px !important;
  }

  .cf-root[data-page="home"] > .cf-chatbar .cf-chat-form .cf-btn,
  .cf-root[data-page="home"]:not(.cf-mobile-chat-open) > .cf-chatbar:not(.expanded) .cf-chat-form .cf-btn {
    min-height: 40px !important;
    height: auto !important;
    padding: 0 14px !important;
    font-size: 13px !important;
  }

  .cf-ai-card-actions .cf-btn {
    flex: 1 1 120px;
  }

  .cf-policy-card {
    max-width: 100%;
    box-sizing: border-box;
  }

  .cf-account-delete-card .cf-policy-notice {
    padding: 14px;
    line-height: 1.6;
  }

  .cf-account-delete-card .cf-field input {
    min-height: 44px;
    font-size: 16px;
  }

  .cf-delete-actions {
    align-items: stretch;
  }

  .cf-delete-actions .cf-btn {
    flex: 1 1 150px;
    min-height: 44px;
  }

  .cf-account-delete-submit {
    background: #dc2626;
    border-color: #b91c1c;
    color: #fff;
  }
}
/* === END CF_MOBILE_CALENDAR_UI_TUNE_20260607 === */

/* === CF_GROUP_FRIEND_MANAGEMENT_UI_20260607 === */
#cf-group-tree .cf-tree-actions {
  gap: 6px;
}

.cf-tree-action.cf-tree-add-action,
.cf-tree-action.cf-tree-edit-action {
  min-height: 24px;
  height: 24px;
}

.cf-tree-action.cf-tree-add-action {
  width: 24px;
  min-width: 24px;
}

.cf-tree-action.cf-tree-edit-action {
  width: auto;
  min-width: 42px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.cf-friend-add {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
}

.cf-friend-add-title {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}

.cf-friend-add-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.cf-friend-add-field {
  min-width: 0;
}

.cf-friend-add-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
  white-space: normal;
}

.cf-friend-add-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--bg-panel-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.cf-friend-add-form .cf-btn {
  width: 100%;
  min-height: 40px;
  font-size: 13px;
  white-space: nowrap;
}

.cf-friend-add-input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.cf-friend-add-results {
  margin-top: 12px;
  max-height: 230px;
  background: var(--bg-panel-2);
  border-color: var(--line);
}

.cf-friend-add .cf-search-row {
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
  border-bottom-color: var(--line);
  align-items: flex-start;
}

.cf-friend-add .cf-search-row-title {
  color: var(--text);
}

.cf-friend-add .cf-search-row-meta,
.cf-friend-add .cf-empty-state {
  color: var(--muted);
}

.cf-friend-add .cf-search-row-actions {
  justify-content: flex-start;
}

.cf-friend-list {
  display: grid;
  gap: 0;
}

@media (hover: none), (max-width: 900px) {
  .cf-tree-action.cf-tree-add-action,
  .cf-tree-action.cf-tree-edit-action {
    min-height: 30px;
    height: 30px;
  }

  .cf-tree-action.cf-tree-add-action {
    width: 30px;
    min-width: 30px;
  }

  .cf-tree-action.cf-tree-edit-action {
    min-width: 52px;
    padding: 0 10px;
  }
}

@media (max-width: 640px) {
  .cf-friend-add {
    padding: 12px;
  }

  .cf-friend-add-input {
    min-height: 42px;
    font-size: 16px;
  }

  .cf-friend-add-form .cf-btn {
    min-height: 42px;
  }

  .cf-friend-add .cf-search-row {
    padding: 10px;
  }

  .cf-friend-add .cf-search-row-actions {
    justify-content: flex-start;
  }

  #cf-members {
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }
}
/* === END CF_GROUP_FRIEND_MANAGEMENT_UI_20260607 === */
