.finance-chart {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  align-items: end;
  height: 190px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 21px;
}

.chart-month {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 7px;
  text-align: center;
  color: var(--muted);
  font: 600 .6rem ui-monospace, monospace;
}

.chart-bars {
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
}

.chart-bar {
  width: min(22px, 38%);
  min-height: 3px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(var(--mint), rgba(113, 240, 203, .22));
  box-shadow: 0 0 15px rgba(113, 240, 203, .08);
}

.chart-bar.expense { background: linear-gradient(var(--pink), rgba(236, 140, 255, .2)); }

.calendar-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 18px;
  padding: 13px;
  border-radius: 21px;
}

.calendar-day {
  min-height: 95px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 11, 20, .24);
  text-align: center;
}

.calendar-day.today {
  border-color: rgba(113, 240, 203, .45);
  box-shadow: inset 0 0 20px rgba(113, 240, 203, .05);
}

.calendar-day span, .calendar-day strong, .calendar-day small { display: block; }
.calendar-day span { color: var(--muted); font-size: .63rem; }
.calendar-day strong { margin: 2px 0; font: 800 1.15rem ui-monospace, monospace; }
.calendar-day small { color: var(--pink); font-size: .62rem; }
.markdown-preview h4 { margin: 9px 0 3px; color: #eaf9f4; }
.markdown-preview p, .markdown-preview li { margin: 3px 0; color: var(--muted); font-size: .75rem; }
.markdown-preview ul { margin: 4px 0; padding-left: 20px; }

@media (max-width: 650px) {
  .finance-chart { gap: 5px; padding: 12px 7px; }
  .calendar-strip { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 940px) {
  .owner-shell { grid-template-columns: minmax(0, 1fr) !important; }
  .owner-sidebar { min-width: 0; overflow: hidden; }
  .owner-sidebar nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

body.owner-route main > section:not(.owner-shell),
body.owner-route footer { display: none; }

body.owner-route main { min-height: calc(100vh - 104px); }
body.owner-route .owner-shell {
  width: min(1560px, calc(100vw - 32px));
  max-width: 1560px;
  margin-top: 24px;
  margin-bottom: 36px;
  box-sizing: border-box;
}
body.owner-route .topbar nav > a { display: none; }

.owner-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-width: 0;
  box-sizing: border-box;
}

.owner-content {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.dashboard-panel {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.owner-sidebar nav .owner-notes-link {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid rgba(113, 240, 203, .24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(113, 240, 203, .11), rgba(119, 217, 255, .045));
  color: #dffdf5;
  font-size: .74rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.owner-sidebar nav .owner-notes-link:hover {
  transform: translateY(-2px);
  border-color: rgba(113, 240, 203, .55);
  box-shadow: 0 12px 26px rgba(7, 17, 29, .32), 0 0 22px rgba(113, 240, 203, .08);
}

.tool-showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.2vw, 24px);
}

.tool-entry {
  min-height: clamp(300px, 28vw, 350px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 22px);
  padding: clamp(20px, 3vw, 30px);
  border-radius: clamp(22px, 2.5vw, 28px);
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.tool-entry:hover {
  transform: translateY(-5px);
  border-color: rgba(113, 240, 203, .3);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .22), 0 0 36px rgba(113, 240, 203, .05);
}

.tool-entry-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
}

.tool-entry-head img {
  width: clamp(60px, 6.5vw, 76px);
  height: clamp(60px, 6.5vw, 76px);
  border-radius: clamp(18px, 2vw, 24px);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .22));
}

.tool-entry-index {
  color: #71839a;
  font: 700 .75rem ui-monospace, monospace;
  letter-spacing: .12em;
}

.tool-entry h3 {
  margin: 7px 0 8px;
  font-size: clamp(1.65rem, 2.5vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.tool-entry p { margin: 0; color: var(--muted); font-size: clamp(.92rem, 1.15vw, 1.04rem); line-height: 1.55; }
.tool-domain { margin-top: auto; color: #93a7be; font: 650 .78rem ui-monospace, monospace; overflow-wrap: anywhere; }
.tool-entry-actions { display: flex; gap: 9px; }
.tool-entry-actions .mini-primary, .tool-entry-actions .ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 14px; }
.tool-entry-actions .ghost { color: var(--text); }
.tool-entry-study { background: radial-gradient(circle at 10% 0, rgba(236, 140, 255, .12), transparent 48%), linear-gradient(145deg, rgba(28, 42, 66, .68), rgba(13, 22, 38, .78)); }
.tool-entry-pdf { background: radial-gradient(circle at 10% 0, rgba(184, 243, 74, .1), transparent 48%), linear-gradient(145deg, rgba(22, 52, 48, .7), rgba(13, 28, 30, .82)); }
.tool-entry-audio { background: radial-gradient(circle at 10% 0, rgba(34, 211, 238, .12), transparent 48%), linear-gradient(145deg, rgba(26, 32, 68, .7), rgba(14, 18, 36, .82)); }
.tool-entry-youtube { background: radial-gradient(circle at 10% 0, rgba(251, 113, 133, .14), transparent 48%), linear-gradient(145deg, rgba(64, 22, 36, .7), rgba(28, 13, 22, .84)); }

.uptime-title { align-items: end; }
.uptime-title h3 { margin-top: 8px; }
.status-chip.offline { color: var(--danger); border-color: rgba(255, 123, 138, .3); }
.uptime-hero {
  min-height: 210px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  margin-top: 22px;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 26px;
  overflow: hidden;
}
.uptime-label { color: var(--muted); font: 700 .75rem ui-monospace, monospace; letter-spacing: .12em; }
.uptime-hero strong { display: block; margin-top: 7px; font-size: clamp(1.9rem, 4vw, 3.3rem); line-height: 1.08; letter-spacing: -.045em; }
.uptime-hero p { margin: 10px 0 0; color: var(--muted); font-size: 1rem; }
.uptime-orb { position: relative; width: 118px; height: 118px; display: grid; place-items: center; border: 1px solid rgba(113, 240, 203, .28); border-radius: 50%; background: radial-gradient(circle, rgba(113, 240, 203, .24), rgba(113, 240, 203, .02) 62%); box-shadow: inset 0 0 30px rgba(113, 240, 203, .08), 0 0 46px rgba(113, 240, 203, .12); }
.uptime-orb span { width: 38px; height: 38px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 26px var(--mint); animation: uptimePulse 2.2s ease-in-out infinite; }
.uptime-orb.degraded { border-color: rgba(255, 199, 109, .34); background: radial-gradient(circle, rgba(255, 199, 109, .22), transparent 65%); }
.uptime-orb.degraded span { background: var(--amber); box-shadow: 0 0 26px var(--amber); }
.uptime-orb.offline { border-color: rgba(255, 123, 138, .32); background: radial-gradient(circle, rgba(255, 123, 138, .2), transparent 65%); }
.uptime-orb.offline span { background: var(--danger); box-shadow: 0 0 26px var(--danger); }
.uptime-orb.pending span { background: var(--cyan); box-shadow: 0 0 26px var(--cyan); }
.uptime-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.uptime-resources { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin-top: 10px; padding: 13px 16px; border-radius: 17px; }
.resource-title { color: var(--cyan); font: 700 .7rem ui-monospace, monospace; letter-spacing: .04em; }
.resource-item { display: inline-flex; align-items: baseline; gap: 7px; padding-left: 12px; border-left: 1px solid var(--line); }
.resource-item small { color: var(--muted); font-size: .65rem; }
.resource-item strong { color: var(--text); font: 700 .72rem ui-monospace, monospace; }
.uptime-card { min-width: 0; padding: 18px; border-radius: 21px; }
.uptime-card-head, .uptime-service-title, .uptime-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.uptime-service-title { justify-content: start; min-width: 0; }
.uptime-service-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.uptime-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--mint); box-shadow: 0 0 13px var(--mint); }
.status-0 .uptime-dot { background: var(--danger); box-shadow: 0 0 13px var(--danger); }
.status-2 .uptime-dot, .status-3 .uptime-dot { background: var(--amber); box-shadow: 0 0 13px var(--amber); }
.uptime-state { color: var(--mint); font: 700 .72rem ui-monospace, monospace; }
.status-0 .uptime-state { color: var(--danger); }
.status-2 .uptime-state, .status-3 .uptime-state { color: var(--amber); }
.uptime-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 20px 0 13px; }
.uptime-stats div { padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: rgba(4, 11, 20, .24); }
.uptime-stats span, .uptime-stats strong { display: block; }
.uptime-stats span { color: var(--muted); font-size: .72rem; }
.uptime-stats strong { margin-top: 4px; font: 750 .9rem ui-monospace, monospace; }
.uptime-timeline { height: 32px; display: flex; align-items: stretch; gap: 3px; }
.uptime-timeline i { min-width: 3px; flex: 1; border-radius: 4px; background: rgba(113, 240, 203, .68); }
.uptime-timeline .beat-0 { background: rgba(255, 123, 138, .8); }
.uptime-timeline .beat-2, .uptime-timeline .beat-3 { background: rgba(255, 199, 109, .55); }
.uptime-message { min-height: 2.8em; margin: 12px 0; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.uptime-card-footer { align-items: end; }
.uptime-card-footer small { color: #76889e; font-size: .7rem; }
.uptime-card-footer a { color: var(--cyan); font-size: .74rem; text-decoration: none; white-space: nowrap; }
.uptime-card-offline { grid-column: 1 / -1; }
.uptime-card-offline p { color: var(--muted); }
.uptime-footnote { margin: 14px 3px 0; color: var(--muted); font-size: .78rem; }

@keyframes uptimePulse { 50% { transform: scale(.72); opacity: .58; } }

.module-coming {
  margin: 18px 6px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 13px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.55;
}

.pet-wrap {
  width: clamp(108px, 14vw, 184px);
  animation: none;
  outline: none;
  transition: filter .2s ease, transform .2s ease;
}

.pet-wrap:focus-visible {
  border-radius: 42%;
  box-shadow: 0 0 0 3px rgba(113, 240, 203, .35);
}

.pet-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  pointer-events: none;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .28));
}

.pet-wrap::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 13%;
  right: 13%;
  bottom: 2%;
  height: 16%;
  border-radius: 50%;
  background: rgba(113, 240, 203, .22);
  filter: blur(12px);
  animation: petGlow 2.8s ease-in-out infinite;
}

.pet-wrap.dragging { transform: scale(1.06) rotate(-2deg); }
.pet-wrap[data-mood="love"]::after { background: rgba(236, 140, 255, .34); }
.pet-wrap[data-mood="surprised"]::after { background: rgba(255, 199, 109, .32); }
.pet-wrap[data-mood="sleep"]::after { background: rgba(119, 217, 255, .18); }

.pet-emote {
  position: absolute;
  right: 2%;
  top: 8%;
  min-width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  border: 1px solid rgba(119, 217, 255, .38);
  border-radius: 999px;
  background: rgba(10, 20, 36, .92);
  color: var(--cyan);
  font: 800 .7rem ui-monospace, monospace;
  box-shadow: 0 0 22px rgba(119, 217, 255, .2);
  animation: emoteFloat 2.2s ease-in-out infinite;
}

.pet-wrap[data-mood="love"] .pet-emote { color: var(--pink); }
.pet-wrap[data-mood="surprised"] .pet-emote { color: var(--amber); }
.pet-wrap[data-mood="sleep"] .pet-emote { color: var(--cyan); }

@keyframes petGlow {
  50% { opacity: .45; transform: scaleX(.72); }
}

@keyframes emoteFloat {
  50% { transform: translateY(-5px) rotate(5deg); }
}

.file-space-title {
  align-items: end;
  margin-bottom: 18px;
}

.manager-link {
  flex: 0 0 auto;
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.file-security {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border-color: rgba(113, 240, 203, .22);
  background: linear-gradient(135deg, rgba(113, 240, 203, .08), rgba(119, 217, 255, .035));
}

.file-security > span {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(113, 240, 203, .12);
  color: var(--mint);
  font-size: 1.2rem;
}

.file-security strong, .file-security p { display: block; }
.file-security p { margin: 2px 0 0; color: var(--muted); font-size: .76rem; }

.file-space-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(270px, .8fr);
  gap: 12px;
  margin-top: 12px;
}

.upload-card, .folder-card, .file-list-card {
  padding: 19px;
  border-radius: 21px;
}

.upload-card .panel-head, .folder-card .panel-head, .file-list-card .panel-head { align-items: start; }
.upload-card h3, .folder-card h3, .file-list-card h3 { margin: 0; font-size: 1rem; }
.upload-card .panel-head p, .folder-card .panel-head p, .file-list-card .panel-head p { margin: 3px 0 0; color: var(--muted); font-size: .72rem; }

.upload-dropzone {
  min-height: 190px;
  margin-top: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(119, 217, 255, .34);
  border-radius: 18px;
  background: radial-gradient(circle, rgba(119, 217, 255, .08), rgba(4, 11, 20, .18) 68%);
  text-align: center;
  cursor: pointer;
  transition: .2s ease;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--mint);
  background: radial-gradient(circle, rgba(113, 240, 203, .13), rgba(4, 11, 20, .24) 70%);
  transform: translateY(-2px);
}

.upload-dropzone.busy { opacity: .55; pointer-events: none; }
.upload-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-dropzone strong, .upload-dropzone small { display: block; }
.upload-dropzone small { margin-top: 5px; color: var(--muted); font-size: .7rem; }
.upload-icon { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 12px; border: 1px solid rgba(113, 240, 203, .28); border-radius: 17px; background: rgba(113, 240, 203, .09); color: var(--mint); font-size: 1.5rem; }

.upload-progress { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: rgba(4, 11, 20, .28); }
.upload-progress-head { display: flex; justify-content: space-between; gap: 12px; font-size: .76rem; }
.upload-progress-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-progress-head span { color: var(--mint); font: 750 .76rem ui-monospace, monospace; }
.progress-track { height: 7px; margin: 10px 0 7px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .07); }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--cyan)); box-shadow: 0 0 16px rgba(113, 240, 203, .35); transition: width .16s linear; }
.upload-progress > small { color: var(--muted); font-size: .68rem; }

.folder-card form { margin-top: 25px; }
.folder-card label { display: block; margin-bottom: 7px; color: var(--muted); font-size: .72rem; }
.folder-card form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.folder-card input { min-width: 0; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: rgba(3, 9, 18, .5); color: var(--text); }
.storage-root { margin-top: 27px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(4, 11, 20, .25); }
.storage-root span, .storage-root code { display: block; }
.storage-root span { margin-bottom: 5px; color: var(--muted); font-size: .66rem; }
.storage-root code { color: #a9c0d8; font-size: .68rem; overflow-wrap: anywhere; }

.file-list-card { margin-top: 12px; }
.file-refresh { min-height: 36px; padding: 7px 11px; color: var(--text); }
.file-table-wrap { max-height: 440px; margin-top: 13px; overflow: auto; }
.file-table td:first-child { min-width: 240px; }
.file-name { display: flex; align-items: center; gap: 9px; }
.file-name-icon { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .035); color: var(--cyan); }
.file-name-icon.folder { color: var(--amber); }
.file-download { display: inline-flex; padding: 6px 9px; border: 1px solid rgba(113, 240, 203, .24); border-radius: 9px; color: var(--mint); text-decoration: none; white-space: nowrap; }
.file-empty-row td { padding: 45px 12px; color: var(--muted); text-align: center; }

@media (max-width: 760px) {
  .uptime-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .tool-showcase-grid { grid-template-columns: 1fr; }
  .tool-entry { min-height: auto; padding: 22px; }
  .tool-entry-actions { flex-wrap: wrap; }
  .uptime-title { align-items: start; flex-direction: column; }
  .uptime-hero { grid-template-columns: 1fr auto; padding: 20px; }
  .uptime-orb { width: 76px; height: 76px; }
  .uptime-orb span { width: 25px; height: 25px; }
  .pet-wrap { width: clamp(88px, 27vw, 118px); }
  .pet-emote { min-width: 27px; height: 27px; font-size: .62rem; }
  .file-space-title { align-items: stretch; flex-direction: column; }
  .manager-link { width: 100%; }
  .file-space-grid { grid-template-columns: 1fr; }
  .file-security { align-items: start; }
  .file-table-wrap { max-height: 520px; }
}

/* ==========================================================================
   macOS Sequoia / iOS Aesthetic - Markdown Knowledge Space
   ========================================================================== */

.knowledge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.advanced-subdomain-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 99px;
  background: linear-gradient(135deg, rgba(113, 240, 203, 0.2), rgba(119, 217, 255, 0.12));
  border: 1px solid rgba(113, 240, 203, 0.4);
  color: var(--mint);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(113, 240, 203, 0.12);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.advanced-subdomain-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(113, 240, 203, 0.25);
  border-color: var(--mint);
  color: #fff;
}

.obsidian-workspace,
.sequoia-split-view {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 320px;
  gap: 16px;
  min-height: 760px;
  margin-top: 18px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  transition: grid-template-columns 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.obsidian-workspace.left-collapsed {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.obsidian-workspace.right-collapsed {
  grid-template-columns: 280px minmax(0, 1fr);
}

.obsidian-workspace.left-collapsed.right-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.obsidian-workspace.left-collapsed #leftSidebarPanel,
.obsidian-workspace.right-collapsed #rightSidebarPanel {
  display: none !important;
}

/* Center Canvas */
.obsidian-canvas,
.sequoia-canvas {
  display: flex;
  flex-direction: column;
  min-height: 720px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(20, 32, 52, 0.72), rgba(10, 18, 30, 0.85));
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.canvas-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.canvas-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 220px;
  overflow: hidden;
}

.canvas-mode-badge {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(113, 240, 203, 0.12);
  color: var(--mint);
  border: 1px solid rgba(113, 240, 203, 0.28);
}

.canvas-mode-badge.editing {
  background: rgba(255, 199, 109, 0.15);
  color: var(--amber);
  border-color: rgba(255, 199, 109, 0.35);
}

.canvas-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.canvas-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
}

.sequoia-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  color: #e2ecf7;
  font-size: 0.74rem;
  font-weight: 650;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sequoia-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.sequoia-btn:active {
  transform: scale(0.97);
}

.sequoia-btn.danger {
  color: #ff8595;
  border-color: rgba(255, 133, 149, 0.25);
  background: rgba(255, 133, 149, 0.06);
}

.sequoia-btn.danger:hover {
  background: rgba(255, 133, 149, 0.18);
  border-color: rgba(255, 133, 149, 0.45);
}

.sequoia-btn.primary-action-btn {
  background: linear-gradient(135deg, rgba(87, 241, 208, 0.22), rgba(119, 217, 255, 0.25));
  border-color: rgba(87, 241, 208, 0.45);
  color: #79ffe4;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(87, 241, 208, 0.15);
}

.sequoia-btn.primary-action-btn:hover {
  background: linear-gradient(135deg, rgba(87, 241, 208, 0.35), rgba(119, 217, 255, 0.38));
  border-color: rgba(87, 241, 208, 0.7);
  box-shadow: 0 6px 20px rgba(87, 241, 208, 0.28);
}

.math-fallback {
  font-family: "KaTeX_Main", "Cambria Math", "Times New Roman", serif;
  font-style: italic;
  color: #79ffe4;
  padding: 0 3px;
}

.math-fallback.math-block {
  display: block;
  text-align: center;
  margin: 16px 0;
  padding: 12px 16px;
  background: rgba(87, 241, 208, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(87, 241, 208, 0.15);
}

.katex-display {
  margin: 16px 0 !important;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
}

/* YAML Metadata Card */
.sequoia-yaml-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(2, 6, 14, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
  min-width: 0;
  max-width: 100%;
}

.yaml-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.yaml-tags-item {
  flex: 1 1 180px;
}

.yaml-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.yaml-val {
  font-weight: 650;
  color: #71f0cb;
}

.yaml-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.yaml-tag-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(113, 240, 203, 0.08);
  border: 1px solid rgba(113, 240, 203, 0.22);
  color: var(--mint);
  font-size: 0.64rem;
  font-weight: 600;
}

/* Canvas Markdown Body */
.canvas-markdown-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 4px;
  line-height: 1.72;
  color: #dce7f5;
  font-size: 0.92rem;
}

.canvas-markdown-body h1 {
  font-size: 1.8rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin: 22px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.canvas-markdown-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 18px 0 10px;
  color: #f2f7fc;
}

.canvas-markdown-body h3 {
  font-size: 1.15rem;
  font-weight: 650;
  margin: 16px 0 8px;
  color: #d7e4f5;
}

.canvas-markdown-body h4,
.canvas-markdown-body h5,
.canvas-markdown-body h6 {
  font-size: 1rem;
  font-weight: 600;
  margin: 14px 0 6px;
  color: #c0d1e5;
}

.canvas-markdown-body p {
  margin: 10px 0;
  color: #cbd8e8;
}

.canvas-markdown-body strong {
  font-weight: 700;
  color: #fff;
}

.canvas-markdown-body em {
  color: var(--pink);
  font-style: italic;
}

.canvas-markdown-body del {
  color: #72849a;
  text-decoration: line-through;
}

.canvas-markdown-body hr {
  border: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 24px 0;
}

.canvas-markdown-body blockquote {
  margin: 14px 0;
  padding: 10px 18px;
  border-left: 3px solid var(--mint);
  border-radius: 0 12px 12px 0;
  background: rgba(113, 240, 203, 0.05);
  color: #b5e1d5;
}

.canvas-markdown-body blockquote p {
  margin: 4px 0;
}

.canvas-markdown-body ul,
.canvas-markdown-body ol {
  padding-left: 22px;
  margin: 10px 0;
}

.canvas-markdown-body li {
  margin: 5px 0;
}

.canvas-markdown-body li.task-item {
  list-style: none;
  margin-left: -18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.canvas-markdown-body li.task-item input[type="checkbox"] {
  accent-color: var(--mint);
  width: 15px;
  height: 15px;
  cursor: default;
}

.canvas-markdown-body a:not(.wiki-link) {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.16s ease;
}

.canvas-markdown-body a:not(.wiki-link):hover {
  color: var(--mint);
}

.canvas-markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 9, 18, 0.35);
}

.canvas-markdown-body th,
.canvas-markdown-body td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  text-align: left;
}

.canvas-markdown-body th {
  background: rgba(255, 255, 255, 0.045);
  font-weight: 700;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.canvas-markdown-body code:not(pre code) {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(119, 217, 255, 0.12);
  border: 1px solid rgba(119, 217, 255, 0.2);
  color: #8ce3ff;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.84em;
}

/* Code block wrapper with copy button */
.code-block-wrapper {
  position: relative;
  margin: 16px 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(3, 8, 16, 0.82);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
  color: var(--muted);
}

.code-copy-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd7e7;
  border-radius: 7px;
  padding: 3px 9px;
  font-size: 0.68rem;
  cursor: pointer;
  transition: all 0.16s ease;
}

.code-copy-btn:hover {
  background: rgba(113, 240, 203, 0.14);
  border-color: rgba(113, 240, 203, 0.38);
  color: var(--mint);
}

.code-copy-btn.copied {
  background: rgba(113, 240, 203, 0.22);
  border-color: var(--mint);
  color: var(--mint);
}

.code-block-wrapper pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #a4f2da;
}

/* Wiki-link badge */
.wiki-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  margin: 0 3px;
  border-radius: 8px;
  border: 1px solid rgba(113, 240, 203, 0.35);
  background: rgba(113, 240, 203, 0.08);
  color: var(--mint);
  font-weight: 650;
  font-size: 0.86em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.wiki-link:hover {
  background: rgba(113, 240, 203, 0.2);
  border-color: var(--mint);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(113, 240, 203, 0.25);
}

/* Placeholder */
.canvas-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 380px;
  text-align: center;
  color: var(--muted);
}

.placeholder-orb {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(113, 240, 203, 0.3);
  background: rgba(113, 240, 203, 0.06);
  color: var(--mint);
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.canvas-placeholder h3 {
  margin: 0 0 8px;
  color: #e2edfa;
  font-size: 1.25rem;
}

.canvas-placeholder p {
  max-width: 420px;
  font-size: 0.82rem;
  line-height: 1.6;
}

/* Edit Form */
.canvas-edit-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 4px;
}

.edit-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.edit-fields-grid label,
.edit-content-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.edit-fields-grid input,
.edit-content-label textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(3, 9, 18, 0.55);
  color: #fff;
  font-size: 0.82rem;
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.edit-content-label textarea {
  font-family: ui-monospace, "SF Mono", monospace;
  line-height: 1.6;
  resize: vertical;
}

.edit-fields-grid input:focus,
.edit-content-label textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(113, 240, 203, 0.12);
}

.edit-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

/* Backlinks */
.canvas-backlinks {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 16px;
  margin-top: auto;
}

.backlinks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.backlinks-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.backlinks-icon {
  color: var(--mint);
  font-size: 1rem;
}

.backlinks-title h4 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #e5effa;
}

.backlinks-count {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--mint);
  font-size: 0.65rem;
  font-weight: 700;
}

.backlinks-hint {
  color: var(--muted);
  font-size: 0.64rem;
}

.backlinks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
}

.backlink-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: #d6e4f5;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.backlink-chip:hover {
  background: rgba(113, 240, 203, 0.12);
  border-color: rgba(113, 240, 203, 0.4);
  color: var(--mint);
  transform: translateY(-1px);
}

/* Left & Right Sidebars Base */
.obsidian-left-sidebar,
.sequoia-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(20, 32, 52, 0.78), rgba(10, 18, 32, 0.86));
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  min-width: 0;
  overflow: hidden;
}

.sidebar-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2px;
}

.sidebar-title-tag {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.icon-tiny-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: #c9d8ea;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-tiny-btn:hover {
  background: rgba(113, 240, 203, 0.14);
  border-color: rgba(113, 240, 203, 0.38);
  color: var(--mint);
  transform: scale(1.06);
}

.icon-tiny-btn:active {
  transform: scale(0.95);
}

.icon-toggle-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(113, 240, 203, 0.35);
  background: rgba(113, 240, 203, 0.08);
  color: var(--mint);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-toggle-inline:hover {
  background: rgba(113, 240, 203, 0.2);
  transform: scale(1.06);
  box-shadow: 0 0 12px rgba(113, 240, 203, 0.3);
}

/* Spotlight Box */
.spotlight-box {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(3, 8, 16, 0.55);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.spotlight-box:focus-within {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(113, 240, 203, 0.14), inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.spotlight-icon {
  font-size: 0.85rem;
  opacity: 0.55;
  margin-right: 6px;
}

.spotlight-box input {
  flex: 1;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 0.78rem;
  outline: 0;
}

.spotlight-clear-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  font-size: 0.8rem;
}

/* Sidebar Quick Action Buttons */
.sidebar-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sequoia-new-note-btn {
  width: 100%;
  padding: 9px;
  border-radius: 12px;
  border: 1px dashed rgba(113, 240, 203, 0.38);
  background: rgba(113, 240, 203, 0.05);
  color: var(--mint);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sequoia-new-note-btn:hover {
  background: rgba(113, 240, 203, 0.14);
  border-color: var(--mint);
  transform: translateY(-1px);
}

.sequoia-new-folder-btn {
  width: 100%;
  padding: 9px;
  border-radius: 12px;
  border: 1px dashed rgba(119, 217, 255, 0.35);
  background: rgba(119, 217, 255, 0.05);
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sequoia-new-folder-btn:hover {
  background: rgba(119, 217, 255, 0.14);
  border-color: var(--cyan);
  transform: translateY(-1px);
}

/* Tags Filter Capsule Bar */
.tags-capsule-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 3px 1px;
  scrollbar-width: none;
}

.tags-capsule-bar::-webkit-scrollbar {
  display: none;
}

.tag-capsule {
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.tag-capsule:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.tag-capsule.active {
  background: var(--mint);
  color: #08111e;
  border-color: var(--mint);
  font-weight: 750;
  box-shadow: 0 2px 10px rgba(113, 240, 203, 0.25);
}

/* Folder Tree Container */
.folder-tree-container {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100vh - 380px);
  min-height: 200px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(113, 240, 203, 0.2) transparent;
}

.folder-item {
  border-radius: 14px;
  background: rgba(5, 12, 22, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  transition: all 0.2s ease;
}

.folder-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  color: #e5effa;
  user-select: none;
  min-width: 0;
  max-width: 100%;
  transition: background 0.15s ease;
}

.folder-head:hover {
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
}

.folder-chevron {
  font-size: 0.65rem;
  color: var(--muted);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
  flex-shrink: 0;
}

.folder-item.open .folder-chevron {
  transform: rotate(90deg);
  color: var(--mint);
}

.folder-icon {
  font-size: 0.85rem;
  color: var(--amber);
  flex-shrink: 0;
}

.folder-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.folder-count {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  flex-shrink: 0;
}

.folder-notes-list {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 4px 8px 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  min-width: 0;
  max-width: 100%;
}

.folder-item.open .folder-notes-list {
  display: flex;
}

/* Tree Note Item */
.tree-note-item {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(8, 16, 28, 0.45);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.tree-note-item:hover {
  background: rgba(14, 25, 43, 0.7);
  border-color: rgba(113, 240, 203, 0.28);
  transform: translateX(2px);
}

.tree-note-item.active {
  background: linear-gradient(135deg, rgba(113, 240, 203, 0.16), rgba(119, 217, 255, 0.06));
  border-color: var(--mint);
  box-shadow: 0 4px 16px rgba(113, 240, 203, 0.15);
}

.tree-note-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.tree-note-icon {
  font-size: 0.68rem;
  color: var(--mint);
  opacity: 0.85;
  flex-shrink: 0;
}

.tree-note-title {
  font-size: 0.77rem;
  font-weight: 650;
  color: #f1f6fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.tree-note-snippet {
  font-size: 0.66rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 14px;
  min-width: 0;
  max-width: 100%;
}

.tree-note-meta {
  display: flex;
  justify-content: flex-end;
  font-size: 0.6rem;
  color: #6a7e96;
}

/* AirDrop Dropzone */
.airdrop-dropzone {
  position: relative;
  margin-top: auto;
  padding: 14px 12px;
  border: 1px dashed rgba(113, 240, 203, 0.35);
  border-radius: 17px;
  background: radial-gradient(circle at 50% 50%, rgba(113, 240, 203, 0.06), rgba(3, 9, 18, 0.5));
  cursor: pointer;
  overflow: hidden;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  display: block;
}

.airdrop-dropzone:hover,
.airdrop-dropzone.dragover {
  border-color: var(--mint);
  background: radial-gradient(circle at 50% 50%, rgba(113, 240, 203, 0.16), rgba(3, 9, 18, 0.7));
  transform: scale(1.01);
  box-shadow: 0 10px 30px rgba(113, 240, 203, 0.18);
}

.airdrop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.airdrop-rings {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.airdrop-rings i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--mint);
  opacity: 0.3;
  animation: airdropPulse 2.8s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

.airdrop-rings i:nth-child(2) {
  animation-delay: 0.7s;
}

.airdrop-rings i:nth-child(3) {
  animation-delay: 1.4s;
}

.airdrop-icon {
  font-size: 1.05rem;
  color: var(--mint);
  filter: drop-shadow(0 0 8px var(--mint));
}

.airdrop-meta strong {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: #f1fdf9;
}

.airdrop-meta small {
  display: block;
  font-size: 0.63rem;
  color: var(--muted);
  margin-top: 2px;
}

@keyframes airdropPulse {
  0% {
    transform: scale(0.6);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* Right Sidebar: Knowledge Graph */
.obsidian-right-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(20, 32, 52, 0.78), rgba(10, 18, 32, 0.86));
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  min-width: 0;
  overflow: hidden;
}

.graph-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
}

.graph-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.graph-icon {
  color: var(--mint);
  font-size: 0.95rem;
  filter: drop-shadow(0 0 8px var(--mint));
}

.graph-title-group h4 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 750;
  color: #f1f7fc;
}

.graph-stats-chip {
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(113, 240, 203, 0.1);
  border: 1px solid rgba(113, 240, 203, 0.25);
  color: var(--mint);
  font-size: 0.62rem;
  font-weight: 700;
}

.graph-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.graph-canvas-wrapper {
  position: relative;
  height: 440px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 50% 50%, rgba(13, 24, 42, 0.85), rgba(2, 6, 14, 0.96));
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  cursor: grab;
}

.graph-canvas-wrapper.grabbing {
  cursor: grabbing;
}

#knowledgeGraphCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.graph-hint-pill {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 12px;
  border-radius: 99px;
  background: rgba(2, 6, 14, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--muted);
  font-size: 0.61rem;
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.graph-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(8, 16, 28, 0.94);
  border: 1px solid rgba(113, 240, 203, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  font-size: 0.72rem;
  color: #e5effa;
  max-width: 220px;
  backdrop-filter: blur(14px);
  transform: translate(12px, 12px);
  line-height: 1.4;
}

.graph-tooltip strong {
  display: block;
  color: #fff;
  font-size: 0.78rem;
  margin-bottom: 2px;
}

.graph-tooltip small {
  display: block;
  color: var(--mint);
  font-size: 0.64rem;
}

.graph-fast-connect-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 12px;
  background: rgba(4, 10, 20, 0.45);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.connect-card-head strong {
  display: block;
  font-size: 0.74rem;
  color: #e2edfa;
}

.connect-card-head small {
  display: block;
  font-size: 0.63rem;
  color: var(--muted);
}

.connect-card-action {
  display: flex;
  align-items: center;
  gap: 8px;
}

#quickConnectSelect {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(3, 9, 18, 0.75);
  color: #fff;
  font-size: 0.72rem;
  outline: 0;
}

#quickConnectSelect:focus {
  border-color: var(--mint);
}

#quickConnectBtn {
  white-space: nowrap;
  padding: 7px 12px;
}

/* Responsive Obsidian Split View */
@media (max-width: 1200px) {
  .obsidian-workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .obsidian-workspace.right-collapsed {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .obsidian-right-sidebar {
    grid-column: span 2;
  }
}

@media (max-width: 860px) {
  .obsidian-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .obsidian-workspace.right-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }
  .obsidian-right-sidebar {
    grid-column: span 1;
  }
}


/* ==========================================================================
   Apple OS System Design System (macOS Sequoia / Sonoma Aesthetics)
   ========================================================================== */

/* Apple System Typography & Global Smooth Font */
.apple-os-window, .apple-os-window * {
  box-sizing: border-box;
}

.apple-os-window {
  display: flex;
  flex-direction: column;
  background: rgba(14, 19, 32, 0.72) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft JhengHei", sans-serif;
  color: #f1f5f9;
  width: 100%;
  margin-top: 12px;
}

/* Apple OS Window Header Bar */
.apple-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 18px;
  background: rgba(10, 14, 24, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.apple-window-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.apple-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.apple-dot.red { background: #ff5f56; box-shadow: 0 0 6px rgba(255, 95, 86, 0.4); }
.apple-dot.yellow { background: #ffbd2e; box-shadow: 0 0 6px rgba(255, 189, 46, 0.4); }
.apple-dot.green { background: #27c93f; box-shadow: 0 0 6px rgba(39, 201, 63, 0.4); }

.apple-window-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  margin-left: 10px;
  letter-spacing: -0.01em;
}

.apple-window-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Apple OS Buttons with Haptic Micro-Interactions */
.apple-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
}

.apple-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.apple-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.apple-btn.primary, .apple-btn.highlight {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(59, 130, 246, 0.2));
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.apple-btn.primary:hover, .apple-btn.highlight:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(59, 130, 246, 0.3));
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
  color: #fff;
}

.apple-btn.danger {
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

.apple-btn.danger:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* ==========================================================================
   Split View Layout
   Left Main Canvas (65~70%) + Right Feature Sidebar (30~35%)
   ========================================================================== */
/* ==========================================================================
   Wangbens NoteOS — Apple macOS Sequoia / Sonoma Split View
   Complete Apple OS UI System
   ========================================================================== */

/* ---- Base Split View ---- */
.apple-split-view {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: calc(100vh - 160px);
  min-height: 640px;
  max-height: 1100px;
  width: 100%;
  overflow: hidden;
  gap: 0;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Left Canvas (65~70% Width) */
.apple-canvas {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 36px 40px;
  background: rgba(14, 16, 22, 0.70);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

/* Right Feature Sidebar (30~35% Width) */
.apple-sidebar {
  width: 32%;
  min-width: 300px;
  max-width: 420px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: rgba(12, 14, 20, 0.82);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

/* Dock Left Mode (row-reverse) */
.apple-split-view.sidebar-dock-left {
  flex-direction: row-reverse;
}
.apple-split-view.sidebar-dock-left .apple-sidebar {
  border-left: none;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

/* Sleek Apple Pill Scrollbars */
.apple-canvas::-webkit-scrollbar,
.apple-files-area::-webkit-scrollbar {
  width: 5px;
}
.apple-canvas::-webkit-scrollbar-thumb,
.apple-files-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.13);
  border-radius: 999px;
}
.apple-canvas::-webkit-scrollbar-thumb:hover,
.apple-files-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* ==========================================================================
   Right Sidebar: Spotlight, Tags, File Cards, AirDrop
   ========================================================================== */

/* 1. Spotlight Search Area */
.apple-spotlight-area {
  padding: 14px 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.apple-spotlight-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.apple-spotlight-box:focus-within {
  border-color: rgba(10, 132, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
}

.apple-spotlight-icon {
  font-size: 0.9rem;
  opacity: 0.5;
  flex-shrink: 0;
}

.apple-spotlight-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #f2f2f7;
  font-size: 0.82rem;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  min-width: 0;
}

.apple-spotlight-box input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.apple-spotlight-clear {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  padding: 2px 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.apple-spotlight-clear:hover { color: rgba(255, 255, 255, 0.7); }

.apple-sidebar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.apple-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c7c7cc;
  letter-spacing: 0.01em;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.apple-action-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.apple-action-btn:active { transform: scale(0.97); }
.apple-action-btn.primary {
  background: rgba(10, 132, 255, 0.13);
  border-color: rgba(10, 132, 255, 0.32);
  color: #409cff;
}
.apple-action-btn.primary:hover {
  background: rgba(10, 132, 255, 0.23);
  color: #fff;
}

/* 2. Tags Filter Capsules */
.apple-tags-area {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.apple-tags-scroller {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 3px;
}
.apple-tags-scroller::-webkit-scrollbar { height: 3px; }
.apple-tags-scroller::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.10);
  border-radius: 999px;
}

.apple-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #8e8e93;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.01em;
}
.apple-tag-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #f2f2f7;
  border-color: rgba(255, 255, 255, 0.16);
}
.apple-tag-pill.active {
  background: rgba(10, 132, 255, 0.18);
  border-color: rgba(10, 132, 255, 0.40);
  color: #409cff;
  font-weight: 600;
}

/* 3. File Tree Area */
.apple-files-area {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

/* Folder Group */
.apple-folder-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.apple-folder-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  cursor: pointer;
  user-select: none;
  font-size: 0.79rem;
  font-weight: 600;
  color: #8e8e93;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}
.apple-folder-header:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #aeaeb2;
}

.apple-folder-chevron {
  font-size: 0.6rem;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: rgba(255, 255, 255, 0.3);
}
.apple-folder-group.open .apple-folder-chevron { transform: rotate(90deg); }
.apple-folder-icon { font-size: 0.9rem; }
.apple-folder-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.apple-folder-count {
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.07);
  color: #636366;
  padding: 1px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.apple-folder-notes {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 2px 8px 6px;
}
.apple-folder-group.open .apple-folder-notes { display: flex; }

.apple-empty-folder-hint {
  font-size: 0.73rem;
  color: #48484a;
  text-align: center;
  padding: 8px 4px;
  font-style: italic;
}

/* Note Card */
.apple-note-card {
  position: relative;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.025);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.apple-note-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
  transform: translateX(2px);
}
.apple-note-card:active { transform: scale(0.99); }
.apple-note-card.active {
  background: rgba(10, 132, 255, 0.11);
  border-color: rgba(10, 132, 255, 0.32);
}
.apple-note-card.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #0a84ff;
  border-radius: 0 2px 2px 0;
}

.card-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.card-title {
  flex: 1;
  font-size: 0.83rem;
  font-weight: 600;
  color: #f2f2f7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.card-snippet {
  font-size: 0.73rem;
  color: #636366;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0;
}
.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.card-date { font-size: 0.68rem; color: #48484a; }
.card-tags-row { display: flex; gap: 4px; }
.card-mini-tag {
  font-size: 0.65rem;
  color: #409cff;
  background: rgba(10, 132, 255, 0.1);
  border-radius: 999px;
  padding: 1px 7px;
  letter-spacing: 0.01em;
}
.card-quick-dl-btn {
  font-size: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.3;
  padding: 2px 4px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: opacity 0.15s, background 0.15s;
}
.apple-note-card:hover .card-quick-dl-btn { opacity: 0.7; }
.card-quick-dl-btn:hover { opacity: 1 !important; background: rgba(255,255,255,0.08); }

/* 4. AirDrop Drop Zone */
.apple-airdrop-area {
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.apple-airdrop-dropzone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1.5px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.apple-airdrop-dropzone:hover,
.apple-airdrop-dropzone.dragover {
  border-color: rgba(10, 132, 255, 0.5);
  background: rgba(10, 132, 255, 0.07);
  transform: scale(1.01);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.08);
}

.airdrop-radar-pulse {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(10, 132, 255, 0.3);
  animation: radar-pulse 2.4s ease-out infinite;
}
.radar-circle.c1 { width: 10px; height: 10px; animation-delay: 0s; }
.radar-circle.c2 { width: 22px; height: 22px; animation-delay: 0.5s; }
.radar-circle.c3 { width: 36px; height: 36px; animation-delay: 1s; }

@keyframes radar-pulse {
  0% { opacity: 0.8; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(1.4); }
}

.radar-center-glyph {
  font-size: 1.1rem;
  color: #409cff;
  z-index: 1;
  animation: glyph-breathe 2.4s ease-in-out infinite;
}
@keyframes glyph-breathe {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.airdrop-info strong {
  font-size: 0.78rem;
  color: #f2f2f7;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.airdrop-info small {
  font-size: 0.7rem;
  color: #636366;
  line-height: 1.4;
}

/* ==========================================================================
   Left Canvas: Header, Toolbar, YAML Card, Markdown Body, Editor
   ========================================================================== */

.apple-canvas-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.apple-canvas-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.apple-note-heading {
  font-size: 1.22rem;
  font-weight: 700;
  color: #f2f2f7;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.025em;
}

.apple-status-pill {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #8e8e93;
  border: 1px solid rgba(255, 255, 255, 0.10);
  text-transform: uppercase;
}

.apple-canvas-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Apple-style buttons (toolbar and general) */
.apple-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 10px;
  font-size: 0.77rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.06);
  color: #c7c7cc;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}
.apple-btn:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.apple-btn:active { transform: scale(0.97); }
.apple-btn.primary {
  background: rgba(10, 132, 255, 0.14);
  border-color: rgba(10, 132, 255, 0.34);
  color: #409cff;
}
.apple-btn.primary:hover {
  background: rgba(10, 132, 255, 0.24);
  color: #fff;
}
.apple-btn.highlight {
  background: rgba(10, 132, 255, 0.15);
  border-color: rgba(10, 132, 255, 0.38);
  color: #409cff;
  font-weight: 600;
}
.apple-btn.highlight:hover {
  background: rgba(10, 132, 255, 0.28);
  color: #fff;
}
.apple-btn.danger {
  background: rgba(255, 69, 58, 0.08);
  border-color: rgba(255, 69, 58, 0.25);
  color: #ff6961;
}
.apple-btn.danger:hover {
  background: rgba(255, 69, 58, 0.18);
  color: #fff;
}

/* YAML Metadata Card */
.apple-yaml-card {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 20px;
  flex-shrink: 0;
}
.yaml-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
}
.yaml-label { color: #48484a; white-space: nowrap; }
.yaml-val { color: #aeaeb2; font-weight: 500; }
.yaml-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.yaml-tags .apple-tag-pill { padding: 2px 9px; font-size: 0.69rem; }

/* Markdown Article */
.apple-markdown-article {
  flex: 1;
  line-height: 1.80;
  color: #e5e5ea;
  font-size: 0.92rem;
  min-height: 200px;
}
.apple-markdown-article h1 { font-size: 1.6em; font-weight: 700; letter-spacing: -0.03em; color: #fff; margin: 1.2em 0 0.5em; }
.apple-markdown-article h2 { font-size: 1.28em; font-weight: 700; letter-spacing: -0.02em; color: #f2f2f7; margin: 1.1em 0 0.45em; }
.apple-markdown-article h3 { font-size: 1.08em; font-weight: 600; color: #aeaeb2; margin: 1em 0 0.4em; }
.apple-markdown-article h4,
.apple-markdown-article h5,
.apple-markdown-article h6 { font-size: 0.95em; font-weight: 600; color: #8e8e93; margin: 0.9em 0 0.35em; }
.apple-markdown-article p { margin: 0 0 0.85em; }
.apple-markdown-article ul, .apple-markdown-article ol { padding-left: 1.5em; margin: 0 0 0.85em; }
.apple-markdown-article li { margin-bottom: 0.25em; }
.apple-markdown-article blockquote {
  border-left: 3px solid rgba(10, 132, 255, 0.5);
  margin: 0 0 1em;
  padding: 8px 16px;
  background: rgba(10, 132, 255, 0.06);
  border-radius: 0 10px 10px 0;
  color: #aeaeb2;
  font-style: italic;
}
.apple-markdown-article a { color: #409cff; text-decoration: none; }
.apple-markdown-article a:hover { text-decoration: underline; }
.apple-markdown-article code {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.85em;
  font-family: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
  color: #ff6b6b;
}
.apple-markdown-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.85em;
}
.apple-markdown-article th, .apple-markdown-article td {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}
.apple-markdown-article th {
  background: rgba(255, 255, 255, 0.05);
  color: #aeaeb2;
  font-weight: 600;
}
.apple-markdown-article tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
.apple-markdown-article hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 1.5em 0;
}

/* Wiki-links */
.wiki-link, .apple-wiki-link {
  color: #409cff;
  background: rgba(10, 132, 255, 0.08);
  border-radius: 5px;
  padding: 0 4px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.wiki-link:hover, .apple-wiki-link:hover {
  background: rgba(10, 132, 255, 0.18);
  color: #fff;
}

/* Code Blocks with Apple Traffic Lights */
.apple-code-block {
  background: rgba(20, 22, 28, 0.85);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin: 1em 0;
  overflow: hidden;
}
.apple-code-bar {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 8px;
}
.apple-code-dots { display: flex; align-items: center; gap: 5px; }
.apple-code-dots .dot {
  width: 11px; height: 11px; border-radius: 50%;
}
.apple-code-dots .dot.red    { background: #ff5f56; }
.apple-code-dots .dot.yellow { background: #ffbd2e; }
.apple-code-dots .dot.green  { background: #27c93f; }
.apple-code-lang {
  font-size: 0.72rem;
  color: #636366;
  font-family: "SF Mono", ui-monospace, monospace;
  flex: 1;
  letter-spacing: 0.04em;
}
.apple-code-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 0.71rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.05);
  color: #8e8e93;
  transition: all 0.18s;
}
.apple-code-copy-btn:hover { background: rgba(255, 255, 255, 0.11); color: #fff; }
.apple-code-copy-btn.copied { background: rgba(39, 201, 63, 0.15); border-color: rgba(39, 201, 63, 0.3); color: #27c93f; }
.apple-code-block pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
}
.apple-code-block pre code {
  font-family: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  background: none;
  border-radius: 0;
  padding: 0;
  color: #e2e8f0;
}

/* KaTeX Math */
.math-block-wrapper,
.katex-display {
  overflow-x: auto;
  margin: 1.2em 0;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.katex { font-size: 1.05em; color: #f2f2f7; }

/* Placeholder state */
.apple-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  color: #48484a;
}
.apple-placeholder-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  opacity: 0.35;
  animation: float-icon 3s ease-in-out infinite;
}
@keyframes float-icon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.apple-placeholder h3 { font-size: 1rem; font-weight: 600; color: #3a3a3c; margin: 0 0 8px; }
.apple-placeholder p { font-size: 0.78rem; color: #3a3a3c; line-height: 1.6; margin: 0; max-width: 280px; }

/* Counter badge */
.apple-counter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 700;
  background: rgba(10, 132, 255, 0.18);
  color: #409cff;
  border: 1px solid rgba(10, 132, 255, 0.3);
}

/* Edit Grid */
.apple-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.apple-edit-grid label, .apple-editor-textarea-wrapper {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.77rem;
  color: #636366;
  font-weight: 500;
}
.apple-edit-grid label span, .apple-editor-textarea-wrapper span { font-size: 0.72rem; color: #636366; }
.apple-edit-grid input, .apple-edit-grid textarea,
#editNoteBody, #editNoteTitle, #editNoteParent, #editNoteTags, #editNoteLinks {
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #f2f2f7;
  font-size: 0.84rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.apple-edit-grid input:focus, #editNoteBody:focus,
#editNoteTitle:focus, #editNoteParent:focus, #editNoteTags:focus, #editNoteLinks:focus {
  border-color: rgba(10, 132, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.10);
}
#editNoteBody {
  font-family: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  resize: vertical;
  min-height: 260px;
  line-height: 1.65;
}
.apple-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Editor container */
.apple-editor-container { width: 100%; }

/* Backlinks */
.backlinks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.backlinks-title { display: flex; align-items: center; gap: 8px; }
.backlinks-title h4 { margin: 0; font-size: 0.85rem; font-weight: 700; color: #aeaeb2; }
.backlinks-icon { font-size: 1rem; color: #409cff; }
.backlinks-hint { font-size: 0.72rem; color: #48484a; font-style: italic; }
.apple-backlinks-list { display: flex; flex-direction: column; gap: 6px; }
.backlink-item {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(10, 132, 255, 0.06);
  border: 1px solid rgba(10, 132, 255, 0.14);
  font-size: 0.79rem;
  cursor: pointer;
  color: #409cff;
  transition: all 0.18s;
}
.backlink-item:hover {
  background: rgba(10, 132, 255, 0.14);
  color: #fff;
}

/* Canvas Bottom Bar */
.apple-canvas-bottom-bar {
  padding: 14px 0 0;
  margin-top: auto;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.apple-bottom-download-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #8e8e93;
  letter-spacing: 0.01em;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.apple-bottom-download-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #f2f2f7;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.apple-bottom-download-btn:active { transform: scale(0.98); }

/* Modal */
.apple-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.apple-modal-backdrop[hidden] { display: none !important; }
.apple-modal-dialog {
  background: rgba(22, 22, 28, 0.96);
  border: 1px solid rgba(10, 132, 255, 0.28);
  border-radius: 20px;
  padding: 28px 32px;
  min-width: 340px;
  max-width: 480px;
  width: 90vw;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(32px) saturate(180%);
}
.modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.modal-icon { font-size: 1.4rem; }
.modal-header h4 { margin: 0; font-size: 1rem; font-weight: 700; color: #f2f2f7; }
.modal-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.modal-label span { font-size: 0.78rem; color: #636366; font-weight: 500; }
.modal-label input {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modal-label input:focus {
  border-color: rgba(10, 132, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.12);
}
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Canvs Footer (Backlinks section) */
.canvas-footer-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Responsive */
@media (max-width: 980px) {
  .apple-split-view {
    flex-direction: column !important;
    height: auto;
    max-height: none;
    border-radius: 14px;
  }
  .apple-sidebar {
    width: 100%;
    max-width: none;
    border-left: none !important;
    border-right: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    order: 2;
    max-height: 420px;
  }
  .apple-canvas {
    order: 1;
    padding: 18px 16px;
  }
  .apple-edit-grid {
    grid-template-columns: 1fr;
  }
  .apple-canvas-toolbar { flex-wrap: wrap; }
}


/* ========================================================
   Service Chinese Labels & History Chart Styling
   ======================================================== */
.service-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.service-chinese-name {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 700;
}
.service-code-name {
  font-size: 0.72rem;
  color: #64748b;
  font-family: var(--font-mono, monospace);
}
.service-chinese-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin: 6px 0 10px;
}

/* History Modal */
#systemHistoryModal canvas {
  width: 100% !important;
  height: 100% !important;
}


/* ========================================================
   Apple OS Full-Width Hierarchical Finder & Tree Styles
   ======================================================== */
.apple-finder-full {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px 24px;
}

.apple-finder-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.apple-finder-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px 12px;
  flex: 1;
  max-width: 480px;
  transition: all 0.2s;
}

.apple-finder-search-box:focus-within {
  border-color: #0a84ff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
}

.apple-finder-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.88rem;
  width: 100%;
}

.apple-finder-tree {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 680px;
  overflow-y: auto;
  padding-right: 6px;
}

/* Tree Folder Card */
.apple-tree-folder {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  transition: border-color 0.2s;
  margin-bottom: 4px;
}

.apple-tree-folder:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.apple-tree-folder-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s;
}

.apple-tree-folder-head:hover {
  background: rgba(255, 255, 255, 0.06);
}

.apple-tree-folder-head.drag-hover {
  background: rgba(10, 132, 255, 0.2) !important;
  border: 2px dashed #0a84ff !important;
}

.apple-tree-chevron {
  font-size: 0.72rem;
  color: #64748b;
  transition: transform 0.2s ease;
  width: 14px;
  display: inline-block;
  text-align: center;
}

.apple-tree-folder.open > .apple-tree-folder-head .apple-tree-chevron {
  transform: rotate(90deg);
  color: #38bdf8;
}

.apple-tree-folder-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #f1f5f9;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.apple-tree-badge {
  font-size: 0.75rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
}

.apple-tree-children {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 4px 8px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.apple-tree-folder.open > .apple-tree-children {
  display: flex;
}

/* File / Note Row */
.apple-tree-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid transparent;
  transition: all 0.15s;
}

.apple-tree-file-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.apple-tree-file-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.apple-tree-file-name {
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apple-tree-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #64748b;
  font-size: 0.78rem;
  flex-shrink: 0;
}

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

.apple-mini-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.apple-mini-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.apple-mini-btn.primary {
  background: rgba(10, 132, 255, 0.18);
  border-color: rgba(10, 132, 255, 0.4);
  color: #38bdf8;
}

.apple-mini-btn.primary:hover {
  background: rgba(10, 132, 255, 0.35);
  color: #fff;
}

.apple-mini-btn.danger {
  color: #f87171;
}

.apple-mini-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

/* History Modal Close Button */
#closeHistoryModalBtn {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  font-size: 1.15rem !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s !important;
}
#closeHistoryModalBtn:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  transform: scale(1.08);
}

/* ==========================================================================
   Modern & Enhanced Ports Overview Table (Full-Width Strip Layout)
   ========================================================================== */
.dashboard-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  margin-top: 16px !important;
}

.ports-panel {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden;
  background: rgba(13, 22, 36, 0.65) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
  padding: 22px 24px !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25) !important;
}

.ports-head-enhanced {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  margin-bottom: 6px !important;
}

.ports-title-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ports-title-area h3 {
  margin: 0;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  color: #fff;
  font-weight: 700;
}

.ports-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-family: ui-monospace, monospace;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.hint#portNote {
  margin-top: 2px !important;
  margin-bottom: 14px !important;
  color: #64748b;
  font-size: 0.74rem;
}

.modern-ports-wrap {
  width: 100%;
  max-height: 540px;
  overflow-y: auto;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 11, 20, 0.55);
}

.modern-ports-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.modern-ports-wrap::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.modern-ports-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.modern-ports-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.modern-ports-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.modern-ports-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(13, 22, 36, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 12px 18px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.modern-ports-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  transition: background 0.15s ease;
}

.modern-ports-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.modern-ports-table td {
  padding: 12px 18px;
  vertical-align: middle;
}

.port-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.port-num {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 1.02rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.proto-tag {
  font-size: 0.64rem;
  font-weight: 800;
  font-family: ui-monospace, monospace;
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.04em;
}

.proto-tag.tcp {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.proto-tag.udp {
  background: rgba(192, 132, 252, 0.16);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.35);
}

.core-tag {
  font-size: 0.62rem;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  letter-spacing: 0.02em;
}

.service-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.service-cell .service-name {
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 600;
}

.service-cell .service-purpose {
  color: #94a3b8;
  font-size: 0.76rem;
  line-height: 1.35;
}

.addr-code {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.exposure-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.exposure-pill.local {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.exposure-pill.tailscale {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.38);
}

.exposure-pill.public {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.38);
}

.proc-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proc-cell .proc-name {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  color: #e2e8f0;
  font-weight: 600;
}

.proc-cell .proc-pid {
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  color: #64748b;
}

/* Service Control Full-Width Enhancement */
.services-panel {
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(13, 22, 36, 0.65) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
  padding: 22px 24px !important;
}

.services-panel .service-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 14px !important;
  margin-top: 16px !important;
}
