/* My Task views + shared Notion-like editor proof. */

.my-task-hub {
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 28px clamp(18px, 3.6vw, 48px) 72px;
}

.my-task-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.my-task-header h1 { margin: 4px 0 6px; font-size: 28px; line-height: 1.08; }
.my-task-header p { margin: 0; color: var(--muted); font-size: 12px; }
.task-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.task-view-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 650;
}
.task-view-switch button:hover { color: var(--text); background: var(--surface); }
.task-view-switch button.active { color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.task-view-switch button span { color: var(--green); }

.task-calendar-wrap {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  background: var(--surface);
}
.task-calendar-toolbar {
  min-height: 52px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
}
.task-calendar-toolbar > div { display: flex; align-items: center; gap: 6px; }
.task-calendar-toolbar button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}
.task-calendar-toolbar strong { margin-left: 5px; font-size: 13px; }
.task-calendar-toolbar span { color: var(--muted); font-size: 10px; }
.task-calendar-weekdays,
.task-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.task-calendar-weekdays span {
  min-height: 30px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--soft);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
}
.task-calendar-cell {
  min-width: 0;
  min-height: 118px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 7px;
  background: var(--surface);
}
.task-calendar-cell.muted { background: var(--surface-2); opacity: .58; }
.task-calendar-cell.today { background: color-mix(in srgb, var(--green-soft) 55%, var(--surface)); }
.task-calendar-day { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 7px; }
.task-calendar-day > span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}
.task-calendar-cell.today .task-calendar-day > span { background: var(--green); color: white; }
.task-calendar-day b { color: var(--green); font-size: 8px; text-transform: uppercase; letter-spacing: .05em; }
.task-calendar-items { display: grid; gap: 4px; }
.calendar-task {
  min-width: 0;
  border: 0;
  border-left: 2px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface-2);
  display: grid;
  gap: 1px;
  padding: 6px 7px;
  text-align: left;
}
.calendar-task:hover { background: var(--green-soft); }
.calendar-task.doing { border-left-color: var(--green); }
.calendar-task.review { border-left-color: #b77a21; }
.calendar-task.inbox { border-left-color: var(--soft); }
.calendar-task strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.calendar-task small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 8px; }

.task-kanban {
  min-width: 860px;
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.kanban-column { min-width: 0; background: var(--surface-2); border-radius: 10px; padding: 9px; }
.kanban-column > header { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 7px; align-items: center; min-height: 30px; }
.kanban-column > header strong { font-size: 10px; }
.kanban-column > header b { color: var(--soft); font-size: 9px; }
.kanban-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.kanban-dot.doing { background: var(--green); }
.kanban-dot.review { background: #b77a21; }
.kanban-dot.done { background: #69736c; }
.kanban-cards { display: grid; gap: 6px; }
.kanban-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  gap: 5px;
  padding: 10px;
  text-align: left;
}
.kanban-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.kanban-card strong { font-size: 11px; line-height: 1.35; }
.kanban-card span, .kanban-card small { color: var(--muted); font-size: 9px; }
.kanban-empty { min-height: 64px; border: 1px dashed var(--line); border-radius: 8px; display: grid; place-items: center; color: var(--soft); font-size: 9px; }

.notion-task-table { border-top: 1px solid var(--line); }
.notion-task-table-head,
.notion-task-row { display: grid; grid-template-columns: minmax(260px, 1.4fr) minmax(140px, .8fr) 110px 110px; align-items: center; }
.notion-task-table-head { min-height: 34px; color: var(--soft); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.notion-task-table-head span, .notion-task-row > span { padding: 0 10px; }
.notion-task-row { width: 100%; min-height: 52px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; color: var(--text); }
.notion-task-row:hover { background: var(--surface-2); }
.notion-task-row > span:first-child { min-width: 0; display: grid; grid-template-columns: 14px minmax(0, 1fr); grid-template-rows: auto auto; gap: 1px 8px; }
.notion-task-row .task-check { grid-row: 1 / 3; align-self: center; }
.notion-task-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.notion-task-row small { color: var(--soft); font-size: 9px; }
.notion-task-row > span:not(:first-child) { color: var(--muted); font-size: 10px; }
.task-status { display: inline-flex; min-height: 22px; align-items: center; border-radius: 6px; padding: 0 7px; background: var(--surface-2); color: var(--muted); font-size: 9px; }
.task-status.doing { background: var(--green-soft); color: var(--green); }
.task-status.review { background: rgba(183,122,33,.12); color: #9a6418; }
.my-task-footnote { margin-top: 20px; display: flex; gap: 10px; align-items: baseline; color: var(--muted); font-size: 10px; }
.my-task-footnote strong { color: var(--text); font-size: 10px; }

.notion-page {
  height: 100%;
  min-height: 0;
  overflow: auto;
  background: var(--surface);
}
.notion-page-topbar {
  position: sticky;
  top: 0;
  z-index: 7;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}
.notion-page-topbar > button { border: 0; background: transparent; color: var(--muted); font-size: 10px; }
.notion-page-topbar > button:hover { color: var(--text); }
.notion-page-topbar > div { min-width: 0; display: flex; justify-content: center; gap: 8px; color: var(--soft); font-size: 9px; }
.notion-page-topbar > div b { color: var(--muted); }
.notion-page-grid {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(210px, 260px);
  gap: 44px;
  padding: 38px clamp(18px, 4vw, 48px) 90px;
}
.notion-page-main { min-width: 0; }
.notion-page-icon { width: 46px; height: 46px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; color: var(--green); font-size: 22px; margin-bottom: 12px; }
.notion-page-title {
  min-height: 40px;
  margin: 0 0 14px;
  outline: 0;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.12;
  font-weight: 750;
  letter-spacing: -.025em;
}
.notion-page-title:empty::before { content: attr(data-placeholder); color: var(--soft); }
.notion-properties { display: grid; gap: 1px; margin: 0 0 18px; }
.notion-properties > div { min-height: 34px; display: grid; grid-template-columns: 140px minmax(0, 1fr); align-items: center; gap: 10px; border-radius: 6px; padding: 0 4px; }
.notion-properties > div:hover { background: var(--surface-2); }
.notion-properties span { color: var(--muted); font-size: 10px; }
.notion-properties button { justify-self: start; min-height: 24px; border: 0; border-radius: 6px; background: transparent; color: var(--text); padding: 0 7px; font-size: 10px; }
.notion-properties button:hover { background: var(--surface-2); }
.notion-properties .property-pill { background: var(--surface-2); }
.notion-properties .property-pill.doing { background: var(--green-soft); color: var(--green); }
.notion-properties .property-pill.review { background: rgba(183,122,33,.12); color: #9a6418; }
.notion-divider { height: 1px; background: var(--line); margin: 20px 0; }
.notion-section-label { margin-bottom: 8px; color: var(--soft); font-size: 9px; font-weight: 700; letter-spacing: .07em; }

.notion-editor-shell { position: relative; }
.notion-editor-toolbar {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.notion-editor-toolbar > div { display: flex; gap: 4px; }
.notion-editor-toolbar button { min-height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); padding: 0 8px; font-size: 9px; font-weight: 650; }
.notion-editor-toolbar button:hover { background: var(--surface-2); color: var(--text); }
.notion-editor-toolbar > span { color: var(--soft); font-size: 9px; }
.notion-blocks { display: grid; gap: 1px; }
.notion-block {
  position: relative;
  min-height: 34px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  border-radius: 5px;
  padding: 3px 2px;
}
.notion-block:hover { background: color-mix(in srgb, var(--surface-2) 66%, transparent); }
.block-handle { opacity: 0; width: 22px; height: 28px; border: 0; background: transparent; color: var(--soft); font-size: 11px; cursor: grab; }
.notion-block:hover .block-handle { opacity: 1; }
.block-editable { min-height: 28px; outline: 0; padding: 4px 4px; color: var(--text); font-size: 14px; line-height: 1.58; overflow-wrap: anywhere; }
.block-editable:empty::before { content: attr(data-placeholder); color: var(--soft); }
.notion-heading .block-editable { font-size: 19px; font-weight: 720; line-height: 1.3; padding-top: 8px; }
.notion-quote { border-left: 3px solid var(--line-strong); margin-left: 26px; grid-template-columns: minmax(0, 1fr); padding-left: 8px; }
.notion-quote .block-handle { display: none; }
.notion-code .block-editable { border-radius: 7px; background: var(--surface-2); padding: 10px 12px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; white-space: pre-wrap; }
.notion-bullet,
.notion-todo { grid-template-columns: 24px 18px minmax(0, 1fr); }
.block-prefix { align-self: center; text-align: center; color: var(--text); }
.block-checkbox { align-self: center; width: 15px; height: 15px; border: 1px solid var(--line-strong); border-radius: 4px; background: transparent; color: transparent; font-size: 8px; padding: 0; }
.block-checkbox:hover { color: var(--green); border-color: var(--green); }
.editor-mention { display: inline-flex; align-items: center; min-height: 22px; border-radius: 5px; background: var(--green-soft); color: var(--green); padding: 0 5px; font-weight: 650; white-space: nowrap; }
.notion-add-block { margin: 5px 0 0 28px; min-height: 30px; border: 0; background: transparent; color: var(--soft); font-size: 9px; }
.notion-add-block:hover { color: var(--text); }

.notion-relations { align-self: start; position: sticky; top: 72px; display: grid; gap: 18px; }
.notion-relations section { border-top: 1px solid var(--line); padding-top: 10px; }
.notion-relations-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; color: var(--soft); font-size: 8px; font-weight: 700; letter-spacing: .07em; }
.notion-relations-title b { font-size: 8px; }
.notion-relations section > button { width: 100%; min-height: 42px; border: 0; border-radius: 7px; background: transparent; display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 7px; align-items: center; padding: 5px; text-align: left; }
.notion-relations section > button:hover { background: var(--surface-2); }
.notion-relations section > button > span { color: var(--green); font-size: 11px; }
.notion-relations section > button > div { min-width: 0; display: grid; gap: 1px; }
.notion-relations section > button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.notion-relations section > button small { color: var(--soft); font-size: 8px; }
.notion-relations section > button > b { color: var(--soft); font-size: 9px; }
.notion-relations p { margin: 8px 0 0; color: var(--soft); font-size: 9px; line-height: 1.5; }

.notion-note-actions { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; color: var(--soft); font-size: 9px; letter-spacing: .05em; }
.notion-note-actions small { color: var(--muted); }
.notion-note-meta { min-height: 32px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 9px; margin-bottom: 10px; color: var(--muted); font-size: 9px; }
.notion-note-meta span { color: var(--green); font-weight: 700; }
.notion-note-meta small { margin-left: auto; color: var(--soft); }
.notion-move-section { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 12px; }
.notion-move-section > span { color: var(--soft); font-size: 8px; font-weight: 700; letter-spacing: .07em; }
.notion-move-section > div { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 5px; margin-top: 8px; }
.notion-move-section button { min-height: 44px; border: 1px solid var(--line); border-radius: 7px; background: transparent; display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: auto auto; gap: 1px 8px; padding: 7px 9px; text-align: left; }
.notion-move-section button:hover { background: var(--surface-2); }
.notion-move-section strong { font-size: 9px; }
.notion-move-section small { color: var(--soft); font-size: 8px; }
.notion-move-section b { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--soft); }

.knowledge-notion-layout { height: 100%; min-height: 0; display: grid; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); }
.knowledge-notion-list { min-height: 0; overflow: auto; border-right: 1px solid var(--line); padding: 24px 14px 60px; }
.knowledge-notion-list header { padding: 0 8px 14px; }
.knowledge-notion-list h2 { margin: 3px 0 4px; font-size: 18px; }
.knowledge-notion-list p { margin: 0; color: var(--muted); font-size: 10px; }
.knowledge-page .notion-page-grid { grid-template-columns: minmax(0, 700px) minmax(200px, 240px); gap: 36px; padding-left: clamp(18px,3vw,38px); padding-right: clamp(18px,3vw,38px); }

.notion-editor-menu {
  position: fixed;
  z-index: 200;
  width: min(320px, calc(100vw - 24px));
  max-height: 340px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
  padding: 7px;
}
.notion-editor-menu.hidden { display: none; }
.editor-menu-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 5px 6px 7px; }
.editor-menu-head strong { font-size: 10px; }
.editor-menu-head small { color: var(--soft); font-size: 8px; }
.editor-menu-search { width: 100%; min-height: 34px; border: 1px solid var(--line); border-radius: 7px; outline: 0; background: var(--surface-2); color: var(--text); padding: 0 9px; font-size: 10px; margin-bottom: 5px; }
.editor-menu-search:focus { border-color: var(--green); }
.editor-menu-list { max-height: 250px; overflow: auto; display: grid; gap: 1px; }
.editor-menu-list button { width: 100%; min-height: 42px; border: 0; border-radius: 7px; background: transparent; display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 8px; align-items: center; padding: 5px 7px; text-align: left; }
.editor-menu-list button:hover { background: var(--surface-2); }
.editor-menu-list button > span { width: 24px; height: 24px; border-radius: 6px; background: var(--green-soft); display: grid; place-items: center; color: var(--green); font-size: 10px; }
.editor-menu-list button > div { min-width: 0; display: grid; gap: 1px; }
.editor-menu-list button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.editor-menu-list button small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 8px; }
.command-list { max-height: none; }

@media (max-width: 1050px) {
  .notion-page-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .notion-relations { position: static; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .knowledge-page .notion-page-grid { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 767px) {
  .my-task-hub { padding: 18px 12px 94px; }
  .my-task-header { display: grid; gap: 14px; align-items: start; }
  .my-task-header h1 { font-size: 24px; }
  .task-view-switch { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .task-view-switch button { justify-content: center; padding: 0 6px; }
  .task-calendar-wrap { overflow: visible; border-left: 0; border-top: 0; background: transparent; }
  .task-calendar-toolbar { min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
  .task-calendar-toolbar > span { display: none; }
  .task-calendar-weekdays { display: none; }
  .task-calendar-grid { min-width: 0; grid-template-columns: 1fr; gap: 7px; margin-top: 8px; }
  .task-calendar-cell { display: none; min-height: 0; border: 1px solid var(--line); border-radius: 9px; padding: 9px; }
  .task-calendar-cell:has(.calendar-task),
  .task-calendar-cell.today { display: block; }
  .task-calendar-cell.muted { display: none; }
  .task-calendar-day { justify-content: flex-start; }
  .task-calendar-day b { margin-left: 4px; }
  .calendar-task { min-height: 48px; padding: 8px 9px; }
  .calendar-task strong { font-size: 11px; }
  .calendar-task small { font-size: 9px; }
  .task-kanban { min-width: 760px; }
  .notion-task-table { overflow-x: auto; }
  .notion-task-table-head, .notion-task-row { min-width: 650px; }
  .my-task-footnote { display: grid; gap: 4px; }
  .notion-page { padding-bottom: 76px; }
  .notion-page-grid { padding: 24px 16px 100px; }
  .notion-page-title { font-size: 27px; }
  .notion-properties > div { grid-template-columns: 112px minmax(0,1fr); }
  .notion-editor-toolbar { align-items: flex-start; flex-direction: column; gap: 4px; padding: 5px 0; }
  .notion-editor-toolbar > span { padding-left: 4px; }
  .notion-relations { grid-template-columns: 1fr; }
  .knowledge-notion-layout { display: block; overflow: auto; }
  .knowledge-notion-list { max-height: 210px; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 10px 12px; }
  .knowledge-page { height: auto; overflow: visible; }
  .knowledge-page .notion-page-grid { padding: 22px 16px 100px; }
  .notion-move-section > div { grid-template-columns: 1fr; }
  .notion-note-actions { align-items: flex-start; }
}
