/* ============================================================
   待办 / 便签 —— 抽屉 + 独立页共用样式
   ============================================================ */

/* ---------------- 变量 ---------------- */
.pocket {
  --pk-radius: 14px;
  --pk-border: #e8ebf0;
  --pk-text: #2b3440;
  --pk-sub: #8a94a6;
  --pk-accent: #4e6ef2;
  --pk-danger: #e5534b;
  --pk-warn: #f0a020;
  --pk-bg: #fff;
  --pk-soft: #f6f8fb;
  color: var(--pk-text);
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  /* 象限选择浮层以它为定位参照（抽屉与独立页都要有） */
  position: relative;
}

.pocket svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* ---------------- 头部 ---------------- */
.pocket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--pk-border);
  flex-shrink: 0;
}

.pocket-tabs {
  display: flex;
  gap: 4px;
}

.pocket-tab {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--pk-sub);
  font-size: 14px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: all .18s;
}

.pocket-tab:hover {
  color: var(--pk-text);
  background: var(--pk-soft);
}

.pocket-tab.active {
  color: #fff;
  background: var(--pk-accent);
}

.pocket-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 0 6px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .3);
  font-size: 11px;
  line-height: 16px;
  vertical-align: 1px;
}

.pocket-tab:not(.active) .pocket-badge {
  background: #e6eaf2;
  color: #5a6474;
}

.pocket-badge[hidden] {
  display: none;
}

.pocket-head-actions {
  display: flex;
  gap: 2px;
}

.pocket-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--pk-sub);
  cursor: pointer;
  transition: all .18s;
  text-decoration: none;
}

.pocket-btn:hover {
  background: var(--pk-soft);
  color: var(--pk-text);
}

/* ---------------- 主体 ---------------- */
.pocket-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pocket-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 16px;
  overflow-y: auto;
}

.pocket-pane[hidden] {
  display: none;
}

/* ---------------- 输入行 ---------------- */
.pocket-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.pocket-input,
.pocket-textarea {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--pk-border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--pk-text);
  background: #fff;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.pocket-input:focus,
.pocket-textarea:focus {
  border-color: var(--pk-accent);
  box-shadow: 0 0 0 3px rgba(78, 110, 242, .12);
}

.pocket-textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  line-height: 1.7;
}

.pocket-primary {
  flex-shrink: 0;
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  background: var(--pk-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .18s;
}

.pocket-primary:hover {
  filter: brightness(1.08);
}

.pocket-link {
  border: 0;
  background: transparent;
  color: var(--pk-sub);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all .18s;
}

.pocket-link:hover {
  color: var(--pk-accent);
  background: var(--pk-soft);
}

.pocket-link.danger:hover {
  color: var(--pk-danger);
}

/* ---------------- 项目筛选条 ---------------- */
.proj-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: -4px 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--pk-border);
}

.proj-bar[hidden] {
  display: none;
}

.proj-pills {
  display: contents;
}

.proj-pill {
  border: 1px solid var(--pk-border);
  background: #fff;
  color: var(--pk-sub);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  padding: 3px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}

.proj-pill:hover {
  color: var(--pk-text);
  border-color: #d8dfea;
}

.proj-pill.active {
  background: var(--pk-accent);
  border-color: var(--pk-accent);
  color: #fff;
}

.proj-pill .n {
  opacity: .68;
  margin-left: 4px;
  font-weight: 400;
}

.proj-pill.active .n {
  opacity: .85;
}

/* ---------------- 待办上的项目标签 ---------------- */
.todo-proj {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  border: 0;
  background: #eef2fb;
  color: var(--pk-accent);
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  padding: 2px 8px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: filter .18s;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.todo-proj:hover {
  filter: brightness(.95);
}

.todo-item.done .todo-proj {
  background: #f0f2f6;
  color: #a8b0bd;
}

/* 「＋ 项目」按钮 */
.proj-pill.proj-add {
  margin-left: auto;
  background: #eef2fb;
  border-color: #dbe3f7;
  color: var(--pk-accent);
}

.proj-pill.proj-add:hover {
  background: #e3eaf9;
  color: var(--pk-accent);
}

.proj-pill.proj-add span {
  font-weight: 700;
}

/* ---------------- 项目管理面板 ---------------- */
.proj-manager {
  margin: 0 0 12px;
  border: 1px solid var(--pk-border);
  border-radius: 12px;
  background: var(--pk-soft);
  padding: 10px 12px;
}

.pm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pk-sub);
  margin-bottom: 8px;
}

.pm-x {
  border: 0;
  background: transparent;
  color: var(--pk-sub);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 0 3px;
}

.pm-x:hover {
  color: var(--pk-text);
}

.pm-list {
  max-height: 190px;
  overflow-y: auto;
  margin-bottom: 8px;
}

.pm-empty {
  font-size: 12.5px;
  color: #b6bfcc;
  padding: 8px 2px;
}

.pm-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 2px;
}

.pm-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--pk-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-count {
  margin-left: 5px;
  font-size: 11.5px;
  color: #b6bfcc;
}

.pm-btn {
  flex-shrink: 0;
  border: 1px solid var(--pk-border);
  background: #fff;
  color: var(--pk-sub);
  font-size: 11.5px;
  font-family: inherit;
  padding: 2px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: all .16s;
}

.pm-btn:hover {
  color: var(--pk-accent);
  border-color: var(--pk-accent);
}

.pm-btn.danger:hover {
  color: var(--pk-danger);
  border-color: var(--pk-danger);
}

.pm-new {
  display: flex;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--pk-border);
}

.pm-new input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--pk-border);
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  background: #fff;
}

.pm-new input:focus {
  border-color: var(--pk-accent);
}

.pm-new .pocket-primary {
  height: auto;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 8px;
}

/* ---------------- 项目选择层 ---------------- */
.todo-item {
  position: relative;
}

.proj-picker {
  position: absolute;
  top: 100%;
  right: 8px;
  z-index: 30;
  min-width: 190px;
  max-width: 280px;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--pk-border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(20, 26, 38, .18);
  text-align: left;
}

.proj-picker-title {
  font-size: 11.5px;
  color: #b6bfcc;
  padding: 2px 8px 6px;
}

.proj-opt {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--pk-text);
  font-size: 13px;
  font-family: inherit;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-opt:hover {
  background: var(--pk-soft);
}

.proj-opt.on {
  color: var(--pk-accent);
  font-weight: 600;
  background: #eef2fb;
}

.proj-new {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--pk-border);
}

.proj-new input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--pk-border);
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
}

.proj-new input:focus {
  border-color: var(--pk-accent);
}

.proj-new .pocket-primary {
  height: auto;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 8px;
}

/* ---------------- 视图切换 ---------------- */
.view-switch {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  margin-bottom: 10px;
  border-radius: 9px;
  background: var(--pk-soft);
  align-self: flex-start;
}

.vs-btn {
  border: 0;
  background: transparent;
  color: var(--pk-sub);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  padding: 4px 13px;
  border-radius: 7px;
  cursor: pointer;
  transition: all .16s;
}

.vs-btn:hover {
  color: var(--pk-text);
}

.vs-btn.active {
  background: #fff;
  color: var(--pk-accent);
  box-shadow: 0 1px 3px rgba(20, 26, 38, .12);
}

/* 四象限配色（1 红 → 4 灰） */
.qd-1 { --qd: #e5534b; }
.qd-2 { --qd: #4e6ef2; }
.qd-3 { --qd: #f0a020; }
.qd-4 { --qd: #9aa5b5; }

/* 列表里的象限徽章 */
.todo-quad {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  width: 19px;
  height: 19px;
  border: 0;
  border-radius: 6px;
  background: var(--qd);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  line-height: 19px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  transition: filter .16s;
}

.todo-quad:hover {
  filter: brightness(1.1);
}

.todo-item.done .todo-quad {
  opacity: .45;
}

/* ---------------- 四象限看板 ---------------- */
.quad-board {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 4px;
}

.quad-board[hidden] {
  display: none;
}

.quad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quad-cell {
  border: 1px solid var(--pk-border);
  border-top: 3px solid var(--qd, #ccd3de);
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  min-height: 110px;
}

.quad-cell.quad-q1 { --qd: #e5534b; }
.quad-cell.quad-q2 { --qd: #4e6ef2; }
.quad-cell.quad-q3 { --qd: #f0a020; }
.quad-cell.quad-q4 { --qd: #9aa5b5; }

.quad-none {
  margin-top: 8px;
  border: 1px dashed var(--pk-border);
  border-radius: 10px;
  background: var(--pk-soft);
  padding: 8px;
}

.quad-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 1px;
}

.quad-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--pk-text);
}

.quad-n {
  font-size: 11px;
  color: #b6bfcc;
}

.quad-hint {
  font-size: 10.5px;
  color: #c3cad6;
  margin-bottom: 6px;
}

.quad-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quad-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 7px;
  background: var(--pk-soft);
  cursor: pointer;
  transition: background .15s;
}

.quad-item:hover {
  background: #eaeef6;
}

.quad-item .todo-check {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  border-radius: 5px;
}

.quad-item .todo-check svg {
  width: 10px;
  height: 10px;
}

.quad-text {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}

.quad-item.done .quad-text {
  color: var(--pk-sub);
  text-decoration: line-through;
}

.quad-star {
  flex-shrink: 0;
  color: var(--pk-warn);
  font-size: 11px;
  line-height: 1.4;
}

/* ---------------- 象限选择浮层（居中） ---------------- */
.quad-modal {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(20, 26, 38, .42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.qm-card {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 18px 50px rgba(20, 26, 38, .28);
  max-height: 100%;
  overflow-y: auto;
}

.qm-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--pk-text);
  margin-bottom: 4px;
}

.qm-text {
  font-size: 12.5px;
  color: var(--pk-sub);
  margin-bottom: 12px;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qm-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qm-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 1px solid var(--pk-border);
  background: #fff;
  border-radius: 10px;
  padding: 9px 11px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all .16s;
}

.qm-opt:hover {
  border-color: #cfd8e6;
  background: var(--pk-soft);
}

.qm-opt.on {
  border-color: var(--pk-accent);
  background: #eef2fb;
}

.qm-opt b {
  font-size: 13px;
  font-weight: 600;
  color: var(--pk-text);
}

.qm-opt em {
  font-style: normal;
  font-size: 11px;
  color: #b6bfcc;
  margin-left: auto;
}

.qm-opt .qd {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
  background: #ccd3de;
}

.qm-opt .qd-1 { background: #e5534b; }
.qm-opt .qd-2 { background: #4e6ef2; }
.qm-opt .qd-3 { background: #f0a020; }
.qm-opt .qd-4 { background: #9aa5b5; }
.qm-opt .qd-0 { background: #ccd3de; }

/* ---------------- 待办列表 ---------------- */
.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 10px;
  transition: background .15s;
}

.todo-item:hover {
  background: var(--pk-soft);
}

.todo-check {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  margin-top: 2px;
  border: 1.5px solid #cbd3e0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all .18s;
  padding: 0;
}

.todo-check:hover {
  border-color: var(--pk-accent);
}

.todo-item.done .todo-check {
  background: var(--pk-accent);
  border-color: var(--pk-accent);
}

.todo-check svg {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}

.todo-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  cursor: text;
  padding-top: 1px;
}

.todo-item.done .todo-text {
  color: var(--pk-sub);
  text-decoration: line-through;
}

.todo-item.starred .todo-text {
  font-weight: 600;
}

.todo-edit {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--pk-accent);
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.todo-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #c3cad6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 常驻可见（低透明度），悬停增强。
     若仅靠 :hover 显示，触屏设备上完全无法触达。 */
  opacity: .5;
  transition: all .18s;
  padding: 0;
}

.todo-item:hover .todo-icon,
.note-card:hover .todo-icon,
.todo-icon.on {
  opacity: 1;
}

/* 触屏设备没有 hover，直接全显示 */
@media (hover: none) {
  .todo-icon {
    opacity: 1;
  }
}

.todo-icon:hover {
  color: var(--pk-accent);
  background: #eef2fb;
}

.todo-icon.on {
  color: var(--pk-warn);
}

.todo-icon.danger:hover {
  color: var(--pk-danger);
  background: #fdeceb;
}

/* ---------------- 底部 ---------------- */
.pocket-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid var(--pk-border);
  font-size: 12.5px;
  color: var(--pk-sub);
  flex-shrink: 0;
}

.pocket-empty {
  text-align: center;
  color: #b6bfcc;
  font-size: 13px;
  padding: 40px 0;
}

.pocket-empty[hidden] {
  display: none;
}

/* ---------------- 便签网格 ---------------- */
.note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  align-content: start;
}

.note-card {
  position: relative;
  border: 1px solid var(--pk-border);
  border-radius: var(--pk-radius);
  background: var(--pk-soft);
  padding: 12px 12px 10px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  min-height: 110px;
  display: flex;
  flex-direction: column;
}

.note-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(30, 40, 70, .1);
  border-color: #d8dfea;
}

.note-card.pinned {
  border-color: var(--pk-warn);
  box-shadow: 0 0 0 1px rgba(240, 160, 32, .25);
}

.note-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.note-title {
  font-weight: 600;
  font-size: 14px;
  word-break: break-word;
  flex: 1;
  min-width: 0;
}

.note-title i {
  color: #b6bfcc;
  font-style: normal;
  font-weight: 400;
}

.note-actions {
  display: flex;
  gap: 1px;
  flex-shrink: 0;
}

.note-body {
  flex: 1;
  font-size: 13px;
  color: #5a6474;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
  max-height: 7.2em;
}

.note-placeholder {
  color: #b6bfcc;
  font-style: normal;
}

.note-time {
  margin-top: 8px;
  font-size: 11.5px;
  color: #b6bfcc;
}

/* ---------------- 便签编辑器 ---------------- */
.pocket-editor {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(20, 26, 38, .42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: inherit;
}

.pocket-editor[hidden] {
  display: none;
}

.pocket-editor-inner {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: var(--pk-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 18px 50px rgba(20, 26, 38, .28);
  max-height: 100%;
}

.pocket-editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pocket-colors {
  display: flex;
  gap: 6px;
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--pk-border);
  cursor: pointer;
  padding: 0;
  background: #fff;
  transition: transform .15s, box-shadow .15s;
}

.color-dot:hover {
  transform: scale(1.12);
}

.color-dot.on {
  box-shadow: 0 0 0 2px var(--pk-accent);
}

.pocket-editor-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pocket-editor-btns .pocket-primary {
  height: 34px;
}

/* ---------------- 抽屉（首页）---------------- */
#pocket-drawer {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
}

#pocket-drawer.open {
  pointer-events: auto;
}

#pocket-drawer .pocket-mask {
  position: absolute;
  inset: 0;
  background: rgba(16, 22, 34, .32);
  opacity: 0;
  transition: opacity .26s;
  backdrop-filter: blur(1px);
}

#pocket-drawer.open .pocket-mask {
  opacity: 1;
}

#pocket-drawer .pocket-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 92vw;
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 34px rgba(16, 22, 34, .16);
  transform: translateX(102%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
}

#pocket-drawer.open .pocket-panel {
  transform: translateX(0);
}

#pocket-drawer .pocket {
  position: relative;
  height: 100%;
}

/* 抽屉里的弹层改为相对面板定位 */
#pocket-drawer .pocket-editor {
  border-radius: 0;
}

/* ---------------- 悬浮按钮 ---------------- */
/* 两个独立入口：便签在上、待办在下 */
.pocket-fab {
  position: fixed;
  right: 16px;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s, filter .18s;
}

.pocket-fab:hover {
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.06);
}

.pocket-fab svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 待办（下） */
#pocket-fab-todo {
  bottom: 118px;
  background: #4e6ef2;
  box-shadow: 0 6px 20px rgba(78, 110, 242, .42);
}

/* 便签（上） */
#pocket-fab-note {
  bottom: 176px;
  background: #f0a020;
  box-shadow: 0 6px 20px rgba(240, 160, 32, .42);
}

.pocket-fab .fab-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #e5534b;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  font-weight: 600;
}

.pocket-fab .fab-badge[hidden] {
  display: none;
}

/* 悬浮按钮上的小标题（鼠标悬停显示，移动端不占位） */
.pocket-fab::after {
  content: attr(data-label);
  position: absolute;
  right: 58px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 26, 38, .86);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 7px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
}

.pocket-fab:hover::after {
  opacity: 1;
}

/* ---------------- 独立页 ---------------- */
.pocket-page-wrap {
  position: relative;
  z-index: 100;
  width: 100%;
  max-width: 1080px;
  margin: 10vh auto 40px;
  padding: 0 20px;
}

.pocket-page-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(20, 26, 38, .1);
  height: 78vh;
  min-height: 460px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pocket-page-card .pocket {
  height: 100%;
}

.pocket-page-card .note-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.pocket-page-title {
  text-align: center;
  color: #fff;
  font-size: 26px;
  font-weight: 600;
  text-shadow: 1px 1px 8px #504b4b;
  margin: 0 0 18px;
}

/* ---------------- Toast ---------------- */
.pocket-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 12px);
  z-index: 100000;
  background: #2b3440;
  color: #fff;
  font-size: 13.5px;
  padding: 9px 18px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  box-shadow: 0 8px 24px rgba(20, 26, 38, .24);
}

.pocket-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.pocket-toast.err {
  background: #e5534b;
}

/* ---------------- 移动端 ---------------- */
@media screen and (max-width: 640px) {
  .pocket-fab {
    right: 12px;
    width: 44px;
    height: 44px;
  }

  #pocket-fab-todo {
    bottom: 96px;
  }

  #pocket-fab-note {
    bottom: 150px;
  }

  .pocket-fab::after {
    display: none;
  }

  #pocket-drawer .pocket-panel {
    width: 100%;
    max-width: 100%;
  }

  .note-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .pocket-page-wrap {
    margin-top: 6vh;
    padding: 0 12px;
  }

  .pocket-page-card {
    height: 80vh;
    border-radius: 14px;
  }
}
