/* ============================================================
   YMCB Desktop - macOS Sequoia Finder + Dock
   ============================================================ */

:root {
  --finder-bg: rgba(40, 40, 42, 0.72);
  --finder-bg-solid: #282a2c;
  --finder-text: rgba(255, 255, 255, 0.92);
  --finder-text-sub: rgba(255, 255, 255, 0.55);
  --finder-border: rgba(255, 255, 255, 0.1);
  --accent: #0a84ff;
  --folder-blue-light: #6cc4f5;
  --folder-blue: #4ba8e8;
  --folder-blue-dark: #2e8dd4;
  --traffic-red: #ff5f57;
  --traffic-yellow: #febc2e;
  --traffic-green: #28c840;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   Desktop (full-screen container)
   ============================================================ */
#ymcb-desktop {
  position: fixed;
  inset: 0;
  top: 0;
  pointer-events: none;
  z-index: 50;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', 'Hiragino Sans', 'Meiryo', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Only interactive children receive pointer events.
   NOTE: kept at class-level specificity (not ID) so that mobile states like
   .finder-window.mobile-background can override via pointer-events:none. */
.finder-window,
.ymcb-dock,
.bsky-desk-widget {
  pointer-events: auto;
}
/* Preview backdrop: only when open (prevents blocking clicks when hidden) */
#ymcb-desktop .preview-backdrop.open {
  pointer-events: auto;
}

/* Make background video static and cover */
.page-background-video {
  position: fixed !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 0;
}
.page-background-video video,
.page-background-video .mp4-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Dim video so windows stand out */
.page-background-video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* Header stays on top */
.site-header {
  z-index: 200 !important;
}

/* ============================================================
   Finder Window
   ============================================================ */
.finder-window {
  position: absolute;
  width: 1000px;
  height: 640px;
  background: var(--finder-bg);
  backdrop-filter: saturate(180%) blur(30px);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  border-radius: 12px;
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 25px 60px -10px rgba(0, 0, 0, 0.55),
    0 40px 90px -20px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--finder-text);
  animation: finderOpen 0.35s var(--ease-out);
  transition: transform 0.3s var(--ease-out), opacity 0.25s ease;
}
.finder-window.dragging {
  transition: none;
  user-select: none;
}
.finder-window.minimized {
  transform: scale(0.1) translateY(80vh);
  opacity: 0;
  pointer-events: none;
}
.finder-window.maximized {
  width: calc(100vw - 40px) !important;
  height: calc(100vh - 140px) !important;
  top: 20px !important;
  left: 20px !important;
}

@keyframes finderOpen {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================================
   Titlebar (traffic lights + tab bar)
   ============================================================ */
.finder-titlebar {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 14px;
  background: linear-gradient(to bottom, rgba(60,60,62,0.6), rgba(45,45,47,0.5));
  border-bottom: 0.5px solid var(--finder-border);
  flex-shrink: 0;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}
.finder-titlebar.drag-handle {
  cursor: grab;
}
.finder-titlebar.drag-handle:active {
  cursor: grabbing;
}

.traffic-lights {
  display: flex;
  gap: 8px;
  margin-right: 14px;
}
.tl-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.3) inset;
  transition: filter 0.12s;
}
.tl-close { background: var(--traffic-red); }
.tl-min   { background: var(--traffic-yellow); }
.tl-max   { background: var(--traffic-green); }

.traffic-lights:hover .tl-btn::before {
  content: '';
  position: absolute;
  inset: 2.5px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.traffic-lights:hover .tl-close::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path d='M1.5 1.5L6.5 6.5M6.5 1.5L1.5 6.5' stroke='%234d0000' stroke-width='1.2' stroke-linecap='round'/></svg>");
}
.traffic-lights:hover .tl-min::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path d='M1 4h6' stroke='%23995700' stroke-width='1.3' stroke-linecap='round'/></svg>");
}
.traffic-lights:hover .tl-max::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><path d='M3 2l5 5M7 3v4H3' stroke='%23006400' stroke-width='1.3' stroke-linecap='round' fill='none'/></svg>");
}

/* Tab bar */
.finder-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.finder-tabs::-webkit-scrollbar { display: none; }

.finder-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 12px;
  height: 28px;
  min-width: 120px;
  max-width: 200px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--finder-text-sub);
  background: transparent;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  flex-shrink: 0;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
}
.finder-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--finder-text);
}
.finder-tab.active {
  background: rgba(255, 255, 255, 0.13);
  color: var(--finder-text);
}
.finder-tab-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.finder-tab-icon svg { width: 100%; height: 100%; }
.finder-tab-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finder-tab-close {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--finder-text-sub);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  padding: 0;
}
.finder-tab:hover .finder-tab-close,
.finder-tab.active .finder-tab-close {
  display: flex;
}
.finder-tab-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.finder-tab-add {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--finder-text-sub);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.12s ease;
}
.finder-tab-add:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--finder-text);
}

/* Mobile-only close button: hidden globally, only shown on mobile */
.mobile-close-btn {
  display: none !important;
}

/* ============================================================
   Toolbar (nav + path + view toggles)
   ============================================================ */
.finder-toolbar {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 14px;
  background: rgba(40, 40, 42, 0.35);
  border-bottom: 0.5px solid var(--finder-border);
  flex-shrink: 0;
  gap: 4px;
}
.tool-btn {
  width: 28px;
  height: 26px;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--finder-text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease;
  padding: 0;
}
.tool-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: var(--finder-text);
}
.tool-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.tool-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--finder-text);
}
.tool-btn svg {
  width: 14px;
  height: 14px;
}

.toolbar-path {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--finder-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  min-width: 0;
}
.toolbar-path-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.toolbar-path-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-spacer {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 4px;
}

/* ============================================================
   Body: Sidebar + Content
   ============================================================ */
.finder-body {
  display: flex;
  flex: 1;
  min-height: 0;
  background: rgba(28, 28, 30, 0.25);
}

/* Sidebar */
.finder-sidebar {
  width: 200px;
  background: rgba(50, 50, 52, 0.6);
  backdrop-filter: blur(20px);
  border-right: 0.5px solid var(--finder-border);
  padding: 10px 0 10px;
  flex-shrink: 0;
  overflow-y: auto;
}
.sidebar-section-title {
  padding: 10px 14px 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--finder-text-sub);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 14px;
  margin: 1px 8px;
  border-radius: 5px;
  font-size: 13px;
  color: var(--finder-text);
  cursor: pointer;
  transition: background 0.1s ease;
  user-select: none;
}
.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.07);
}
.sidebar-item.active {
  background: rgba(10, 132, 255, 0.85);
  color: #fff;
}
.sidebar-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sidebar-icon svg {
  width: 100%;
  height: 100%;
}
.sidebar-tag-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Content */
.finder-content {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px 32px;
  position: relative;
  min-width: 0;
}
.finder-content-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid var(--finder-border);
  gap: 12px;
}
.finder-content-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--finder-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finder-content-subtitle {
  font-size: 12px;
  color: var(--finder-text-sub);
  flex-shrink: 0;
}

/* ============================================================
   Folder / File Grid (Broken grid with playful rotation)
   ============================================================ */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 24px 18px;
  padding: 4px;
}
.folder-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background 0.15s ease;
  position: relative;
  user-select: none;
}
.folder-item:nth-child(3n+1) { transform: rotate(-1.2deg); }
.folder-item:nth-child(3n+2) { transform: rotate(0.8deg); }
.folder-item:nth-child(3n+3) { transform: rotate(-0.4deg); }
.folder-item:nth-child(5n)   { transform: rotate(1.4deg); }
.folder-item:hover {
  transform: translateY(-6px) rotate(0) scale(1.04);
  background: rgba(255, 255, 255, 0.04);
  z-index: 5;
}
.folder-item.selected {
  background: rgba(10, 132, 255, 0.2);
}

.folder-thumb {
  width: 108px;
  height: 82px;
  position: relative;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
  transition: filter 0.25s ease;
}
.folder-item:hover .folder-thumb {
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55));
}

/* Folder back tab */
.folder-thumb::before {
  content: '';
  position: absolute;
  top: 0;
  left: 3px;
  width: 44px;
  height: 14px;
  background: linear-gradient(to bottom, var(--folder-blue-light), var(--folder-blue));
  border-radius: 4px 6px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
/* Folder front face */
.folder-thumb::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--folder-blue-light) 0%, var(--folder-blue) 50%, var(--folder-blue-dark) 100%);
  border-radius: 6px 6px 8px 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 6px rgba(0, 0, 0, 0.12);
}

/* Video item (inside a project): no folder frame, just the thumbnail */
.folder-item.video-item .folder-thumb::before,
.folder-item.video-item .folder-thumb::after {
  display: none;
}
.folder-item.video-item .folder-video-peek {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  opacity: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}
.folder-item.video-item:hover .folder-video-peek {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.55);
}

/* Peek preview inside folder (for project folders: composite mosaic) */
.folder-video-peek {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border-radius: 5px;
  overflow: hidden;
  z-index: 2;
  opacity: 0.92;
  transform: translateY(2px);
  transition: transform 0.3s var(--ease-out), opacity 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  background: #000;
}
.folder-item:hover .folder-video-peek {
  transform: translateY(-4px);
  opacity: 1;
}
.folder-video-peek img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Mosaic for project folders (2x2) */
.folder-mosaic {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  background: #000;
}
.folder-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.folder-mosaic.items-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.folder-mosaic.items-1 img { grid-column: 1; grid-row: 1; }
.folder-mosaic.items-2 { grid-template-rows: 1fr; }
.folder-mosaic.items-2 img { grid-row: 1; }

.folder-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 3;
}
.folder-item:hover .folder-play-overlay {
  opacity: 1;
}
.folder-play-overlay svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.folder-label {
  font-size: 12px;
  color: var(--finder-text);
  text-align: center;
  max-width: 120px;
  line-height: 1.3;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  padding: 2px 6px;
  border-radius: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.folder-item.selected .folder-label {
  background: rgba(10, 132, 255, 0.85);
  color: #fff;
}

/* Folder item count badge */
.folder-count {
  font-size: 10px;
  color: var(--finder-text-sub);
  text-align: center;
  margin-top: -3px;
}

/* ============================================================
   Simple Chrome (Mail / Commission / About windows)
   ============================================================ */
.finder-titlebar.simple {
  justify-content: flex-start;
  padding: 0 14px;
}
.simple-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--finder-text);
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
}
.simple-titlebar-spacer {
  /* Balances traffic-lights on the left for centered title */
  width: 54px;
  flex-shrink: 0;
}
/* .finder-body.simple-body: no sidebar; content uses existing flex:1 on .finder-content */

/* ============================================================
   Contact Form View (Mail window)
   ============================================================ */
.finder-content.finder-contact-form-view {
  padding: 0;
  background: rgba(28, 28, 30, 0.35);
  overflow-y: auto;
}
.contact-form {
  max-width: 560px;
  margin: 0 auto;
  padding: 36px 40px 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--finder-text);
}
/* Quick Contact section (Discord / Email / X DM) */
.cf-quick {
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid var(--finder-border);
  border-radius: 12px;
  padding: 16px 16px 14px;
  margin-top: 2px;
}
.cf-quick-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--finder-text);
}
.cf-quick-note {
  font-size: 12px;
  color: var(--finder-text-sub);
  margin: 2px 0 12px;
}
.cf-quick-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cf-quick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  color: var(--finder-text);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  width: 100%;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.cf-quick-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}
.cf-quick-item:active { transform: scale(0.985); }
.cf-quick-item.is-copied {
  background: rgba(48, 209, 88, 0.14);
  border-color: rgba(48, 209, 88, 0.45);
}
.cf-quick-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.cf-quick-icon-discord { background: #5865f2; }
.cf-quick-icon-mail    { background: linear-gradient(135deg, #5db4ff, #0a84ff); }
.cf-quick-icon-x       { background: #000; }
.cf-quick-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.cf-quick-service {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--finder-text-sub);
  text-transform: uppercase;
}
.cf-quick-value {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--finder-text);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cf-quick-action {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--finder-text-sub);
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.cf-quick-item.is-copied .cf-quick-action {
  color: #30d158;
  background: rgba(48, 209, 88, 0.15);
}

/* Divider between Quick Contact and the form */
.cf-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 2px;
  color: var(--finder-text-sub);
  font-size: 11.5px;
}
.cf-divider::before,
.cf-divider::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: var(--finder-border);
}

.contact-form-header {
  border-bottom: 0.5px solid var(--finder-border);
  padding-bottom: 16px;
  margin-bottom: 6px;
}
.contact-form-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 4px;
}
.contact-form-subtitle {
  font-size: 13px;
  color: var(--finder-text-sub);
  margin: 0;
}
.cf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cf-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--finder-text);
  letter-spacing: 0.01em;
}
.cf-required {
  color: #ff6b6b;
  margin-left: 4px;
  font-weight: 700;
}
.cf-field input[type="text"],
.cf-field input[type="number"],
.cf-field input[type="date"],
.cf-field textarea {
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  box-sizing: border-box;
}
.cf-field textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.55;
}
.cf-field input:hover,
.cf-field textarea:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}
.cf-field input:focus,
.cf-field textarea:focus {
  background: rgba(10, 132, 255, 0.08);
  border-color: #0a84ff;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
}
.cf-field input:invalid:not(:placeholder-shown),
.cf-field textarea:invalid:not(:placeholder-shown) {
  border-color: rgba(255, 69, 58, 0.5);
}

/* Date picker calendar icon: white on dark */
.cf-field input[type="date"] {
  color-scheme: dark;
}
.cf-field input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.2);
  cursor: pointer;
  opacity: 0.85;
}

/* Checkbox field */
.cf-checkbox-field { margin-top: 4px; }
.cf-checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500 !important;
  color: var(--finder-text);
  cursor: pointer;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid var(--finder-border);
  border-radius: 8px;
  transition: background 0.15s ease;
}
.cf-checkbox-label:hover {
  background: rgba(255, 255, 255, 0.08);
}
.cf-checkbox-label input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #0a84ff;
  flex-shrink: 0;
  cursor: pointer;
}
.cf-commission-link {
  color: #0a84ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.cf-commission-link:hover { color: #5ac8fa; }

.cf-note {
  font-size: 12px;
  color: var(--finder-text-sub);
  line-height: 1.65;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid rgba(10, 132, 255, 0.5);
  border-radius: 6px;
}
.cf-note code {
  background: rgba(10, 132, 255, 0.15);
  color: #5ac8fa;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11.5px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.cf-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0a84ff, #0060df);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.35);
  margin-top: 4px;
  font-family: inherit;
}
.cf-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(10, 132, 255, 0.45);
  filter: brightness(1.08);
}
.cf-submit:active { transform: translateY(0); }

.cf-sent {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(48, 209, 88, 0.12);
  border: 0.5px solid rgba(48, 209, 88, 0.4);
  border-radius: 8px;
  color: #30d158;
  font-size: 13px;
  font-weight: 500;
  animation: cf-sent-in 0.25s ease-out;
}
@keyframes cf-sent-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Commission View (Mac doc style)
   ============================================================ */
.finder-content.finder-commission-view {
  padding: 0;
  background: rgba(28, 28, 30, 0.35);
  overflow-y: auto;
}
.commission-doc {
  max-width: 660px;
  margin: 0 auto;
  padding: 36px 44px 60px;
  color: var(--finder-text);
  font-size: 13.5px;
  line-height: 1.75;
}
.commission-doc-header {
  padding-bottom: 20px;
  border-bottom: 0.5px solid var(--finder-border);
  margin-bottom: 24px;
}
.commission-doc-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 4px;
}
.commission-doc-subtitle {
  font-size: 13px;
  color: var(--finder-text-sub);
  margin: 0;
}
.commission-note {
  background: linear-gradient(135deg, rgba(255, 69, 58, 0.16), rgba(255, 159, 10, 0.12));
  border: 0.5px solid rgba(255, 69, 58, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 32px;
  color: #ffb7b0;
  font-size: 14px;
  line-height: 1.75;
  font-weight: 500;
}
.commission-section {
  margin-bottom: 36px;
}
.commission-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
  padding-bottom: 8px;
  border-bottom: 0.5px solid var(--finder-border);
}
.commission-intro {
  font-size: 13px;
  color: var(--finder-text-sub);
  margin: 0 0 16px;
  line-height: 1.7;
}
.commission-step {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--finder-border);
}
.commission-step:last-child { border-bottom: none; }
.commission-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0a84ff, #5e5ce6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: white;
  box-shadow: 0 2px 6px rgba(10, 132, 255, 0.35);
}
.commission-step-body { flex: 1; min-width: 0; }
.commission-step-body h3 {
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 6px;
}
.commission-step-body p {
  margin: 0 0 6px;
  color: var(--finder-text);
}
.commission-note-small {
  font-size: 12px;
  color: var(--finder-text-sub);
  margin: 4px 0 0 !important;
}
.commission-clause {
  padding: 12px 0;
  border-bottom: 0.5px dashed rgba(255, 255, 255, 0.08);
}
.commission-clause:last-child { border-bottom: none; }
.commission-clause h4 {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px;
}
.commission-clause p {
  margin: 0;
  color: var(--finder-text);
  font-size: 13px;
  line-height: 1.7;
}
.commission-cta {
  margin-top: 36px;
  padding: 24px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid var(--finder-border);
  border-radius: 12px;
}
.commission-cta p {
  margin: 0 0 14px;
  color: var(--finder-text-sub);
  font-size: 13px;
}
.commission-cta-btn {
  background: linear-gradient(135deg, #0a84ff, #0060df);
  border: none;
  color: white;
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}
.commission-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(10, 132, 255, 0.4);
}

/* ============================================================
   Sidebar Profile Card
   ============================================================ */
.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 10px 14px;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.18), rgba(175, 82, 222, 0.12));
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  user-select: none;
}
.sidebar-profile:hover {
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.28), rgba(175, 82, 222, 0.2));
  transform: translateY(-1px);
}
.sidebar-profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b0c4de, #6c8aad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  overflow: hidden;
}
.sidebar-profile-avatar-logo {
  background: #111;
  padding: 5px;
  box-sizing: border-box;
}
.sidebar-profile-avatar-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}
.sidebar-profile-text { min-width: 0; flex: 1; }
.sidebar-profile-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--finder-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-profile-role {
  font-size: 10.5px;
  color: var(--finder-text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   Tab Drag Indicator
   ============================================================ */
.finder-tab.tab-dragging {
  opacity: 0.4;
}
.finder-tab.tab-drop-before {
  box-shadow: inset 2px 0 0 var(--accent);
}
.finder-tab.tab-drop-after {
  box-shadow: inset -2px 0 0 var(--accent);
}

/* ============================================================
   Mail View (iCloud Mail style)
   ============================================================ */
.finder-content.finder-mail-view {
  padding: 0;
  overflow: hidden;
}
.mail-layout {
  display: flex;
  height: 100%;
  background: rgba(28, 28, 30, 0.4);
}
.mail-sidebar {
  width: 180px;
  background: rgba(50, 50, 52, 0.5);
  border-right: 0.5px solid var(--finder-border);
  padding: 14px 8px;
  flex-shrink: 0;
  overflow-y: auto;
}
.mail-sidebar-title {
  padding: 6px 10px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--finder-text-sub);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mail-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--finder-text);
  cursor: pointer;
  transition: background 0.1s ease;
}
.mail-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.mail-sidebar-item.active {
  background: rgba(10, 132, 255, 0.85);
  color: #fff;
}
.mail-sb-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mail-sb-icon svg { width: 100%; height: 100%; }
.mail-count {
  margin-left: auto;
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.14);
  padding: 1px 6px;
  border-radius: 9px;
  min-width: 16px;
  text-align: center;
}
.mail-icon-flag,
.mail-icon-sent,
.mail-icon-draft,
.mail-icon-arch {
  position: relative;
}
.mail-icon-flag::before { content: ''; width: 10px; height: 10px; background: #ff9f0a; border-radius: 2px; }
.mail-icon-sent::before { content: ''; width: 10px; height: 10px; background: var(--accent); transform: rotate(45deg); border-radius: 1px; }
.mail-icon-draft::before { content: ''; width: 10px; height: 10px; background: #bf5af2; border-radius: 1px; }
.mail-icon-arch::before { content: ''; width: 10px; height: 10px; background: #8e8e93; border-radius: 1px; }

/* Mail list */
.mail-list {
  width: 290px;
  flex-shrink: 0;
  background: rgba(40, 40, 42, 0.3);
  border-right: 0.5px solid var(--finder-border);
  overflow-y: auto;
}
.mail-list-header {
  padding: 14px 16px 10px;
  border-bottom: 0.5px solid var(--finder-border);
  position: sticky;
  top: 0;
  background: rgba(40, 40, 42, 0.85);
  backdrop-filter: blur(10px);
  z-index: 2;
}
.mail-list-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--finder-text);
  letter-spacing: -0.01em;
}
.mail-list-count {
  font-size: 11px;
  color: var(--finder-text-sub);
  margin-top: 2px;
}
.mail-row {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--finder-border);
  cursor: pointer;
  transition: background 0.1s ease;
}
.mail-row:hover { background: rgba(255, 255, 255, 0.04); }
.mail-row.active { background: rgba(10, 132, 255, 0.22); }
.mail-row-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
}
.mail-row-main { flex: 1; min-width: 0; }
.mail-row-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.mail-row-from {
  font-size: 13px;
  font-weight: 600;
  color: var(--finder-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.mail-row-date {
  font-size: 10.5px;
  color: var(--finder-text-sub);
  flex-shrink: 0;
}
.mail-row-subject {
  font-size: 12px;
  color: var(--finder-text);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-row-preview {
  font-size: 11px;
  color: var(--finder-text-sub);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  line-height: 1.35;
}

/* Mail detail */
.mail-detail {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px 32px;
  background: rgba(32, 32, 34, 0.25);
  min-width: 0;
}
.mail-detail-header {
  display: flex;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 0.5px solid var(--finder-border);
  margin-bottom: 18px;
}
.mail-detail-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.mail-detail-meta { flex: 1; min-width: 0; }
.mail-detail-subject {
  font-size: 17px;
  font-weight: 700;
  color: var(--finder-text);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.mail-detail-from {
  font-size: 12.5px;
  color: var(--finder-text);
}
.mail-from-email { color: var(--finder-text-sub); margin-left: 4px; }
.mail-detail-to {
  font-size: 11px;
  color: var(--finder-text-sub);
  margin-top: 2px;
}
.mail-detail-body {
  font-size: 13px;
  line-height: 1.65;
  color: var(--finder-text);
}
.mail-detail-body p { margin-bottom: 10px; }
.mail-detail-body h4 {
  font-size: 13.5px;
  font-weight: 700;
  margin: 16px 0 6px;
  color: var(--finder-text);
}
.mail-detail-body ul,
.mail-detail-body ol {
  margin: 6px 0 10px 20px;
  padding: 0;
}
.mail-detail-body li { margin-bottom: 4px; }
.mail-detail-body a {
  color: var(--accent);
  text-decoration: none;
}
.mail-detail-body a:hover { text-decoration: underline; }
.mail-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--finder-text-sub);
  font-size: 13px;
}

/* ============================================================
   About View
   ============================================================ */
.finder-content.finder-about-view {
  padding: 30px 40px 40px;
}
.about-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 0.5px solid var(--finder-border);
  margin-bottom: 28px;
}
.about-avatar {
  width: 100px;
  height: 100px;
  border-radius: 24px;
  background: linear-gradient(135deg, #b0c4de, #6c8aad);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  overflow: hidden;
}
.about-avatar-logo {
  background: #111;
  padding: 14px;
  box-sizing: border-box;
}
.about-avatar-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}
.about-avatar-placeholder {
  color: white;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.about-info { flex: 1; min-width: 0; }
.about-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--finder-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.about-name-alt {
  font-weight: 400;
  color: var(--finder-text-sub);
  font-size: 22px;
  margin-left: 4px;
}
.about-title {
  font-size: 15px;
  color: var(--finder-text);
  margin-top: 8px;
  font-weight: 500;
}
.about-title-alt {
  color: var(--finder-text-sub);
  font-weight: 400;
  margin-left: 2px;
}
.about-tagline {
  font-size: 13px;
  color: var(--accent);
  margin-top: 2px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.about-section { margin-bottom: 24px; }
.about-section h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--finder-text-sub);
  margin-bottom: 10px;
}
.about-section p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--finder-text);
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.about-tag {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 12px;
  color: var(--finder-text);
}
.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.about-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--finder-text);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.about-link:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.about-link-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.about-link-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ============================================================
   Loading / Empty
   ============================================================ */
.finder-loading {
  padding: 60px 20px;
  text-align: center;
  color: var(--finder-text-sub);
  font-size: 13px;
}
.finder-loading::before {
  content: '';
  display: block;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Bluesky Widget (Apple-Stocks-inspired layout)
   ============================================================ */
.finder-content.finder-bluesky-view {
  padding: 0 !important;
  background: linear-gradient(180deg, rgba(17, 133, 254, 0.06), rgba(0, 0, 0, 0.0) 45%),
              rgba(22, 22, 24, 0.55);
}
.bsky-widget {
  padding: 20px 22px calc(24px + env(safe-area-inset-bottom, 0));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Header (avatar + name + handle) */
.bsky-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bsky-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: #1185fe;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.15) inset,
              0 4px 10px rgba(0, 0, 0, 0.35);
}
.bsky-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}
.bsky-avatar.has-bsky-avatar svg { display: none; }
.bsky-head-meta { min-width: 0; flex: 1; }
.bsky-display-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bsky-handle {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  margin-top: 2px;
}
.bsky-handle:hover { color: #5ac8fa; }

/* Ticker (Stocks app style) */
.bsky-ticker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 22px;
  padding: 10px 2px 14px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}
.bsky-ticker-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 13px;
  color: #fff;
}
.bsky-ticker-arrow {
  font-size: 10px;
  width: 10px;
  display: inline-block;
  text-align: center;
  flex-shrink: 0;
}
.bsky-ticker-arrow.up { color: #32d74b; }
.bsky-ticker-arrow.neutral { color: rgba(255, 255, 255, 0.45); }
.bsky-ticker-label {
  flex: 1;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bsky-ticker-value {
  color: #fff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.bsky-ticker-value.bsky-ticker-handle {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
}

/* Feed (Yahoo Finance news style) */
.bsky-feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 4px 0 0;
}
.bsky-post {
  display: block;
  text-decoration: none;
  padding: 2px 0;
  transition: opacity 0.15s ease;
}
.bsky-post:hover { opacity: 0.82; }
.bsky-post-source {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 3px;
  letter-spacing: 0.01em;
}
.bsky-post-text {
  font-size: 14.5px;
  line-height: 1.45;
  color: #fff;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bsky-post-date {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 3px;
}
.bsky-loading, .bsky-error {
  padding: 24px 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}
.bsky-footer-link {
  display: block;
  text-align: center;
  color: #5ac8fa;
  font-size: 12.5px;
  text-decoration: none;
  padding: 10px;
  margin-top: 4px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.08);
}
.bsky-footer-link:hover { text-decoration: underline; }

/* ============================================================
   Bluesky HOME / DESKTOP Widget (iOS-Stocks-inspired summary card)
   Used in two places:
     - .bsky-desk-widget  → floating card pinned to desktop top-left
     - .bsky-home-widget-cell → grid cell inside mobile home screen
   Inner structure (.bsky-home-widget) is shared.
   ============================================================ */
.bsky-home-widget {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(22, 22, 24, 0.62);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35),
              0 0 0 0.5px rgba(255, 255, 255, 0.08) inset;
  position: relative;
  overflow: hidden;
}
.bsky-home-widget::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(17, 133, 254, 0.10), transparent 40%);
  opacity: 0.8;
}
.bsky-home-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5),
              0 0 0 0.5px rgba(255, 255, 255, 0.12) inset;
}
.bsky-home-widget:active { transform: scale(0.985); }

.bsky-home-widget-ticker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 18px;
  padding-bottom: 8px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}
.bsky-home-widget-ticker .bsky-ticker-row {
  font-size: 12.5px;
  gap: 6px;
}
.bsky-home-widget-ticker .bsky-ticker-label { font-size: 12.5px; }
.bsky-home-widget-ticker .bsky-ticker-value { font-size: 12.5px; }

.bsky-home-widget-news {
  position: relative;
  z-index: 1;
  min-height: 42px;
}
.bsky-home-widget-news .bsky-post-source {
  font-size: 10.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  margin-bottom: 3px;
}
.bsky-home-widget-news .bsky-post-text {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bsky-home-widget-news .bsky-post-date {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 4px;
}

.bsky-home-widget-label {
  position: relative;
  z-index: 1;
  font-size: 11px;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: -2px;
}

/* Widget header (avatar + name + handle + badge) */
.bsky-home-widget-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}
.bsky-home-widget-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background-color: #1185fe;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.15) inset;
}
.bsky-home-widget-avatar svg { width: 100%; height: 100%; display: block; }
.bsky-home-widget-avatar.has-bsky-avatar svg { display: none; }
.bsky-home-widget-identity { flex: 1; min-width: 0; }
.bsky-home-widget-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bsky-home-widget-handle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bsky-home-widget-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(90, 200, 250, 0.9);
  background: rgba(90, 200, 250, 0.12);
  padding: 3px 6px;
  border-radius: 5px;
  flex-shrink: 0;
}

/* Feed list (multiple post slots) */
.bsky-home-widget-feed {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bsky-home-widget-feed .bsky-home-widget-news {
  padding: 2px 0;
}
.bsky-home-widget-feed .bsky-home-widget-news + .bsky-home-widget-news {
  padding-top: 10px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.06);
}

/* Desktop-specific positioning: pinned under menubar, top-left */
.bsky-desk-widget {
  position: absolute;
  top: 48px;
  left: 20px;
  width: 360px;
  z-index: 5;
}
.bsky-desk-widget .bsky-home-widget { padding: 16px 18px; gap: 12px; }

/* ============================================================
   Status Bar
   ============================================================ */
.finder-statusbar {
  padding: 5px 16px;
  font-size: 11px;
  color: var(--finder-text-sub);
  background: rgba(35, 35, 37, 0.55);
  border-top: 0.5px solid var(--finder-border);
  text-align: center;
  flex-shrink: 0;
}

/* ============================================================
   Preview Modal (QuickTime-ish)
   ============================================================ */
.preview-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.preview-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.preview-window {
  width: min(960px, 92vw);
  max-height: 92vh;
  background: rgba(28, 28, 30, 0.95);
  backdrop-filter: saturate(180%) blur(30px);
  border-radius: 12px;
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.12),
    0 30px 80px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transform: scale(0.92);
  transition: transform 0.3s var(--ease-out);
  display: flex;
  flex-direction: column;
}
.preview-backdrop.open .preview-window {
  transform: scale(1);
}
.preview-titlebar {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  background: linear-gradient(to bottom, rgba(60, 60, 62, 0.5), rgba(40, 40, 42, 0.3));
  border-bottom: 0.5px solid var(--finder-border);
  flex-shrink: 0;
}
.preview-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--finder-text);
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-body {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
}
.preview-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.preview-info {
  padding: 14px 18px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  overflow-y: auto;
  flex: 1;
  min-height: 50px;
}
.preview-info-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

/* ============================================================
   Dock
   ============================================================ */
.ymcb-dock {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 10px 26px;
  background: rgba(60, 60, 62, 0.35);
  backdrop-filter: saturate(180%) blur(30px);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  border-radius: 18px;
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.15) inset,
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 500;
  pointer-events: auto;
}
.dock-item {
  position: relative;
  width: 52px;
  height: 52px;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), margin 0.2s var(--ease-out);
  flex-shrink: 0;
}
.dock-item-tile {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 10px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}
.dock-item:hover {
  transform: translateY(-14px) scale(1.2);
}
.dock-item:hover + .dock-item {
  transform: translateY(-6px) scale(1.08);
}
.dock-item:has(+ .dock-item:hover) {
  transform: translateY(-6px) scale(1.08);
}
.dock-item-tile svg, .dock-item-tile img {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.dock-item-label {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.85;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  transition: opacity 0.15s ease;
}
.dock-item:hover .dock-item-label {
  opacity: 1;
}
.dock-item.minimized-indicator::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}
.dock-separator {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 4px;
  align-self: center;
  flex-shrink: 0;
}

/* Dock App backgrounds (Sequoia-style colored tiles) — applied to inner tile */
.dock-item.app-finder    .dock-item-tile { background: linear-gradient(135deg, #4aa6ff, #1e6fd6); }
.dock-item.app-safari    .dock-item-tile { background: radial-gradient(circle at 50% 50%, #0a84ff 0%, #0040a0 100%); }
.dock-item.app-x         .dock-item-tile { background: #000; }
.dock-item.app-instagram .dock-item-tile {
  background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.dock-item.app-tiktok    .dock-item-tile { background: #000; }
.dock-item.app-commission .dock-item-tile { background: linear-gradient(135deg, #ff9f0a, #ff453a); }
.dock-item.app-contact   .dock-item-tile { background: linear-gradient(135deg, #34c759, #00a86b); }
.dock-item.app-mail      .dock-item-tile { background: linear-gradient(135deg, #5db4ff, #0a84ff); }
.dock-item.app-about     .dock-item-tile { background: linear-gradient(135deg, #b0c4de, #6c8aad); }
.dock-item.app-youtube   .dock-item-tile { background: #fff; }
.dock-item.app-note      .dock-item-tile { background: #ffffff; }
.dock-item.app-bluesky   .dock-item-tile { background: #1185fe; }
/* When a live avatar has been fetched, hide the placeholder SVG and rely on the
   background-image set via JS (applyBlueskyAvatarToIcons). */
.dock-item-tile.has-bsky-avatar svg,
.ymcb-home-icon-tile.has-bsky-avatar svg { display: none; }
.dock-item-tile.has-bsky-avatar,
.ymcb-home-icon-tile.has-bsky-avatar { background-color: #1185fe; }
.dock-item.app-trash     .dock-item-tile {
  background: linear-gradient(135deg, rgba(100,100,100,0.4), rgba(60,60,60,0.3));
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================================
   iOS-Style Mobile Mode
   Activated by body.ymcb-mobile (set from JS) AND media query
   ============================================================ */
@media (max-width: 768px) {
  /* Hide desktop site-header on mobile */
  .site-header,
  .header-placeholder,
  .js-responsive-nav {
    display: none !important;
  }

  /* Hide the desktop Dock on mobile (replaced by iOS home screen) */
  .ymcb-dock { display: none !important; }

  /* Hide desktop background video entirely on mobile: clean dark wallpaper */
  .page-background-video,
  video.page-background-video,
  .bg-video,
  .background-video {
    display: none !important;
  }
  html, body {
    background: #000 !important;
  }
  #ymcb-desktop {
    background: #000;
  }

  /* ==========================================
     Scroll lock — body must not scroll in mobile mode.
     Without this, iOS Safari intercepts upward touch drags for body rubber-
     band bounce, which makes the inner .finder-content appear to be unable
     to scroll back up after scrolling down (classic iOS modal scroll bug).
     ========================================== */
  body.ymcb-mobile {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: auto;
  }
  /* Each scrollable app content: only contain chain-scroll so upward touch
     drags can't bubble to the (locked) body. We deliberately do NOT set
     `-webkit-overflow-scrolling: touch` or `touch-action: pan-y` here:
     modern iOS Safari already uses momentum scrolling for overflow:auto,
     and forcing the legacy async-scroll compositor reintroduces the ~300ms
     "click-after-scroll" dead zone that feels unresponsive. */
  .finder-window.mobile-app .finder-content,
  .finder-window.mobile-app .finder-content.finder-about-view,
  .finder-window.mobile-app .finder-content.finder-contact-form-view,
  .finder-window.mobile-app .finder-content.finder-commission-view,
  .finder-window.mobile-app .finder-content.finder-mail-view,
  .finder-window.mobile-app .finder-content.finder-bluesky-view {
    overscroll-behavior: contain;
  }

  /* ==========================================
     iOS App Window: fullscreen, no chrome
     ========================================== */
  .finder-window.mobile-app {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
    box-shadow: none;
    animation: none;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.3s ease,
                border-radius 0.3s ease;
    transform-origin: center bottom;
  }

  /* Hide traffic lights on mobile */
  .finder-window.mobile-app .traffic-lights,
  .finder-window.mobile-app .finder-tab-add {
    display: none !important;
  }
  .finder-window.mobile-app .simple-titlebar-spacer { display: none; }

  /* Compact chrome */
  .finder-window.mobile-app .finder-titlebar {
    height: 40px;
    padding: 0 12px;
    padding-top: env(safe-area-inset-top, 0);
    height: calc(40px + env(safe-area-inset-top, 0));
    cursor: default;
  }
  .finder-window.mobile-app .finder-sidebar { display: none; }
  .finder-window.mobile-app .finder-tabs {
    justify-content: flex-start;
    gap: 1px;
  }
  .finder-window.mobile-app .finder-tab {
    min-width: 90px;
    max-width: 160px;
    font-size: 12px;
    height: 28px;
    padding: 4px 8px;
  }
  .finder-window.mobile-app .finder-toolbar {
    height: 38px;
    padding: 0 8px;
  }
  .finder-window.mobile-app .toolbar-path { font-size: 13px; }
  .finder-window.mobile-app .finder-content {
    padding: 14px 12px calc(20px + env(safe-area-inset-bottom, 0) + 24px);
  }
  .finder-window.mobile-app .finder-content.finder-commission-view {
    padding: 0;
  }
  .finder-window.mobile-app .commission-doc {
    padding: 24px 20px calc(60px + env(safe-area-inset-bottom, 0));
  }
  .finder-window.mobile-app .finder-content-title { font-size: 19px; }
  .finder-window.mobile-app .folder-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 16px 8px;
  }
  .finder-window.mobile-app .folder-thumb { width: 80px; height: 60px; }
  .finder-window.mobile-app .folder-label { font-size: 11px; max-width: 96px; }
  .finder-window.mobile-app .folder-item {
    transform: rotate(0) !important;
  }
  .finder-window.mobile-app .folder-item:hover {
    transform: translateY(-2px) scale(1.02) !important;
  }
  .finder-window.mobile-app .finder-statusbar { display: none; }

  /* Contact form mobile layout */
  .finder-window.mobile-app .finder-content.finder-contact-form-view { padding: 0; }
  .finder-window.mobile-app .contact-form {
    padding: 20px 18px calc(60px + env(safe-area-inset-bottom, 0));
    gap: 16px;
  }
  .finder-window.mobile-app .contact-form-title { font-size: 22px; }
  .finder-window.mobile-app .cf-field input[type="text"],
  .finder-window.mobile-app .cf-field input[type="number"],
  .finder-window.mobile-app .cf-field input[type="date"],
  .finder-window.mobile-app .cf-field textarea {
    font-size: 16px; /* iOS: prevents zoom on focus */
    padding: 12px 14px;
  }
  .finder-window.mobile-app .cf-submit {
    font-size: 15px;
    padding: 14px 20px;
  }

  /* About hero stacks */
  .finder-window.mobile-app .about-hero {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  /* ==========================================
     Window state transitions (iOS app open/close)
     ========================================== */
  /* Background app (hidden behind foreground) */
  .finder-window.mobile-background {
    transform: scale(0.85) translateY(20vh);
    opacity: 0;
    pointer-events: none;
    border-radius: 24px;
  }
  /* Foreground app (visible, interactive) */
  .finder-window.mobile-foreground {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
    border-radius: 0;
  }

  /* When home is shown, all windows recede */
  body.ymcb-mobile.mobile-show-home .finder-window.mobile-app {
    transform: scale(0.6) translateY(20vh);
    opacity: 0;
    pointer-events: none;
    border-radius: 24px;
  }

  /* When switcher is shown, hide all windows (switcher renders clones) */
  body.ymcb-mobile.mobile-show-switcher .finder-window.mobile-app {
    display: none;
  }

  /* Gesture: during swipe, scale current app down proportional to gesture */
  body.ymcb-mobile.gesture-active.mobile-show-app .finder-window.mobile-foreground {
    transform: scale(calc(1 - 0.3 * var(--gesture-progress, 0))) translateY(calc(var(--gesture-progress, 0) * -2vh));
    border-radius: calc(var(--gesture-progress, 0) * 24px);
    transition: none;
  }

  /* ==========================================
     Home Screen
     ========================================== */
  .ymcb-home-screen {
    position: fixed;
    inset: 0;
    z-index: 10;
    padding: max(env(safe-area-inset-top, 0), 12px) 18px 0;
    display: flex;
    flex-direction: column;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    transform: scale(1.08);
    pointer-events: none;
  }
  body.ymcb-mobile.mobile-show-home .ymcb-home-screen {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }
  body.ymcb-mobile.gesture-active.mobile-show-app .ymcb-home-screen {
    /* Preview home during swipe up */
    opacity: calc(0.1 + 0.6 * var(--gesture-progress, 0));
    transform: scale(calc(1.08 - 0.08 * var(--gesture-progress, 0)));
    transition: none;
  }
  /* ======= Vertical-responsive spacing knobs =======
     Tune these CSS variables to make everything breathe on short screens. */
  :root {
    --home-header-pad-y: 12px;
    --home-header-gap: 12px;
    --home-avatar-size: 44px;
    --home-grid-gap-y: 22px;
    --home-grid-pad-top: 10px;
    --home-grid-pad-bottom: 24px;
    --home-dock-pad-y: 12px;
    --home-dock-margin-bottom: 34px;
    --home-icon-tile-size: 58px;
  }

  /* Header: Logo avatar + name (replaces the old clock) — also tappable → About */
  .ymcb-home-header {
    display: flex;
    align-items: center;
    gap: var(--home-header-gap);
    padding: var(--home-header-pad-y) 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    border-radius: 14px;
    transition: background 0.15s ease, transform 0.12s ease;
  }
  .ymcb-home-header:active {
    background: rgba(255, 255, 255, 0.06);
    transform: scale(0.985);
  }
  .ymcb-home-avatar {
    width: var(--home-avatar-size);
    height: var(--home-avatar-size);
    border-radius: 50%;
    background: #111;
    padding: 6px;
    box-sizing: border-box;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), inset 0 0 0 0.5px rgba(255,255,255,0.12);
  }
  .ymcb-home-avatar svg { width: 100%; height: 100%; display: block; }
  .ymcb-home-name-block { min-width: 0; flex: 1; }
  .ymcb-home-name {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  }
  .ymcb-home-name-alt {
    font-weight: 400;
    color: rgba(255,255,255,0.75);
    font-size: 13.5px;
  }
  .ymcb-home-role {
    color: rgba(255,255,255,0.65);
    font-size: 11.5px;
    margin-top: 2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  }
  .ymcb-home-header-chevron {
    color: rgba(255, 255, 255, 0.4);
    font-size: 22px;
    font-weight: 300;
    flex-shrink: 0;
    line-height: 1;
    padding-right: 4px;
  }

  /* Grid (scrollable if many icons) */
  .ymcb-home-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: min-content;
    gap: var(--home-grid-gap-y) 10px;
    padding: var(--home-grid-pad-top) 4px var(--home-grid-pad-bottom);
    overflow-y: auto;
    scrollbar-width: none;
    align-content: start;
  }
  .ymcb-home-grid::-webkit-scrollbar { display: none; }

  /* Bottom dock on home screen */
  .ymcb-home-dock {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 8px;
    padding: var(--home-dock-pad-y) 10px var(--home-dock-pad-y);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: saturate(180%) blur(26px);
    -webkit-backdrop-filter: saturate(180%) blur(26px);
    border-radius: 28px;
    margin: 0 6px calc(env(safe-area-inset-bottom, 0) + var(--home-dock-margin-bottom));
    box-shadow:
      0 0 0 0.5px rgba(255,255,255,0.25) inset,
      0 10px 30px rgba(0,0,0,0.35);
    position: relative;
    z-index: 20;
  }

  .ymcb-home-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: transform 0.12s ease;
    user-select: none;
    min-width: 0;
  }
  .ymcb-home-icon:active { transform: scale(0.88); }
  .ymcb-home-icon.is-dock { gap: 5px; }
  .ymcb-home-icon-tile {
    width: var(--home-icon-tile-size);
    height: var(--home-icon-tile-size);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Match desktop Dock tile shadow/highlight (inset highlight + outer depth) */
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.28),
      inset 0 -1px 0 rgba(0,0,0,0.2),
      0 6px 14px rgba(0,0,0,0.4),
      0 1px 3px rgba(0,0,0,0.25);
    /* Fallback background so tiles are never invisible on black bg even if SVG fails */
    background: #1c1c1e;
    pointer-events: none;
  }
  .ymcb-home-icon-tile svg {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
  }
  /* Per-app fallback backgrounds (match each SVG's own rect background) */
  .ymcb-home-icon-tile.app-finder     { background: linear-gradient(135deg, #4aa6ff, #1e6fd6); }
  .ymcb-home-icon-tile.app-mail       { background: linear-gradient(135deg, #5db4ff, #0a84ff); }
  .ymcb-home-icon-tile.app-commission { background: linear-gradient(135deg, #ff9f0a, #ff453a); }
  .ymcb-home-icon-tile.app-about      { background: linear-gradient(135deg, #b0c4de, #6c8aad); }
  .ymcb-home-icon-tile.app-youtube    { background: #fff; }
  .ymcb-home-icon-tile.app-x          { background: #000; }
  .ymcb-home-icon-tile.app-instagram  {
    background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
  }
  .ymcb-home-icon-tile.app-tiktok     { background: #000; }
  .ymcb-home-icon-tile.app-note       { background: #ffffff; }
  .ymcb-home-icon-tile.app-bluesky    { background: #1185fe; }

  /* Bluesky widget cell — spans full width, roughly the height of 2 icon rows */
  .bsky-home-widget-cell {
    grid-column: 1 / -1;
    grid-row: span 2;
  }
  .bsky-home-widget-cell .bsky-home-widget {
    height: 100%;
    min-height: 180px;
    padding: 16px 18px;
    border-radius: 22px;
    gap: 12px;
  }
  .bsky-home-widget-cell .bsky-home-widget-ticker .bsky-ticker-row,
  .bsky-home-widget-cell .bsky-home-widget-ticker .bsky-ticker-label,
  .bsky-home-widget-cell .bsky-home-widget-ticker .bsky-ticker-value {
    font-size: 13.5px;
  }
  .bsky-home-widget-cell .bsky-home-widget-news .bsky-post-text {
    font-size: 15px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .ymcb-home-icon-label {
    color: white;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,0.85);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
  }
  .ymcb-home-icon.is-dock .ymcb-home-icon-label {
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(255,255,255,0.95);
    max-width: 72px;
  }

  /* ==========================================
     Mobile Close Button (visible in each app)
     ========================================== */
  .finder-window.mobile-app .mobile-close-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: calc(env(safe-area-inset-top, 0) + 7px);
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    z-index: 20;
    padding: 0;
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.1s ease;
  }
  .finder-window.mobile-app .mobile-close-btn:active {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(0.92);
  }
  .finder-window.mobile-app .mobile-close-btn svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
  }

  /* ==========================================
     Home Indicator (bottom pill)
     ========================================== */
  .ymcb-home-indicator-wrap {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(24px + env(safe-area-inset-bottom, 0));
    padding-bottom: env(safe-area-inset-bottom, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    /* Extend hit area to make swipe easier */
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
    cursor: grab;
    background: transparent;
  }
  .ymcb-home-indicator-wrap:active { cursor: grabbing; }
  .ymcb-home-indicator {
    width: 140px;
    height: 5px;
    border-radius: 100px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transition: width 0.15s ease, box-shadow 0.15s ease;
  }
  body.ymcb-mobile.gesture-active .ymcb-home-indicator {
    width: 170px;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.6);
  }

  /* ==========================================
     App Switcher (iOS card stack)
     ========================================== */
  .ymcb-app-switcher {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(40px) saturate(120%);
    -webkit-backdrop-filter: blur(40px) saturate(120%);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: max(env(safe-area-inset-top, 0), 30px) 0 calc(40px + env(safe-area-inset-bottom, 0));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  body.ymcb-mobile.mobile-show-switcher .ymcb-app-switcher {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }
  .ymcb-switcher-cards {
    flex: 1;
    width: 100%;
    display: flex;
    gap: 24px;
    padding: 20px 10vw;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    align-items: center;
    perspective: 1500px;
  }
  .ymcb-switcher-cards::-webkit-scrollbar { display: none; }
  .ymcb-switcher-card {
    flex-shrink: 0;
    width: 72vw;
    max-width: 380px;
    height: 72vh;
    max-height: 640px;
    background: #1c1c1e;
    border-radius: 18px;
    overflow: hidden;
    scroll-snap-align: center;
    box-shadow:
      0 0 0 0.5px rgba(255,255,255,0.18),
      0 20px 60px rgba(0,0,0,0.6);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.25s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    flex-direction: column;
  }
  .ymcb-switcher-card.dismissing {
    transform: translateY(-100vh) scale(0.8) !important;
    opacity: 0 !important;
  }
  .ymcb-switcher-card.dragging {
    transition: none;
  }
  .ymcb-switcher-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(30, 30, 32, 0.95);
    color: white;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 0.5px solid rgba(255,255,255,0.08);
  }
  .ymcb-switcher-card-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
  }
  .ymcb-switcher-card-icon svg { width: 100%; height: 100%; }
  .ymcb-switcher-card-preview {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #2a2a2c;
  }
  .ymcb-switcher-snapshot {
    transform: scale(0.5);
    transform-origin: top left;
    width: 200%;
    height: 200%;
    pointer-events: none;
    filter: saturate(0.9);
  }
  .ymcb-switcher-snapshot .finder-titlebar,
  .ymcb-switcher-snapshot .finder-toolbar {
    position: static;
  }
  .ymcb-switcher-hint {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    padding: 10px 20px 0;
    text-align: center;
  }
  .ymcb-switcher-empty {
    color: rgba(255,255,255,0.5);
    font-size: 15px;
    text-align: center;
    padding: 40px 20px;
  }

  /* Disable window drag gesture on mobile (windows are fullscreen) */
  .finder-window.mobile-app .finder-titlebar.drag-handle {
    cursor: default;
  }

  /* ==========================================
     Mobile text size bumps (readability)
     Base values are tuned for desktop (12–14px);
     mobile needs a bit more for comfortable reading.
     ========================================== */

  /* Home screen */
  .ymcb-home-name { font-size: 22px; }
  .ymcb-home-name-alt { font-size: 17px; }
  .ymcb-home-role { font-size: 15px; }
  .ymcb-home-icon-label { font-size: 15px; }
  .ymcb-home-icon.is-dock .ymcb-home-icon-label { font-size: 13.5px; }

  /* Window chrome */
  .finder-window.mobile-app .simple-title { font-size: 15px; }
  .finder-window.mobile-app .finder-statusbar { font-size: 12px; }
  .finder-window.mobile-app .toolbar-path { font-size: 15px; }
  .finder-window.mobile-app .finder-content-title { font-size: 22px; }
  .finder-window.mobile-app .finder-content-subtitle { font-size: 13px; }

  /* Works (folder grid) */
  .finder-window.mobile-app .folder-label { font-size: 13px; max-width: 100px; }
  .finder-window.mobile-app .folder-count { font-size: 11px; }

  /* Contact form */
  .finder-window.mobile-app .contact-form-title { font-size: 26px; }
  .finder-window.mobile-app .contact-form-subtitle { font-size: 14px; }
  .finder-window.mobile-app .cf-quick-title { font-size: 14px; }
  .finder-window.mobile-app .cf-quick-note { font-size: 13px; }
  .finder-window.mobile-app .cf-quick-item { font-size: 14px; }
  .finder-window.mobile-app .cf-field label { font-size: 14px; }
  /* 16px prevents iOS from auto-zooming the viewport on input focus */
  .finder-window.mobile-app .cf-field input,
  .finder-window.mobile-app .cf-field textarea { font-size: 16px; }
  .finder-window.mobile-app .cf-checkbox-label { font-size: 14px; }
  .finder-window.mobile-app .cf-note { font-size: 13px; line-height: 1.7; }
  .finder-window.mobile-app .cf-submit { font-size: 15px; }
  .finder-window.mobile-app .cf-sent { font-size: 14px; }

  /* Commission */
  .finder-window.mobile-app .commission-doc-title { font-size: 28px; }
  .finder-window.mobile-app .commission-doc-subtitle { font-size: 14px; }
  .finder-window.mobile-app .commission-section h2 { font-size: 19px; }
  .finder-window.mobile-app .commission-intro,
  .finder-window.mobile-app .commission-clause p,
  .finder-window.mobile-app .commission-cta p { font-size: 14.5px; line-height: 1.75; }
  .finder-window.mobile-app .commission-note,
  .finder-window.mobile-app .commission-note-small { font-size: 13.5px; line-height: 1.75; }
  .finder-window.mobile-app .commission-cta-btn { font-size: 15px; }

  /* About */
  .finder-window.mobile-app .about-name { font-size: 26px; }
  .finder-window.mobile-app .about-name-alt { font-size: 20px; }
  .finder-window.mobile-app .about-title { font-size: 16px; }
  .finder-window.mobile-app .about-tagline { font-size: 14px; }
  .finder-window.mobile-app .about-section h3 { font-size: 14px; }
  .finder-window.mobile-app .about-section p,
  .finder-window.mobile-app .about-section li { font-size: 14.5px; line-height: 1.75; }

  /* ======= Vertical-responsive overrides =======
     Tune the knobs based on viewport height so the layout breathes on short
     phones (iPhone SE, landscape) without overflowing on tall devices. */
  @media (max-height: 780px) {
    :root {
      --home-header-pad-y: 8px;
      --home-avatar-size: 38px;
      --home-grid-gap-y: 16px;
      --home-grid-pad-top: 6px;
      --home-grid-pad-bottom: 16px;
      --home-dock-pad-y: 10px;
      --home-dock-margin-bottom: 22px;
      --home-icon-tile-size: 52px;
    }
    .ymcb-home-name { font-size: 15.5px; }
    .ymcb-home-name-alt { font-size: 12.5px; }
    .ymcb-home-role { font-size: 11px; }
    .bsky-home-widget-cell .bsky-home-widget { min-height: 150px; padding: 12px 14px; gap: 8px; }
  }
  @media (max-height: 640px) {
    :root {
      --home-header-pad-y: 6px;
      --home-avatar-size: 34px;
      --home-grid-gap-y: 12px;
      --home-grid-pad-top: 4px;
      --home-grid-pad-bottom: 12px;
      --home-dock-pad-y: 8px;
      --home-dock-margin-bottom: 14px;
      --home-icon-tile-size: 48px;
    }
    .ymcb-home-name { font-size: 14px; }
    .ymcb-home-name-alt { font-size: 11.5px; }
    .ymcb-home-role { display: none; }
    .bsky-home-widget-cell .bsky-home-widget { min-height: 130px; padding: 10px 12px; }
  }
}

/* ============================================================
   Desktop Identity Card (pinned next to the Bluesky widget)
   — clicking opens About
   ============================================================ */
.ymcb-desk-identity {
  position: absolute;
  top: 48px;
  left: 400px;
  width: 280px;
  z-index: 5;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(22, 22, 24, 0.62);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  color: #fff;
  cursor: pointer;
  user-select: none;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.35),
    0 0 0 0.5px rgba(255, 255, 255, 0.08) inset;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}
.ymcb-desk-identity:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5),
              0 0 0 0.5px rgba(255, 255, 255, 0.12) inset;
}
.ymcb-desk-identity:active { transform: scale(0.985); }

.ymcb-desk-identity-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #111;
  padding: 6px;
  box-sizing: border-box;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
}
.ymcb-desk-identity-avatar svg { width: 100%; height: 100%; display: block; }

.ymcb-desk-identity-text { min-width: 0; flex: 1; }
.ymcb-desk-identity-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ymcb-desk-identity-alt { font-weight: 400; color: rgba(255, 255, 255, 0.7); }
.ymcb-desk-identity-role {
  margin-top: 2px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ymcb-desk-identity-chevron {
  color: rgba(255, 255, 255, 0.35);
  font-size: 22px;
  font-weight: 300;
  flex-shrink: 0;
  line-height: 1;
  padding-right: 2px;
}

/* Hide legacy page elements */
.masthead,
.site-wrap,
.back-to-top-fixed,
.site-footer {
  display: none !important;
}
/* But keep header on desktop */
.site-header { display: flex; }
