/* sghgjos 1.0.1 — app styles (Finder / Browser / Settings / Album / …) */
/* ===== App: Finder (macOS layout) ===== */
.sghgjos-finder-toolbar {
  position: relative;
  background: #ececec;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  height: 38px;
  padding: 0 10px;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
}

html.sghgjos-dark .sghgjos-finder-toolbar {
  background: #323232;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-finder-tb-left,
.sghgjos-finder-tb-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  z-index: 1;
}

.sghgjos-finder-tb-left {
  min-width: 0;
}

.sghgjos-finder-tb-right {
  margin-left: auto;
}

.sghgjos-finder-tb-right .sghgjos-tb-search {
  margin-left: 0;
  width: 168px;
}

.sghgjos-finder-path {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: min(280px, 36%);
  height: 24px;
  padding: 0 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.6) inset;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
}

html.sghgjos-dark .sghgjos-finder-path {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  color: #f5f5f7;
}

.sghgjos-finder-path-ico {
  width: 14px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, #7ec8ff, #0a84ff);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.sghgjos-finder-path-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sghgjos-app-finder {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: auto;
  overflow: hidden;
  background: #fff;
}

html.sghgjos-dark .sghgjos-app-finder {
  background: var(--body-bg, #1e1e1e);
}

.sghgjos-finder-side {
  background: rgba(236, 236, 236, 0.92);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  padding: 8px 8px 12px;
  overflow: auto;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

html.sghgjos-dark .sghgjos-finder-side {
  background: rgba(40, 40, 42, 0.96);
  border-right-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-finder-side-section {
  margin-bottom: 10px;
}

.sghgjos-finder-side h4 {
  margin: 4px 8px 4px;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.45);
  font-weight: 600;
  letter-spacing: 0.01em;
}

html.sghgjos-dark .sghgjos-finder-side h4 {
  color: rgba(255, 255, 255, 0.4);
}

.sghgjos-finder-side button {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.3;
  color: rgba(0, 0, 0, 0.82);
  cursor: default;
  min-width: 0;
}

html.sghgjos-dark .sghgjos-finder-side button {
  color: rgba(255, 255, 255, 0.82);
}

.sghgjos-finder-side .fi-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sghgjos-finder-side button em {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  opacity: 0.5;
  flex-shrink: 0;
}

.sghgjos-finder-side button:hover:not(.is-active) {
  background: rgba(0, 0, 0, 0.05);
}

html.sghgjos-dark .sghgjos-finder-side button:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.06);
}

.sghgjos-finder-side button.is-active {
  background: var(--accent, #007aff);
  color: #fff;
}

.sghgjos-finder-side button.is-active em {
  opacity: 0.9;
}

.sghgjos-finder-side .fi,
.sghgjos-mobile-src-btn .fi,
.sghgjos-finder-src-item .fi,
.sghgjos-finder-empty-ico.fi {
  flex-shrink: 0;
  background: #8e8e93;
}

.sghgjos-finder-side .fi {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.sghgjos-finder-side .fi-mac,
.sghgjos-mobile-src-btn .fi-mac,
.sghgjos-finder-src-item .fi-mac,
.sghgjos-finder-empty-ico.fi-mac { background: linear-gradient(135deg, #5ac8fa, #007aff); }
.sghgjos-finder-side .fi-apps,
.sghgjos-mobile-src-btn .fi-apps,
.sghgjos-finder-src-item .fi-apps,
.sghgjos-finder-empty-ico.fi-apps { background: linear-gradient(135deg, #5ac8fa, #007aff); }
.sghgjos-finder-side .fi-doc,
.sghgjos-mobile-src-btn .fi-doc,
.sghgjos-finder-src-item .fi-doc,
.sghgjos-finder-empty-ico.fi-doc { background: linear-gradient(180deg, #fff 30%, #d1d1d6); box-shadow: inset 0 0 0 1px #c7c7cc; }
.sghgjos-finder-side .fi-folder,
.sghgjos-mobile-src-btn .fi-folder,
.sghgjos-finder-src-item .fi-folder,
.sghgjos-finder-empty-ico.fi-folder { background: linear-gradient(180deg, #7ec8ff, #0a84ff); }
.sghgjos-finder-side .fi-media,
.sghgjos-mobile-src-btn .fi-media,
.sghgjos-finder-src-item .fi-media,
.sghgjos-finder-empty-ico.fi-media { background: linear-gradient(135deg, #ff9f0a, #ffd60a); }
.sghgjos-finder-side .fi-clock,
.sghgjos-mobile-src-btn .fi-clock,
.sghgjos-finder-src-item .fi-clock,
.sghgjos-finder-empty-ico.fi-clock { background: linear-gradient(135deg, #64d2ff, #5e5ce6); }
.sghgjos-finder-side .fi-trash,
.sghgjos-mobile-src-btn .fi-trash,
.sghgjos-finder-src-item .fi-trash,
.sghgjos-finder-empty-ico.fi-trash { background: linear-gradient(135deg, #8e8e93, #636366); }
.sghgjos-finder-side .fi-tag,
.sghgjos-mobile-src-btn .fi-tag,
.sghgjos-finder-src-item .fi-tag,
.sghgjos-finder-empty-ico.fi-tag { background: linear-gradient(135deg, #ff9f0a, #ff453a); }

/* 归档两级目录：三角折叠 + 图标对齐 */
.sghgjos-finder-cat-node {
  margin: 0;
}

.sghgjos-finder-cat-row {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  border-radius: 6px;
}

.sghgjos-finder-side .sghgjos-finder-cat-row > .sghgjos-finder-cat-item {
  flex: 1;
  width: auto;
  min-width: 0;
}

.sghgjos-finder-side-section.has-cat-tree .sghgjos-finder-cat-row > .sghgjos-finder-cat-item {
  padding-left: 4px;
}

.sghgjos-finder-side .sghgjos-finder-cat-toggle,
.sghgjos-finder-side .sghgjos-finder-cat-toggle-spacer {
  flex: 0 0 14px;
  width: 14px;
  max-width: 14px;
  height: 22px;
  min-height: 0;
  margin: 0 0 0 4px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent !important;
  position: relative;
  cursor: default;
  gap: 0;
  color: inherit;
}

.sghgjos-finder-cat-toggle-spacer {
  pointer-events: none;
}

.sghgjos-finder-side .sghgjos-finder-cat-toggle:hover {
  background: rgba(0, 0, 0, 0.06) !important;
}

html.sghgjos-dark .sghgjos-finder-side .sghgjos-finder-cat-toggle:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

.sghgjos-finder-cat-toggle::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4.5px;
  height: 4.5px;
  margin: -2.5px 0 0 -1.5px;
  border-right: 1.4px solid rgba(0, 0, 0, 0.4);
  border-bottom: 1.4px solid rgba(0, 0, 0, 0.4);
  transform: rotate(-45deg);
  transition: transform 0.14s ease;
  opacity: 0.85;
}

html.sghgjos-dark .sghgjos-finder-cat-toggle::before {
  border-color: rgba(255, 255, 255, 0.55);
}

.sghgjos-finder-cat-toggle.is-open::before {
  transform: rotate(45deg);
  margin-top: -3.5px;
  margin-left: -2.5px;
}

/* 整行悬停 / 选中，避免三角与标签脱节 */
.sghgjos-finder-side .sghgjos-finder-cat-row:hover:not(:has(.is-active)) {
  background: rgba(0, 0, 0, 0.05);
}

html.sghgjos-dark .sghgjos-finder-side .sghgjos-finder-cat-row:hover:not(:has(.is-active)) {
  background: rgba(255, 255, 255, 0.06);
}

.sghgjos-finder-side .sghgjos-finder-cat-row:hover:not(:has(.is-active)) > .sghgjos-finder-cat-item,
.sghgjos-finder-side .sghgjos-finder-cat-row:hover:not(:has(.is-active)) > .sghgjos-finder-cat-toggle {
  background: transparent !important;
}

.sghgjos-finder-side .sghgjos-finder-cat-row:has(.sghgjos-finder-cat-item.is-active) {
  background: var(--accent, #007aff);
}

.sghgjos-finder-side .sghgjos-finder-cat-row:has(.sghgjos-finder-cat-item.is-active) > .sghgjos-finder-cat-item {
  background: transparent !important;
  color: #fff;
}

.sghgjos-finder-side .sghgjos-finder-cat-row:has(.sghgjos-finder-cat-item.is-active) > .sghgjos-finder-cat-item em {
  opacity: 0.9;
}

.sghgjos-finder-side .sghgjos-finder-cat-row:has(.sghgjos-finder-cat-item.is-active) .sghgjos-finder-cat-toggle::before {
  border-color: rgba(255, 255, 255, 0.9);
  opacity: 1;
}

.sghgjos-finder-side .sghgjos-finder-cat-row:has(.sghgjos-finder-cat-item.is-active) .sghgjos-finder-cat-toggle:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}

.sghgjos-finder-cat-children {
  padding-left: 14px;
}

.sghgjos-finder-cat-children[hidden] {
  display: none;
}

.sghgjos-finder-side .sghgjos-finder-cat-children .sghgjos-finder-cat-row.is-child {
  margin-top: 1px;
}

/* 手机位置面板：归档树 */
.sghgjos-finder-cat-row.sheet {
  position: relative;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0;
  min-height: 44px;
}

html.sghgjos-dark .sghgjos-finder-cat-row.sheet {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-finder-src-group h4 + .sghgjos-finder-src-item,
.sghgjos-finder-src-group h4 + .sghgjos-finder-cat-row.sheet,
.sghgjos-finder-src-group h4 + .sghgjos-finder-cat-node .sghgjos-finder-cat-row.sheet {
  border-top: 0;
}

.sghgjos-finder-cat-row.sheet .sghgjos-finder-src-item {
  border-top: 0;
  flex: 1;
  min-width: 0;
  padding-left: 10px;
}

.sghgjos-finder-cat-row.sheet .sghgjos-finder-cat-toggle,
.sghgjos-finder-cat-row.sheet .sghgjos-finder-cat-toggle-spacer {
  flex: 0 0 28px;
  width: 28px;
  max-width: 28px;
  height: 28px;
  margin: 0 0 0 8px;
  border-radius: 6px;
  position: relative;
  background: transparent;
}

.sghgjos-finder-cat-row.sheet .sghgjos-finder-cat-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

html.sghgjos-dark .sghgjos-finder-cat-row.sheet .sghgjos-finder-cat-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sghgjos-finder-cat-children.sheet .sghgjos-finder-src-item.is-child {
  padding-left: 46px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

html.sghgjos-dark .sghgjos-finder-cat-children.sheet .sghgjos-finder-src-item.is-child {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-finder-cat-children.sheet .sghgjos-finder-src-item.is-child .fi {
  opacity: 0.92;
}

.sghgjos-finder-app-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  overflow: hidden;
}

.sghgjos-finder-app-ico .sghgjos-icon-face {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  transform: none;
}

.sghgjos-finder-app-ico.lg {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  margin: 0 0 6px;
}

.sghgjos-finder-app-ico.lg .sghgjos-icon-face {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.sghgjos-finder-row .doc-ico.is-note .doc-fold,
.sghgjos-finder-card .doc-ico.is-note .doc-fold {
  background: linear-gradient(180deg, #ffe566, #ffd60a);
}

.sghgjos-finder-list {
  background: #fff;
}

html.sghgjos-dark .sghgjos-finder-list {
  background: var(--body-bg, #1e1e1e);
}

/* List view — Finder table (columns driven by .has-date / .has-kind / .has-cat) */
.sghgjos-finder-sheet.is-list {
  --finder-cols: minmax(180px, 1fr);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100%;
  box-sizing: border-box;
}

.sghgjos-finder-sheet.is-list.has-kind:not(.has-date):not(.has-cat) {
  --finder-cols: minmax(180px, 1fr) 72px;
}

.sghgjos-finder-sheet.is-list.has-date:not(.has-kind):not(.has-cat) {
  --finder-cols: minmax(180px, 1fr) 118px;
}

.sghgjos-finder-sheet.is-list.has-date.has-kind:not(.has-cat) {
  --finder-cols: minmax(180px, 1fr) 118px 72px;
}

.sghgjos-finder-sheet.is-list.has-kind.has-cat:not(.has-date) {
  --finder-cols: minmax(180px, 1fr) 72px 100px;
}

.sghgjos-finder-sheet.is-list.has-date.has-cat:not(.has-kind) {
  --finder-cols: minmax(180px, 1fr) 118px 100px;
}

.sghgjos-finder-sheet.is-list.has-date.has-kind.has-cat {
  --finder-cols: minmax(180px, 1fr) 118px 72px 100px;
}

.sghgjos-finder-thead,
.sghgjos-finder-row {
  display: grid;
  grid-template-columns: var(--finder-cols);
  align-items: center;
  column-gap: 8px;
  padding: 0 12px 0 10px;
  box-sizing: border-box;
  min-width: 0;
}

.sghgjos-finder-thead {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 24px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.45);
  background: linear-gradient(180deg, #f7f7f7, #efefef);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  user-select: none;
}

html.sghgjos-dark .sghgjos-finder-thead {
  color: rgba(255, 255, 255, 0.45);
  background: linear-gradient(180deg, #3a3a3c, #323234);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-finder-thead > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  padding-right: 8px;
  line-height: 24px;
}

.sghgjos-finder-thead > span:last-child {
  border-right: 0;
}

html.sghgjos-dark .sghgjos-finder-thead > span {
  border-right-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-finder-row {
  height: 28px;
  width: 100%;
  margin: 0;
  font: inherit;
  font-size: 13px;
  color: var(--text, #1d1d1f);
  text-align: left;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

html.sghgjos-dark .sghgjos-finder-row {
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

.sghgjos-finder-row:hover {
  background: rgba(0, 122, 255, 0.08);
}

.sghgjos-finder-row.is-sel {
  background: rgba(0, 122, 255, 0.22);
  color: #000;
}

html.sghgjos-dark .sghgjos-finder-row.is-sel {
  background: rgba(10, 132, 255, 0.35);
  color: #fff;
}

.sghgjos-finder-row .col-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sghgjos-finder-name-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  justify-content: center;
}

.sghgjos-finder-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sghgjos-finder-meta {
  display: none;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.25;
  color: rgba(0, 0, 0, 0.42);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.sghgjos-dark .sghgjos-finder-meta {
  color: rgba(255, 255, 255, 0.45);
}

.sghgjos-finder-row.is-sel .sghgjos-finder-meta {
  color: inherit;
  opacity: 0.75;
}

.sghgjos-finder-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  text-align: center;
}

.sghgjos-finder-empty-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  opacity: 0.85;
}

.sghgjos-finder-empty .sghgjos-empty {
  margin: 0;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.45);
}

html.sghgjos-dark .sghgjos-finder-empty .sghgjos-empty {
  color: rgba(255, 255, 255, 0.45);
}

/* Location picker sheet (mobile / narrow Finder) */
.sghgjos-window-body:has(.sghgjos-app-finder) {
  position: relative;
}

.sghgjos-finder-src-sheet {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.sghgjos-finder-src-sheet.is-open {
  pointer-events: auto;
}

.sghgjos-finder-src-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.36);
  opacity: 0;
  transition: opacity 0.22s ease;
  cursor: pointer;
}

.sghgjos-finder-src-sheet.is-open .sghgjos-finder-src-backdrop {
  opacity: 1;
}

.sghgjos-finder-src-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(78vh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: 16px 16px 0 0;
  background: #f2f2f7;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
  transform: translateY(105%);
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
}

html.sghgjos-dark .sghgjos-finder-src-panel {
  background: #1c1c1e;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
}

.sghgjos-finder-src-sheet.is-open .sghgjos-finder-src-panel {
  transform: translateY(0);
}

.sghgjos-finder-src-grab {
  width: 36px;
  height: 4px;
  margin: 8px auto 2px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

html.sghgjos-dark .sghgjos-finder-src-grab {
  background: rgba(255, 255, 255, 0.22);
}

.sghgjos-finder-src-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 10px;
  flex-shrink: 0;
}

.sghgjos-finder-src-panel-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text, #1d1d1f);
}

.sghgjos-finder-src-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.55);
  padding: 0;
  cursor: pointer;
}

html.sghgjos-dark .sghgjos-finder-src-close {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

.sghgjos-finder-src-panel-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px 16px;
}

.sghgjos-finder-src-group {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

html.sghgjos-dark .sghgjos-finder-src-group {
  background: #2c2c2e;
}

.sghgjos-finder-src-group h4 {
  margin: 0;
  padding: 10px 14px 4px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.42);
  letter-spacing: 0.02em;
}

html.sghgjos-dark .sghgjos-finder-src-group h4 {
  color: rgba(255, 255, 255, 0.4);
}

.sghgjos-finder-src-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
  color: var(--text, #1d1d1f);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sghgjos-finder-src-group h4 + .sghgjos-finder-src-item {
  border-top: 0;
}

html.sghgjos-dark .sghgjos-finder-src-item {
  border-top-color: rgba(255, 255, 255, 0.08);
  color: #f5f5f7;
}

.sghgjos-finder-src-item:active {
  background: rgba(0, 0, 0, 0.04);
}

html.sghgjos-dark .sghgjos-finder-src-item:active {
  background: rgba(255, 255, 255, 0.06);
}

.sghgjos-finder-src-item .fi {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.sghgjos-finder-src-item .fi-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sghgjos-finder-src-item em {
  margin-left: auto;
  font-style: normal;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

html.sghgjos-dark .sghgjos-finder-src-item em {
  color: rgba(255, 255, 255, 0.35);
}

.sghgjos-finder-src-item.is-active {
  color: var(--accent, #007aff);
}

.sghgjos-finder-src-item.is-active em {
  color: inherit;
  opacity: 0.7;
}

.sghgjos-finder-src-check {
  width: 8px;
  height: 14px;
  margin-left: 8px;
  border-right: 2.2px solid var(--accent, #007aff);
  border-bottom: 2.2px solid var(--accent, #007aff);
  transform: rotate(40deg) translateY(-2px);
  flex-shrink: 0;
}

.sghgjos-finder-src-item.is-active em + .sghgjos-finder-src-check {
  margin-left: 10px;
}

.sghgjos-mobile-src-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 40px;
  padding: 0 12px 0 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sghgjos-mobile-src-btn:active {
  background: rgba(0, 0, 0, 0.04);
}

html.sghgjos-dark .sghgjos-mobile-src-btn {
  background: rgba(58, 58, 60, 0.96);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  color: #f5f5f7;
}

html.sghgjos-dark .sghgjos-mobile-src-btn:active {
  background: rgba(72, 72, 74, 0.96);
}

.sghgjos-mobile-src-btn .fi {
  width: 20px;
  height: 20px;
  border-radius: 5px;
}

.sghgjos-mobile-src-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sghgjos-mobile-src-chevron {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-right: 2px solid rgba(0, 0, 0, 0.35);
  border-bottom: 2px solid rgba(0, 0, 0, 0.35);
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.7;
}

html.sghgjos-dark .sghgjos-mobile-src-chevron {
  border-color: rgba(255, 255, 255, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .sghgjos-finder-src-backdrop,
  .sghgjos-finder-src-panel {
    transition: none;
  }
}

.sghgjos-finder-row .col-date,
.sghgjos-finder-row .col-kind,
.sghgjos-finder-row .col-cat {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(0, 0, 0, 0.55);
  font-size: 12px;
}

html.sghgjos-dark .sghgjos-finder-row .col-date,
html.sghgjos-dark .sghgjos-finder-row .col-kind,
html.sghgjos-dark .sghgjos-finder-row .col-cat {
  color: rgba(255, 255, 255, 0.55);
}

.sghgjos-finder-row.is-sel .col-date,
.sghgjos-finder-row.is-sel .col-kind,
.sghgjos-finder-row.is-sel .col-cat {
  color: inherit;
  opacity: 0.85;
}

.sghgjos-finder-row .doc-ico,
.sghgjos-finder-card .doc-ico {
  width: 16px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, #e8e8ed);
  border: 1px solid #d0d0d5;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.sghgjos-finder-row .doc-ico.has-cover,
.sghgjos-finder-card .doc-ico.has-cover {
  border-color: rgba(0, 0, 0, 0.1);
  overflow: hidden;
  padding: 0;
}

.sghgjos-finder-row .doc-ico.has-cover img,
.sghgjos-finder-card .doc-ico.has-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

/* 1:1 透明封面（wx-thumbs PNG）：完整显示，不裁切 */
.sghgjos-finder-row .doc-ico.has-cover.is-alpha-cover,
.sghgjos-finder-card .doc-ico.has-cover.is-alpha-cover {
  background:
    linear-gradient(45deg, rgba(0, 0, 0, 0.06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 0, 0, 0.06) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.06) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.06) 75%),
    #f5f5f7;
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
  padding: 3px;
}

html.sghgjos-dark .sghgjos-finder-row .doc-ico.has-cover.is-alpha-cover,
html.sghgjos-dark .sghgjos-finder-card .doc-ico.has-cover.is-alpha-cover {
  background-color: #2c2c2e;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.06) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.06) 75%);
}

.sghgjos-finder-row .doc-ico.has-cover.is-alpha-cover img,
.sghgjos-finder-card .doc-ico.has-cover.is-alpha-cover img {
  object-fit: contain;
}

.sghgjos-finder-row .doc-ico .doc-fold,
.sghgjos-finder-card .doc-ico .doc-fold {
  width: 8px;
  height: 10px;
  border-radius: 1px;
  background: linear-gradient(180deg, #f5f5f7, #d8d8dc);
  box-shadow: inset 0 0 0 1px #c7c7cc;
}

.sghgjos-finder-row .doc-ico.is-page .doc-fold,
.sghgjos-finder-card .doc-ico.is-page .doc-fold {
  background: linear-gradient(180deg, #d6ecff, #7ec8ff);
}

html.sghgjos-dark .sghgjos-finder-row .doc-ico:not(.has-cover),
html.sghgjos-dark .sghgjos-finder-card .doc-ico:not(.has-cover) {
  background: #2c2c2e;
  border-color: #555;
}

/* Icon view */
.sghgjos-finder-sheet.is-grid {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px 14px 24px;
  box-sizing: border-box;
}

.sghgjos-finder-sheet.is-empty {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 48px 16px;
  box-sizing: border-box;
}

.sghgjos-finder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  justify-content: start;
  gap: 8px 4px;
  padding: 0;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

.sghgjos-finder-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  color: var(--text);
  box-sizing: border-box;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

.sghgjos-finder-card:hover {
  background: rgba(0, 122, 255, 0.08);
}

.sghgjos-finder-card.is-sel {
  background: rgba(0, 122, 255, 0.2);
}

.sghgjos-finder-card .doc-ico.lg {
  width: 64px;
  height: 64px;
  max-width: none;
  aspect-ratio: auto;
  border-radius: 10px;
  margin: 0 0 6px;
  flex-shrink: 0;
}

.sghgjos-finder-card .doc-ico.lg .doc-fold {
  width: 22px;
  height: 26px;
  border-radius: 3px;
}

.sghgjos-finder-card-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  width: 100%;
  max-width: 88px;
  font-size: 12px;
  line-height: 1.3;
  word-break: break-word;
}

/* Finder responsive (window body container) */
@container finder (max-width: 760px) {
  .sghgjos-app-finder {
    grid-template-columns: 156px minmax(0, 1fr);
  }

  .sghgjos-finder-sheet.is-list.has-kind:not(.has-date):not(.has-cat) {
    --finder-cols: minmax(140px, 1fr) 56px;
  }

  .sghgjos-finder-sheet.is-list.has-date:not(.has-kind):not(.has-cat) {
    --finder-cols: minmax(140px, 1fr) 100px;
  }

  .sghgjos-finder-sheet.is-list.has-date.has-kind:not(.has-cat) {
    --finder-cols: minmax(140px, 1fr) 100px 56px;
  }

  .sghgjos-finder-sheet.is-list.has-date.has-kind.has-cat {
    --finder-cols: minmax(140px, 1fr) 100px 56px 72px;
  }

  .sghgjos-finder-tb-right .sghgjos-tb-search {
    width: 120px;
  }

  .sghgjos-finder-path {
    max-width: min(200px, 30%);
  }

  .sghgjos-finder-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  }
}

@container finder (max-width: 560px) {
  .sghgjos-app-finder {
    grid-template-columns: 1fr;
  }

  .sghgjos-finder-side {
    display: none;
  }

  .sghgjos-finder-toolbar {
    height: auto;
    min-height: 36px;
    flex-wrap: wrap;
    padding: 6px 10px;
    gap: 6px;
  }

  .sghgjos-finder-toolbar .sghgjos-finder-path {
    display: none;
  }

  .sghgjos-finder-toolbar .sghgjos-finder-tb-left {
    flex: 1 1 100%;
    order: 1;
    width: 100%;
    justify-content: space-between;
  }

  .sghgjos-finder-toolbar .sghgjos-mobile-finder-nav {
    display: flex !important;
    width: 100%;
    flex: 1 0 100%;
    order: 2;
  }

  .sghgjos-finder-toolbar .sghgjos-finder-tb-right {
    flex: 1 0 100%;
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .sghgjos-finder-toolbar .sghgjos-mobile-src-btn {
    height: 34px;
    font-size: 13px;
    border-radius: 8px;
  }

  .sghgjos-finder-toolbar .sghgjos-tb-search {
    width: 100%;
    max-width: none;
  }

  /* Narrow pane: name + optional date only */
  .sghgjos-finder-thead .col-kind,
  .sghgjos-finder-thead .col-cat,
  .sghgjos-finder-row .col-kind,
  .sghgjos-finder-row .col-cat {
    display: none;
  }

  .sghgjos-finder-meta {
    display: block;
  }

  .sghgjos-finder-sheet.is-list {
    --finder-cols: minmax(0, 1fr);
  }

  .sghgjos-finder-sheet.is-list.has-date {
    --finder-cols: minmax(0, 1fr) 88px;
  }

  .sghgjos-finder-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
}

@container finder (min-width: 1100px) {
  .sghgjos-app-finder {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .sghgjos-finder-sheet.is-list.has-kind:not(.has-date):not(.has-cat) {
    --finder-cols: minmax(240px, 1fr) 80px;
  }

  .sghgjos-finder-sheet.is-list.has-date.has-kind:not(.has-cat) {
    --finder-cols: minmax(240px, 1fr) 130px 80px;
  }

  .sghgjos-finder-sheet.is-list.has-date.has-kind.has-cat {
    --finder-cols: minmax(240px, 1fr) 130px 80px 120px;
  }

  .sghgjos-finder-grid {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }
}

/* ===== Browser (Safari-like chrome) ===== */
.sghgjos-blog-app {
  background: #fff;
  flex: 1;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
  position: relative;
}

html.sghgjos-dark .sghgjos-blog-app {
  background: #1e1f1e;
}

.tb-btn {
  color: #555;
  cursor: default;
  background: transparent;
  border: none;
  border-radius: 6px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 28px;
  transition: background-color 0.15s, color 0.15s;
  display: inline-flex;
  padding: 0;
}

.tb-btn:hover:not(:disabled) {
  color: #000;
  background: rgba(0, 0, 0, 0.06);
}

.tb-btn:active:not(:disabled) {
  background: rgba(0, 0, 0, 0.12);
  transform: scale(0.95);
}

.tb-btn:disabled {
  opacity: 0.3;
}

.tb-btn.is-active {
  color: var(--taos-accent, #007aff);
  background: rgba(0, 0, 0, 0.06);
}

html.sghgjos-dark .tb-btn {
  color: #a1a1a6;
}

html.sghgjos-dark .tb-btn:hover:not(:disabled) {
  color: #f5f5f7;
  background: rgba(255, 255, 255, 0.1);
}

html.sghgjos-dark .tb-btn.is-active {
  color: #0a84ff;
  background: rgba(10, 132, 255, 0.18);
}

.tb-bookmarks {
  z-index: 30;
  background: #e8e8ec;
  border-bottom: 1px solid #d8d8dc;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  min-height: 32px;
  padding: 4px 12px;
  display: flex;
  position: relative;
  overflow: visible;
}

.tb-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 8px;
}

html.sghgjos-dark .tb-bookmarks {
  background: #2c2c2e;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.tb-bookmark-list {
  align-items: center;
  gap: 2px;
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.tb-site-group {
  align-items: center;
  display: inline-flex;
  position: relative;
  flex-shrink: 0;
  margin-right: 4px;
}

.tb-site-home {
  color: #fff;
  cursor: default;
  white-space: nowrap;
  background: var(--taos-accent, #007aff);
  border: none;
  border-radius: 5px;
  align-items: center;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
}

.tb-site-home:hover {
  filter: brightness(0.92);
}

.tb-site-home.is-current {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.tb-site-pages {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 6px;
  flex-direction: column;
  min-width: 140px;
  padding: 4px;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.tb-site-group:hover .tb-site-pages,
.tb-site-group:focus-within .tb-site-pages {
  display: flex;
}

html.sghgjos-dark .tb-site-pages {
  background: rgba(44, 44, 46, 0.96);
}

.tb-site-page-link {
  box-sizing: border-box;
  color: #333;
  cursor: default;
  white-space: nowrap;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 4px;
  width: 100%;
  padding: 5px 10px;
  font-size: 12px;
  display: flex;
}

.tb-site-page-link:hover {
  color: var(--taos-accent, #007aff);
  background: rgba(0, 122, 255, 0.1);
}

html.sghgjos-dark .tb-site-page-link { color: var(--text); }

.tb-bm-link {
  color: #333;
  cursor: default;
  white-space: nowrap;
  background: transparent;
  border: none;
  border-radius: 5px;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 12px;
  display: inline-flex;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb-bm-link.tb-bm-pin {
  font-weight: 600;
  color: var(--taos-accent, #007aff);
  flex-shrink: 0;
}

.tb-bm-link:hover {
  background: rgba(0, 0, 0, 0.07);
}

.tb-bm-link.is-current {
  background: rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

html.sghgjos-dark .tb-bm-link { color: var(--text); }

html.sghgjos-dark .tb-bm-link:hover,
html.sghgjos-dark .tb-bm-link.is-current {
  background: rgba(255, 255, 255, 0.1);
}

.tb-bm-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.08);
}

.tb-bm-ico-none {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.18);
}

html.sghgjos-dark .tb-bm-ico-none {
  border-color: rgba(255, 255, 255, 0.28);
}

.tb-bm-ico.has-cover {
  overflow: hidden;
  background: #e8e8ed;
  border: 0;
}

.tb-bm-ico.has-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tb-bm-ico.has-cover.is-alpha-cover {
  background:
    linear-gradient(45deg, rgba(0, 0, 0, 0.06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 0, 0, 0.06) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.06) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.06) 75%),
    #f5f5f7;
  background-size: 6px 6px;
  background-position: 0 0, 0 3px, 3px -3px, -3px 0;
  padding: 1px;
}

.tb-bm-ico.has-cover.is-alpha-cover img {
  object-fit: contain;
}

html.sghgjos-dark .tb-bm-ico.has-cover.is-alpha-cover {
  background-color: #3a3a3c;
}

.tb-bm-panel-overlay {
  z-index: 40;
  background: rgba(0, 0, 0, 0.15);
  position: absolute;
  inset: 0;
}

.tb-bm-panel {
  z-index: 41;
  background: #fff;
  border-right: 1px solid #e0e0e4;
  flex-direction: column;
  width: 240px;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  transform: translateX(-100%);
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.08);
}

.tb-bm-panel.is-open {
  transform: translateX(0);
}

html.sghgjos-dark .tb-bm-panel {
  background: #232322;
  border-right-color: rgba(255, 255, 255, 0.08);
}

.tb-bm-panel-head {
  color: #333;
  background: #f5f5f7;
  border-bottom: 1px solid #e0e0e4;
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
}

html.sghgjos-dark .tb-bm-panel-head {
  color: #f5f5f7;
  background: #2c2c2e;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.tb-bm-panel-close {
  cursor: default;
  color: #666;
  background: transparent;
  border: none;
  border-radius: 6px;
  width: 24px;
  height: 24px;
  font-size: 16px;
  line-height: 1;
}

.tb-bm-panel-body {
  flex: 1;
  padding: 6px 0;
  overflow: auto;
}

.tb-bm-panel-group-title {
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 6px 14px 4px;
  font-size: 11px;
  font-weight: 600;
}

.tb-bm-panel-link {
  cursor: default;
  color: #333;
  text-align: left;
  background: transparent;
  border: none;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 14px;
  font-size: 13px;
  display: flex;
}

.tb-bm-panel-link:hover {
  background: rgba(0, 0, 0, 0.05);
}

html.sghgjos-dark .tb-bm-panel-link { color: var(--text); }

html.sghgjos-dark .tb-bm-panel-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tb-bm-panel-link-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  overflow: hidden;
}

.tb-bm-panel-empty {
  text-align: center;
  color: #aaa;
  padding: 30px 14px;
  font-size: 13px;
}

.tb-frame {
  background: #fff;
  border: none;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  /* --reader-col set by ResizeObserver while the window is resized */
}

html.sghgjos-dark .tb-frame {
  background: #1e1f1e;
}

.sghgjos-reader {
  width: var(--reader-col, 90%);
  max-width: 100%;
  margin: 0 auto;
  padding: 36px clamp(12px, 3.5%, 48px) 24px;
  box-sizing: border-box;
  line-height: 1.8;
  font-size: 16px;
  color: var(--text, #1d1d1f);
  user-select: text;
  -webkit-user-select: text;
}

.sghgjos-reader .fmt,
.sghgjos-memo-body .fmt {
  user-select: text;
  -webkit-user-select: text;
}

.sghgjos-reader h1 {
  font-size: 32px;
  line-height: 1.25;
  margin: 0 0 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sghgjos-reader .meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.sghgjos-reader .meta a {
  color: var(--taos-accent, var(--accent));
  text-decoration: none;
}

.sghgjos-reader .fmt > *:first-child {
  margin-top: 0;
}

.sghgjos-reader .fmt p {
  margin: 0 0 1.1em;
}

.sghgjos-reader .fmt h2,
.sghgjos-reader .fmt h3 {
  margin: 1.4em 0 0.6em;
  line-height: 1.3;
}

.sghgjos-reader .fmt ul,
.sghgjos-reader .fmt ol {
  padding-left: 1.4em;
  margin: 0 0 1.1em;
}

.sghgjos-reader .fmt blockquote {
  margin: 0 0 1.1em;
  padding: 0.2em 0 0.2em 1em;
  border-left: 3px solid var(--taos-accent, #007aff);
  color: #666;
}

html.sghgjos-dark .sghgjos-reader .fmt blockquote {
  color: #aaa;
}

.sghgjos-reader .fmt pre,
.sghgjos-reader .fmt code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.sghgjos-reader .fmt pre {
  background: #f5f5f7;
  padding: 14px 16px;
  border-radius: 10px;
  overflow: auto;
  margin: 0 0 1.1em;
}

html.sghgjos-dark .sghgjos-reader .fmt pre { background: var(--surface); }

.sghgjos-reader .fmt table,
.sghgjos-memo-body .fmt table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.1em;
  font-size: 0.95em;
}

.sghgjos-reader .fmt th,
.sghgjos-reader .fmt td,
.sghgjos-memo-body .fmt th,
.sghgjos-memo-body .fmt td {
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 8px 12px;
  text-align: left;
  word-break: break-word;
  vertical-align: top;
}

.sghgjos-reader .fmt th,
.sghgjos-memo-body .fmt th {
  background: rgba(0, 0, 0, 0.04);
  font-weight: 600;
}

html.sghgjos-dark .sghgjos-reader .fmt th,
html.sghgjos-dark .sghgjos-reader .fmt td,
html.sghgjos-dark .sghgjos-memo-body .fmt th,
html.sghgjos-dark .sghgjos-memo-body .fmt td {
  border-color: rgba(255, 255, 255, 0.14);
}

html.sghgjos-dark .sghgjos-reader .fmt th,
html.sghgjos-dark .sghgjos-memo-body .fmt th {
  background: rgba(255, 255, 255, 0.06);
}

.sghgjos-reader img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 1.2em auto;
}

.sghgjos-reader a {
  color: var(--taos-accent, var(--accent));
}

/* ===== Post actions: visit / download / passcode ===== */
.sghgjos-post-actions {
  margin: 32px auto 12px;
  padding: 24px 12px 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

html.sghgjos-dark .sghgjos-post-actions {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.sghgjos-action-version {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(100%, 420px);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--taos-accent, #007aff);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  word-break: break-word;
}

html.sghgjos-dark .sghgjos-action-version {
  background: rgba(255, 255, 255, 0.06);
}

.sghgjos-action-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 420px;
}

.sghgjos-action-stack--dl {
  width: auto;
  max-width: min(100%, 560px);
}

.sghgjos-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  justify-content: center;
  width: 100%;
}

.sghgjos-action-row--dl {
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  gap: 10px;
}

@media (max-width: 420px) {
  .sghgjos-action-row--dl {
    flex-wrap: wrap;
  }
}

.sghgjos-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 148px;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--taos-accent, #007aff);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: filter 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.sghgjos-action-btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.22);
}

.sghgjos-action-btn:active {
  transform: scale(0.98);
}

.sghgjos-action-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.03);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sghgjos-action-copy--inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: min(220px, 46vw);
  min-height: 40px;
  padding: 0 12px;
  flex: 0 1 auto;
  white-space: nowrap;
}

.sghgjos-action-copy--inline .sghgjos-action-code {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sghgjos-action-copy:hover,
.sghgjos-action-copy:focus-visible {
  background: rgba(0, 122, 255, 0.08);
  border-color: rgba(0, 122, 255, 0.35);
  outline: none;
}

html.sghgjos-dark .sghgjos-action-copy {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

html.sghgjos-dark .sghgjos-action-copy:hover,
html.sghgjos-dark .sghgjos-action-copy:focus-visible {
  background: rgba(10, 132, 255, 0.16);
  border-color: rgba(10, 132, 255, 0.45);
}

.sghgjos-action-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #86868b);
}

.sghgjos-action-code {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--taos-accent, #007aff);
  word-break: break-all;
}

.sghgjos-action-code.is-blur {
  filter: blur(4px);
  user-select: none;
  transition: filter 0.18s ease;
}

.sghgjos-action-copy:hover .sghgjos-action-code.is-blur,
.sghgjos-action-copy:focus-visible .sghgjos-action-code.is-blur,
.sghgjos-action-copy.is-copied .sghgjos-action-code.is-blur {
  filter: none;
}

.sghgjos-action-passcode {
  display: grid;
  grid-template-areas: "passcode";
  align-items: center;
  justify-items: center;
  min-height: 72px;
  box-sizing: border-box;
  overflow: hidden;
  text-align: center;
}

.sghgjos-passcode-hint,
.sghgjos-action-passcode > .sghgjos-passcode-reveal {
  grid-area: passcode;
}

.sghgjos-passcode-hint {
  width: 100%;
  font-size: 13px;
  color: var(--muted, #86868b);
  text-align: center;
  transition: opacity 0.18s ease;
  z-index: 1;
}

.sghgjos-passcode-reveal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 0;
  box-sizing: border-box;
  text-align: center;
}

.sghgjos-action-passcode .sghgjos-action-code {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: center;
}

.sghgjos-action-passcode:hover .sghgjos-passcode-hint,
.sghgjos-action-passcode:focus-visible .sghgjos-passcode-hint,
.sghgjos-action-passcode:active .sghgjos-passcode-hint,
.sghgjos-action-passcode.is-copied .sghgjos-passcode-hint {
  opacity: 0;
}

.sghgjos-action-passcode:hover .sghgjos-passcode-reveal,
.sghgjos-action-passcode:focus-visible .sghgjos-passcode-reveal,
.sghgjos-action-passcode:active .sghgjos-passcode-reveal,
.sghgjos-action-passcode.is-copied .sghgjos-passcode-reveal {
  opacity: 1;
}

.sghgjos-action-copy.is-copied > * {
  visibility: hidden;
}

.sghgjos-action-copy.is-copied::after {
  content: attr(data-copied-label);
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: rgba(248, 249, 251, 0.98);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--taos-accent, #007aff);
  pointer-events: none;
}

.sghgjos-action-copy:not(.sghgjos-action-passcode).is-copied::after,
.sghgjos-action-copy.is-copied:not([data-copied-label])::after {
  content: '已复制';
}

html.sghgjos-dark .sghgjos-action-copy.is-copied::after {
  background: rgba(36, 36, 40, 0.98);
}

.sghgjos-memo-body-scroll .sghgjos-post-actions {
  margin-left: 0;
  margin-right: 0;
}

.sghgjos-blog-comments {
  width: var(--reader-col, 90%);
  max-width: 100%;
  margin: 0 auto;
  padding: 8px clamp(12px, 3.5%, 48px) 56px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}

html.sghgjos-dark .sghgjos-blog-comments {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-blog-comments h3 {
  margin: 20px 0 14px;
  font-size: 18px;
}

/* ===== Memo (Notes) ===== */
.sghgjos-memo {
  display: grid;
  grid-template-columns: 168px 240px 1fr;
  flex: 1;
  min-height: 0;
  height: 100%;
  background: #fffef8;
  overflow: hidden;
}

/* 备忘录：尽量不显示拖动条/滚动条，滚轮与触控仍可滚动 */
.sghgjos-memo-folders,
.sghgjos-memo-list,
.sghgjos-memo-body-scroll,
.sghgjos-memo-body-input {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sghgjos-memo-folders::-webkit-scrollbar,
.sghgjos-memo-list::-webkit-scrollbar,
.sghgjos-memo-body-scroll::-webkit-scrollbar,
.sghgjos-memo-body-input::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.sghgjos-memo-folders {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f5f5f7;
  border-right: 1px solid #e5e5ea;
  padding: 10px 8px;
  overflow-x: hidden;
  overflow-y: auto;
}

html.sghgjos-dark .sghgjos-memo-folders {
  background: #2c2c2e;
  border-right-color: #3a3a3c;
}

.sghgjos-memo-folders-head {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 10px 8px;
}

.sghgjos-memo-folders button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: default;
  text-align: left;
}

.sghgjos-memo-folders button .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sghgjos-memo-folders button em {
  font-style: normal;
  font-size: 11px;
  opacity: 0.55;
}

.sghgjos-memo-folders button.is-active {
  background: #ffd60a;
  color: #1d1d1f;
}

.sghgjos-memo-folders button.is-active em {
  opacity: 0.7;
}

.sghgjos-memo-mid {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid #eee;
  background: #fbfbfd;
}

html.sghgjos-dark .sghgjos-memo-mid {
  background: #1c1c1e;
  border-right-color: #333;
}

.sghgjos-memo-search {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.sghgjos-memo-search input {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
  padding: 6px 10px;
  font-size: 12px;
  outline: none;
  color: var(--text);
}

html.sghgjos-dark .sghgjos-memo-search input {
  background: rgba(255, 255, 255, 0.08);
}

.sghgjos-memo-list {
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.sghgjos-memo-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  cursor: default;
  color: inherit;
  font: inherit;
}

.sghgjos-memo-item:hover {
  background: rgba(255, 214, 10, 0.15);
}

.sghgjos-memo-item.is-active {
  background: #fff6c8;
}

html.sghgjos-dark .sghgjos-memo-item.is-active {
  background: rgba(255, 214, 10, 0.2);
}

.sghgjos-memo-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.sghgjos-memo-item span {
  font-size: 11px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sghgjos-memo-item time {
  font-weight: 600;
  margin-right: 4px;
}

.sghgjos-memo-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: #fffef8;
  overflow: hidden;
}

html.sghgjos-dark .sghgjos-memo-body { background: var(--body-bg); }

.sghgjos-memo-body-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px max(28px, calc((100% - 680px) / 2)) 12px;
  box-sizing: border-box;
}

.sghgjos-memo-body h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sghgjos-memo-body .memo-date {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}

.sghgjos-memo-body .fmt {
  font-size: 15px;
  line-height: 1.75;
}

.sghgjos-memo-body .fmt p {
  margin: 0 0 1em;
}

.sghgjos-memo-body .fmt img {
  max-width: 100%;
  border-radius: 8px;
}

.sghgjos-memo-foot {
  flex-shrink: 0;
  margin: 0;
  padding: 12px max(28px, calc((100% - 680px) / 2)) 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  gap: 16px;
  align-items: center;
  box-sizing: border-box;
}

html.sghgjos-dark .sghgjos-memo-foot {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-memo-cmt,
.sghgjos-memo-open {
  border: 0;
  background: transparent;
  color: var(--taos-accent, var(--accent));
  font-size: 13px;
  cursor: default;
  padding: 0;
}

.sghgjos-memo-open {
  margin-left: auto;
  color: var(--muted);
}

.sghgjos-memo-open:hover {
  color: var(--taos-accent, var(--accent));
}

.sghgjos-memo-new {
  margin: auto 0 0;
  width: 100%;
  flex-shrink: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 214, 10, 0.35);
  color: #1d1d1f;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  cursor: default;
  text-align: left;
}

html.sghgjos-dark .sghgjos-memo-new {
  background: rgba(255, 214, 10, 0.22);
  color: #fff;
}

.sghgjos-memo-title-input {
  display: block;
  flex-shrink: 0;
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  padding: 0;
  color: inherit;
  outline: none;
  box-sizing: border-box;
}

.sghgjos-memo-body-scroll > .memo-date {
  flex-shrink: 0;
}

.sghgjos-memo-body-input {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
  border: 0;
  background: transparent;
  resize: none; /* 去掉右下角拖动条 */
  font: inherit;
  font-size: 15px;
  line-height: 1.75;
  color: inherit;
  outline: none;
  box-sizing: border-box;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.sghgjos-memo-foot button[data-memo-act] {
  border: 0;
  background: transparent;
  color: var(--taos-accent, var(--accent));
  font-size: 13px;
  cursor: default;
  padding: 0;
}

.sghgjos-memo-foot button[data-memo-act="delete"],
.sghgjos-memo-foot button[data-memo-act="purge"] {
  margin-left: auto;
  color: #ff3b30;
}

.sghgjos-window-body:has(.sghgjos-memo-demo-bar) {
  display: flex;
  flex-direction: column;
}

.sghgjos-window-body:has(.sghgjos-memo-demo-bar) > .sghgjos-memo {
  flex: 1;
  min-height: 0;
}

.sghgjos-memo-demo-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 12px;
  color: #6b5b00;
  background: #fff3b0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

html.sghgjos-dark .sghgjos-memo-demo-bar {
  color: #ffe08a;
  background: rgba(255, 214, 10, 0.16);
  border-top-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-memo-demo-bar button {
  margin-left: auto;
  border: 0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  background: #1d1d1f;
  color: #fff;
  cursor: default;
}

html.sghgjos-dark .sghgjos-memo-demo-bar button {
  background: #ffd60a;
  color: #1d1d1f;
}

.sghgjos-album-sentinel {
  break-inside: avoid;
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 12px 0 8px;
  color: #8e8e93;
  font-size: 12px;
  box-sizing: border-box;
}

.sghgjos-album-sentinel.is-loading {
  color: #8e8e93;
}

.sghgjos-album-sentinel.is-end {
  opacity: 0.7;
}

.sghgjos-album-retry {
  border: 0;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  background: var(--taos-accent, var(--accent));
  color: #fff;
  cursor: default;
}

/* ===== Settings app (split layout) ===== */
.sghgjos-settings-app {
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
  background: #efeeed;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", sans-serif;
}

html.sghgjos-dark .sghgjos-settings-app {
  background: #1c1c1e;
  color: #f5f5f7;
}

.sghgjos-settings-sidebar {
  width: 223px;
  flex-shrink: 0;
  padding: 12px 10px 10px;
  box-sizing: border-box;
  background: #e3e2e1;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

html.sghgjos-dark .sghgjos-settings-sidebar {
  background: #2c2c2e;
  border-right-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-settings-nav {
  flex: 1;
  min-height: 0;
}

/* ===== Account / Login panel ===== */
.account-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
  padding: 8px 4px 4px;
  box-sizing: border-box;
}

.account-panel-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.account-avatar-placeholder {
  color: #fff;
  background: #c7c7c9;
  display: flex;
  justify-content: center;
  align-items: center;
}

html.sghgjos-dark .account-avatar-placeholder {
  background: #3a3a3c;
}

.account-panel-title {
  color: #1d1d1f;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.account-panel-name {
  color: #1d1d1f;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.account-panel-hint {
  color: #868686;
  font-size: 12px;
  text-align: center;
  line-height: 1.4;
  max-width: 100%;
  word-break: break-word;
}

html.sghgjos-dark .account-panel-title,
html.sghgjos-dark .account-panel-name { color: var(--text); }

.account-panel-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.account-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.account-profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin-bottom: 2px;
}

.account-input {
  box-sizing: border-box;
  width: 100%;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: #1d1d1f;
  font-size: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.account-input:focus {
  border-color: rgba(0, 113, 227, 0.65);
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.18);
}

html.sghgjos-dark .account-input {
  color: #f5f5f7;
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.12);
}

.account-login-btn,
.account-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  height: auto;
  padding: 7px 14px;
  border: none;
  border-radius: 8px;
  background: #0071e3;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.account-login-btn:hover,
.account-btn-primary:hover {
  background: #0077ed;
}

.account-login-btn:disabled,
.account-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.account-btn-primary {
  background: #0071e3;
  color: #fff;
  border: 1px solid transparent;
}

.account-oauth-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-btn-qq {
  background: #12b7f5;
  color: #fff;
  border: 1px solid transparent;
  gap: 8px;
  font-weight: 600;
}

.account-btn-qq:hover {
  background: #0aa6e0;
}

.account-qq-ico {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: #fff;
  position: relative;
  flex: 0 0 auto;
}

.account-qq-ico::before {
  content: 'Q';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #12b7f5;
  font-size: 11px;
  font-weight: 800;
  font-family: Arial, sans-serif;
  line-height: 16px;
  text-align: center;
}

.account-or-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 4px;
  color: var(--muted, #86868b);
  font-size: 11px;
}

.account-or-divider::before,
.account-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}

html.sghgjos-dark .account-or-divider::before,
html.sghgjos-dark .account-or-divider::after {
  background: rgba(255, 255, 255, 0.14);
}

.account-or-divider span {
  flex: 0 0 auto;
}

.account-qq-bound {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: #12b7f5;
  padding: 6px 0 2px;
}

.account-qq-card {
  margin-top: 0;
}

.account-qq-card .account-btn-qq {
  width: 100%;
}

.account-bind-qq {
  margin-top: 4px;
}

.account-btn-secondary {
  background: rgba(255, 255, 255, 0.92);
  color: #1d1d1f;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-weight: 500;
}

.account-btn-secondary:hover {
  background: rgba(0, 0, 0, 0.04);
}

html.sghgjos-dark .account-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.16);
}

html.sghgjos-dark .account-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.account-btn-ghost {
  background: rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
  border: 1px solid transparent;
  font-weight: 500;
}

.account-btn-ghost:hover {
  background: rgba(0, 0, 0, 0.1);
}

html.sghgjos-dark .account-btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
}

html.sghgjos-dark .account-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.account-login-error {
  width: 100%;
  color: #e0342b;
  padding-left: 2px;
  font-size: 11px;
  box-sizing: border-box;
}

.account-login-notice {
  width: 100%;
  color: #059669;
  padding-left: 2px;
  font-size: 11px;
  box-sizing: border-box;
}

.account-links-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 2px;
}

.account-link-btn {
  color: var(--taos-accent, #0a84ff);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  text-decoration: none;
}

.account-link-btn:hover {
  text-decoration: underline;
}

.account-panel-logged {
  max-width: 380px;
}

.sghgjos-set-pane.settings-section:has(.account-panel) {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100%;
  padding-top: 28px;
  padding-bottom: 28px;
  box-sizing: border-box;
}

.account-avatar-edit {
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  padding: 0;
  line-height: 0;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
}

.account-avatar-edit .account-panel-avatar {
  width: 100%;
  height: 100%;
  display: block;
}

.account-avatar-edit-mask {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  font-size: 12px;
  opacity: 1;
  transition: background 0.15s;
}

.account-avatar-edit:hover .account-avatar-edit-mask,
.account-avatar-edit:focus-visible .account-avatar-edit-mask {
  background: rgba(0, 0, 0, 0.58);
}

.account-verified-badge {
  vertical-align: 1px;
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  font-size: 10px;
  font-weight: 600;
  line-height: 15px;
}

.account-role-badge {
  vertical-align: 1px;
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: #666;
  font-size: 10px;
  font-weight: 600;
  line-height: 15px;
}

html.sghgjos-dark .account-role-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #aeaeb2;
}

html.sghgjos-dark .account-verified-badge {
  background: rgba(48, 209, 88, 0.15);
  color: #30d158;
}

.account-admin-card {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
  padding: 14px 14px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

html.sghgjos-dark .account-admin-card {
  background: rgba(44, 44, 46, 0.92);
  box-shadow: none;
}

.account-admin-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.account-admin-desc {
  font-size: 12px;
  color: #868686;
  line-height: 1.45;
}

.account-admin-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
}

.account-admin-btns .account-btn {
  width: 100%;
  min-width: 0;
}

.account-admin-btns .account-btn:only-child {
  grid-column: 1 / -1;
}

.account-logout-btn {
  margin-top: 4px;
  min-height: 36px;
}

.account-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: left;
  font-size: 11px;
  color: #666;
}

html.sghgjos-dark .account-field { color: var(--muted); }

.account-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.account-field-divider {
  width: 100%;
  margin: 4px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 11px;
  font-weight: 600;
  color: #868686;
  text-align: left;
}

html.sghgjos-dark .account-field-divider {
  border-top-color: rgba(255, 255, 255, 0.08);
}

/* ===== 账户编辑整页（头像 / 个人资料） ===== */
.sghgjos-set-pane.account-pane-sheet {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: 100%;
  margin: 0;
  padding: 16px 20px 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sghgjos-settings-content:has(.account-pane-sheet) .sghgjos-settings-scroll {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sghgjos-settings-content:has(.account-pane-sheet) .sghgjos-settings-scroll > .account-pane-sheet {
  flex: 1;
  min-height: 0;
}

.account-sheet {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

html.sghgjos-dark .account-sheet {
  background: rgba(44, 44, 46, 0.94);
}

.account-sheet-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 14px;
}

html.sghgjos-dark .account-sheet-head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.account-sheet-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px 22px 20px;
  overflow: hidden;
}

.account-sheet-preview {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.account-sheet-preview .account-panel-avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.account-avatar-presets {
  width: min(100%, 320px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  flex-shrink: 0;
}

.account-avatar-preset {
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 50%;
  background: center / cover no-repeat #ddd;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}

.account-avatar-preset:hover {
  border-color: rgba(0, 113, 227, 0.4);
  transform: scale(1.04);
}

.account-avatar-preset.is-active {
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
}

.account-sheet-tools {
  width: min(100%, 320px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.account-url-field {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.account-url-field .account-input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

.account-chip-btn {
  box-sizing: border-box;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 30px;
  padding: 0 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #1d1d1f;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.account-chip-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

html.sghgjos-dark .account-chip-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f5f5f7;
}

html.sghgjos-dark .account-chip-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.account-chip-btn-file {
  flex: 1 1 auto;
  width: auto;
}

.account-tool-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.account-tool-row .account-link-btn {
  flex-shrink: 0;
  margin-left: auto;
}

.account-sheet-form {
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  gap: 0;
  padding: 8px 8px 4px;
}

.account-form-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.account-sheet-submit {
  margin-top: 16px;
  width: 100%;
}

.account-sheet .account-login-error,
.account-sheet .account-login-notice {
  text-align: left;
}

.sghgjos-settings-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sghgjos-settings-nav .nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0;
  margin: 1px 0;
  padding: 5px 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(0, 0, 0, 0.7);
  cursor: default;
  text-align: left;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}

html.sghgjos-dark .sghgjos-settings-nav .nav-item {
  color: rgba(255, 255, 255, 0.75);
}

.sghgjos-settings-nav .nav-item:hover {
  background: rgba(0, 0, 0, 0.06);
}

html.sghgjos-dark .sghgjos-settings-nav .nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sghgjos-settings-nav .nav-item.active {
  background: var(--taos-accent, #2c86f4);
  color: #fff;
}

.sghgjos-nav-search {
  position: relative;
  margin: 0;
  flex-shrink: 0;
}

.sghgjos-nav-search-input {
  box-sizing: border-box;
  width: 100%;
  padding: 5px 10px 5px 26px;
  border: 1px solid rgba(163, 163, 163, 0.08);
  border-radius: 6px;
  background: #d0d1d1;
  color: #333;
  font-size: 12px;
  outline: none;
}

.sghgjos-nav-search::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  opacity: 0.45;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

.sghgjos-nav-search-input:focus {
  border-color: rgba(44, 134, 244, 0.6);
  box-shadow: 0 0 2px #2c86f5;
}

html.sghgjos-dark .sghgjos-nav-search-input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #eee;
}

.sghgjos-nav-empty {
  padding: 8px;
  font-size: 12px;
  color: #888;
  list-style: none;
}

.sghgjos-settings-nav .nav-icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sghgjos-settings-nav .nav-icon .sghgjos-icon-face {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.sghgjos-settings-nav .nav-text {
  font-size: 13px;
}

.sghgjos-settings-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #efeeed;
  box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

html.sghgjos-dark .sghgjos-settings-content {
  background: #1c1c1e;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.06);
}

.sghgjos-settings-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

/* 偏好设置：全局不显示拖动条，滚轮与触控仍可滚动 */
.sghgjos-settings-app,
.sghgjos-settings-app * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sghgjos-settings-app::-webkit-scrollbar,
.sghgjos-settings-app *::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

.sghgjos-set-pane {
  padding: 22px 28px 36px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.sghgjos-set-pane h2 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
}

.sghgjos-set-card {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.06);
}

html.sghgjos-dark .sghgjos-set-card {
  background: rgba(44, 44, 46, 0.92);
}

.sghgjos-set-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin-bottom: 10px;
}

html.sghgjos-dark .sghgjos-set-section-title { color: var(--muted); }

.sghgjos-set-caption {
  font-size: 12px;
  color: #666;
  text-align: center;
  margin: 8px 0 0;
}

html.sghgjos-dark .sghgjos-set-caption { color: var(--muted); }

.sghgjos-set-caption.is-lead {
  text-align: left;
  margin: 0 0 14px;
  line-height: 1.45;
}

.sghgjos-desk-set-app {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.sghgjos-desk-set-ico {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.sghgjos-desk-set-ico .sghgjos-icon-face,
.sghgjos-desk-set-ico .sghgjos-desk-ico-img {
  width: 32px;
  height: 32px;
}

.sghgjos-desk-set-ico .sghgjos-desk-ico-img {
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.sghgjos-desk-custom-row {
  gap: 12px;
}

.sghgjos-desk-custom-del {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #ff3b30;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.sghgjos-desk-custom-del:hover {
  background: rgba(255, 59, 48, 0.1);
}

.sghgjos-desk-custom-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

html.sghgjos-dark .sghgjos-desk-custom-form {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-desk-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #666;
}

html.sghgjos-dark .sghgjos-desk-field {
  color: var(--muted);
}

.sghgjos-desk-icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sghgjos-desk-icon-pick {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  cursor: pointer;
  display: grid;
  place-items: center;
}

html.sghgjos-dark .sghgjos-desk-icon-pick {
  background: rgba(255, 255, 255, 0.06);
}

.sghgjos-desk-icon-pick .sghgjos-icon-face {
  width: 28px;
  height: 28px;
}

.sghgjos-desk-icon-pick.is-active {
  border-color: var(--accent, #0a84ff);
  background: rgba(10, 132, 255, 0.12);
}

.sghgjos-desk-custom-form .account-btn-primary {
  align-self: flex-start;
}

.current-wallpaper-section {
  margin-bottom: 8px;
}

.sghgjos-wp-current,
.current-wallpaper {
  width: 100%;
  max-width: 360px;
  margin: 12px auto;
  aspect-ratio: 16 / 10;
  height: auto;
  border-radius: 8px;
  border: 1px solid #fff;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

html.sghgjos-dark .sghgjos-wp-current,
html.sghgjos-dark .current-wallpaper {
  border-color: rgba(255, 255, 255, 0.12);
}

.sghgjos-wp-current-name,
.wallpaper-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px;
  font-size: 11px;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
}

.wp-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.wp-category-title {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 13px;
}

.wp-cat-name {
  font-weight: 600;
}

.wp-cat-count {
  font-size: 12px;
  color: #888;
}

.wp-cat-toggle {
  border: 0;
  background: transparent;
  color: var(--taos-accent, #0a84ff);
  font-size: 12px;
  cursor: default;
  padding: 0;
  white-space: nowrap;
}

.sghgjos-wp-row,
.wp-scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 105px;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.sghgjos-wp-row::-webkit-scrollbar,
.wp-scroll-row::-webkit-scrollbar {
  display: none;
}

.wp-expanded-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 10px;
}

.sghgjos-wp-item,
.wallpaper-item {
  position: relative;
  width: 100%;
  height: 70px;
  border: 2px solid transparent;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  cursor: default;
  scroll-snap-align: start;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.18s, filter 0.18s;
}

.sghgjos-wp-item span,
.wallpaper-item span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3px 4px;
  font-size: 10px;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sghgjos-wp-item:hover,
.wallpaper-item:hover {
  filter: brightness(1.05);
}

.sghgjos-wp-item.is-active,
.sghgjos-wp-item.selected,
.wallpaper-item.is-active,
.wallpaper-item.selected {
  border-color: var(--taos-accent, #0a84ff);
  box-shadow: 0 0 0 1px var(--taos-accent-soft, rgba(10, 132, 255, 0.35));
}

.sghgjos-set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 2px;
  font-size: 13px;
}

.sghgjos-set-list .sghgjos-set-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 11px 4px;
}

.sghgjos-set-list .sghgjos-set-row:last-child {
  border-bottom: 0;
}

html.sghgjos-dark .sghgjos-set-list .sghgjos-set-row {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-set-row-title {
  font-size: 13px;
  font-weight: 500;
}

.sghgjos-set-row-desc {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

html.sghgjos-dark .sghgjos-set-row-desc { color: var(--muted); }

.sghgjos-set-value {
  color: #666;
  font-size: 13px;
  text-align: right;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.sghgjos-dark .sghgjos-set-value { color: var(--muted); }

.sghgjos-shortcut-row {
  align-items: center;
  gap: 12px;
}

.sghgjos-shortcut-row .sghgjos-set-row-title {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

.sghgjos-kbd-combo,
.sghgjos-kbd-or {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.sghgjos-kbd-plus {
  font-size: 11px;
  opacity: 0.45;
  margin: 0 1px;
}

.sghgjos-kbd-sep {
  font-size: 11px;
  color: #888;
  margin: 0 4px;
}

html.sghgjos-dark .sghgjos-kbd-sep { color: var(--muted); }

.sghgjos-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1;
  color: #1d1d1f;
  background: linear-gradient(180deg, #fafafa 0%, #e8e8ed 100%);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 1px 1px rgba(0, 0, 0, 0.06);
}

html.sghgjos-dark .sghgjos-kbd {
  color: #f5f5f7;
  background: linear-gradient(180deg, #3a3a3c 0%, #2c2c2e 100%);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 1px 1px rgba(0, 0, 0, 0.35);
}

.sghgjos-switch {
  width: 42px;
  height: 24px;
  border: 0;
  border-radius: 99px;
  background: #ccc;
  position: relative;
  cursor: default;
  flex-shrink: 0;
  transition: background 0.2s;
  padding: 0;
}

.sghgjos-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}

.sghgjos-switch.is-on {
  background: #34c759;
}

.sghgjos-set-btn {
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
  cursor: default;
}

.sghgjos-set-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

.sghgjos-set-btn.is-primary {
  background: var(--accent);
  color: #fff;
}

.sghgjos-set-btn.is-primary:hover {
  filter: brightness(1.05);
}

html.sghgjos-dark .sghgjos-set-btn {
  background: rgba(255, 255, 255, 0.1);
}

html.sghgjos-dark .sghgjos-set-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.sghgjos-dock-caption {
  text-align: left;
  margin: 0 0 12px;
}

.sghgjos-dock-edit-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.sghgjos-dock-edit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.03);
}

html.sghgjos-dark .sghgjos-dock-edit-row {
  background: rgba(255, 255, 255, 0.05);
}

.sghgjos-dock-edit-row.is-editing {
  outline: 2px solid rgba(10, 132, 255, 0.35);
}

.sghgjos-dock-edit-preview {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.sghgjos-dock-edit-preview .sghgjos-icon-face,
.sghgjos-dock-edit-preview .sghgjos-dock-ico-img,
.sghgjos-dock-edit-preview .sghgjos-dock-sep-preview {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sghgjos-dock-edit-preview.is-sep,
.sghgjos-dock-sep-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.sghgjos-dock-sep-preview::after {
  content: "";
  width: 2px;
  height: 22px;
  border-radius: 1px;
  background: rgba(0, 0, 0, 0.28);
}

html.sghgjos-dark .sghgjos-dock-sep-preview::after {
  background: rgba(255, 255, 255, 0.35);
}

.sghgjos-dock-edit-row.is-sep .sghgjos-dock-edit-title {
  font-weight: 500;
  color: var(--muted);
}

.sghgjos-dock-edit-meta {
  min-width: 0;
  flex: 1;
}

.sghgjos-dock-edit-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sghgjos-dock-edit-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sghgjos-dock-edit-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.sghgjos-dock-edit-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
  font-size: 13px;
  line-height: 1;
  cursor: default;
}

.sghgjos-dock-edit-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.12);
}

.sghgjos-dock-edit-btn:disabled {
  opacity: 0.35;
}

.sghgjos-dock-edit-btn.is-danger:hover:not(:disabled) {
  background: rgba(255, 59, 48, 0.18);
  color: #ff3b30;
}

html.sghgjos-dark .sghgjos-dock-edit-btn {
  background: rgba(255, 255, 255, 0.08);
}

.sghgjos-dock-edit-empty {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.sghgjos-dock-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sghgjos-dock-add-select {
  flex: 1;
  min-width: 140px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  font-size: 13px;
  padding: 0 10px;
}

html.sghgjos-dark .sghgjos-dock-add-select {
  background: rgba(28, 28, 30, 0.9);
  border-color: rgba(255, 255, 255, 0.14);
}

.sghgjos-dock-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sghgjos-dock-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.sghgjos-dock-field input[type='text'],
.sghgjos-dock-field input[type='url'],
.sghgjos-dock-field input[type='number'],
.sghgjos-dock-field select {
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 13px;
  padding: 0 10px;
}

html.sghgjos-dark .sghgjos-dock-field input[type='text'],
html.sghgjos-dark .sghgjos-dock-field input[type='url'],
html.sghgjos-dark .sghgjos-dock-field input[type='number'],
html.sghgjos-dark .sghgjos-dock-field select {
  background: rgba(28, 28, 30, 0.95);
  border-color: rgba(255, 255, 255, 0.14);
}

.sghgjos-dock-field-check {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sghgjos-dock-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sghgjos-dock-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.sghgjos-switch.is-on::after {
  transform: translateX(18px);
}

.sghgjos-appear-selector,
.appearance-selector {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 1px solid #cdd7db;
  border-radius: 8px;
  background: #fff;
}

html.sghgjos-dark .sghgjos-appear-selector,
html.sghgjos-dark .appearance-selector {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.sghgjos-appear-opt,
.appearance-option {
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: default;
  padding: 0;
  font: inherit;
  color: inherit;
  font-size: 12px;
}

.sghgjos-appear-icon,
.appearance-icon {
  width: 72px;
  height: 48px;
  border-radius: 8px;
  border: 2px solid transparent;
  background-size: cover;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.appearance-icon-light {
  background: linear-gradient(135deg, #f0f0f3 0%, #fff 50%, #e8e8ed 100%);
}

.appearance-icon-dark {
  background: linear-gradient(135deg, #2c2c2e 0%, #1c1c1e 50%, #0a0a0c 100%);
}

.appearance-icon-auto {
  background: linear-gradient(90deg, #f0f0f3 0% 50%, #1c1c1e 50% 100%);
}

.sghgjos-appear-opt.active .sghgjos-appear-icon,
.appearance-option.active .appearance-icon {
  border-color: var(--taos-accent, #0a84ff);
  box-shadow: 0 0 0 1px var(--taos-accent-soft, rgba(10, 132, 255, 0.3));
}

.accent-color-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.accent-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--swatch, #007aff);
  padding: 0;
  cursor: default;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.accent-swatch.is-active {
  border-color: var(--swatch, #007aff);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--swatch, #007aff);
}

html.sghgjos-dark .accent-swatch.is-active {
  box-shadow: 0 0 0 2px #1c1c1e, 0 0 0 4px var(--swatch, #007aff);
}

.sghgjos-settings-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E") right 8px center / 10px no-repeat;
  padding: 4px 28px 4px 10px;
  font-size: 13px;
  color: #333;
}

html.sghgjos-dark .sghgjos-settings-select {
  background-color: #3a3a3c;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f5f5f7;
}

.sghgjos-menubar.has-solid-bg {
  background: rgba(246, 246, 246, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

html.sghgjos-dark .sghgjos-menubar.has-solid-bg,
.sghgjos-menubar.is-dark.has-solid-bg {
  background: rgba(30, 30, 32, 0.78);
}

.sghgjos-settings-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #d1d1d1;
  outline: none;
  margin: 8px 0 0;
}

.sghgjos-settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  cursor: default;
}

html.sghgjos-dark .sghgjos-settings-slider {
  background: #555;
}

.sghgjos-settings-primary-btn {
  border: 0;
  border-radius: 6px;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 13px;
  color: #333;
  cursor: default;
}

html.sghgjos-dark .sghgjos-settings-primary-btn {
  background: #3a3a3c;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f5f5f7;
}

.sghgjos-settings-primary-btn:hover:not(:disabled) {
  background: #f5f5f7;
}

html.sghgjos-dark .sghgjos-settings-primary-btn:hover:not(:disabled) {
  background: #48484a;
}

.sghgjos-settings-primary-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.sghgjos-set-about {
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
}

.sghgjos-set-about-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.sghgjos-set-about-logo .sghgjos-icon-face::before {
  border-radius: 16px;
}

/* legacy helpers still referenced elsewhere */
.sghgjos-settings-hint,
.sghgjos-settings-body {
  font-size: 14px;
  line-height: 1.75;
  color: #3a3a3c;
  margin: 0 0 14px;
}

.sghgjos-btn-primary {
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  cursor: default;
}

/* Keep in sync with desktop.js MQ_MOBILE */
@media (max-width: 720px), (pointer: coarse) and (hover: none) {
  .sghgjos-settings-app {
    flex-direction: column;
  }
  .sghgjos-settings-sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    overflow-anchor: none;
    gap: 0;
  }
  .sghgjos-nav-search {
    display: none;
  }
  .sghgjos-settings-nav {
    width: max-content;
    min-width: 100%;
  }
  .sghgjos-settings-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    width: max-content;
  }
  .sghgjos-settings-nav .nav-item {
    white-space: nowrap;
    flex: 0 0 auto;
  }
  .sghgjos-settings-nav .nav-text {
    font-size: 12px;
  }
  .sghgjos-set-pane.settings-section:has(.account-panel) {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .account-panel,
  .account-panel-logged {
    max-width: 100%;
  }
  .account-admin-btns {
    grid-template-columns: 1fr;
  }
}

/* ===== About / Calc / Term / Cal ===== */
.sghgjos-about {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-height: 0;
  height: 100%;
  padding: 36px max(28px, calc((100% - 420px) / 2));
  text-align: center;
  background: linear-gradient(180deg, #f8f8fa, #fff);
  box-sizing: border-box;
}

html.sghgjos-dark .sghgjos-about {
  background: linear-gradient(180deg, #2c2c2e, #1c1c1e);
}

.sghgjos-about .avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #5ac8fa, #007aff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 40px;
  font-weight: 700;
}

.sghgjos-about h1 {
  margin: 12px 0 0;
  font-size: 22px;
  font-weight: 700;
}

.sghgjos-about p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.sghgjos-about-sign {
  font-size: 14px !important;
  color: var(--text) !important;
  max-width: 280px;
}

.sghgjos-about-site {
  margin-top: 10px !important;
  font-weight: 600;
  color: var(--text) !important;
}

.sghgjos-about-stats {
  display: flex;
  gap: 14px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.sghgjos-about-ver {
  margin-top: 20px !important;
  font-size: 11px !important;
}

.sghgjos-calc {
  --calc-gap: 8px;
  --calc-pad: 10px;
  --calc-digit: #333336;
  --calc-fn: #a5a5a5;
  --calc-op: #ff9f0a;
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #1c1c1e;
  color: #fff;
  padding: 0 var(--calc-pad) var(--calc-pad);
  outline: none;
  user-select: none;
  -webkit-user-select: none;
}

.sghgjos-calc-display {
  flex: 1 1 auto;
  min-height: 64px;
  max-height: 28%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  font-size: clamp(32px, 18cqw, 56px);
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  padding: 4px 6px 12px;
  line-height: 1;
  word-break: break-all;
  overflow: hidden;
  text-align: right;
  transition: font-size 0.12s ease;
}

.sghgjos-calc-display.is-long {
  font-size: clamp(24px, 13cqw, 36px);
  letter-spacing: -0.02em;
}

.sghgjos-calc-keys {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--calc-gap);
  width: 100%;
}

.sghgjos-calc-keys button {
  aspect-ratio: 1;
  width: 100%;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 50%;
  padding: 0;
  font-size: clamp(17px, 7.2cqw, 28px);
  font-weight: 400;
  line-height: 1;
  background: var(--calc-digit);
  color: #fff;
  cursor: default;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    filter 0.08s ease,
    background 0.14s ease,
    color 0.14s ease,
    transform 0.08s ease;
  -webkit-tap-highlight-color: transparent;
}

.sghgjos-calc-keys button:hover {
  filter: brightness(1.16);
}

.sghgjos-calc-keys button:active,
.sghgjos-calc-keys button.is-pressed {
  filter: brightness(1.32);
  transform: scale(0.96);
}

.sghgjos-calc-keys button.op {
  background: var(--calc-op);
  color: #fff;
  font-size: clamp(22px, 8.5cqw, 32px);
  font-weight: 500;
}

.sghgjos-calc-keys button.op.is-active {
  background: #fff;
  color: var(--calc-op);
  filter: none;
}

.sghgjos-calc-keys button.op.is-active:hover,
.sghgjos-calc-keys button.op.is-active:active,
.sghgjos-calc-keys button.op.is-active.is-pressed {
  filter: brightness(0.94);
}

.sghgjos-calc-keys button.fn {
  background: var(--calc-fn);
  color: #000;
  font-size: clamp(15px, 5.8cqw, 20px);
  font-weight: 500;
}

.sghgjos-calc-keys button.zero {
  grid-column: span 2;
  aspect-ratio: auto;
  height: 100%;
  border-radius: 999px;
  justify-content: flex-start;
  padding-left: 22%;
}

@container calc-win (max-height: 380px) {
  .sghgjos-calc-display {
    min-height: 44px;
    max-height: 20%;
    padding-bottom: 6px;
  }

  .sghgjos-calc-keys {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-rows: repeat(5, minmax(0, 1fr));
  }

  .sghgjos-calc-keys button {
    aspect-ratio: auto;
    width: 100%;
    height: 100%;
  }
}

@media (max-width: 720px), (pointer: coarse) and (hover: none) {
  .sghgjos-calc {
    --calc-gap: 10px;
    --calc-pad: 14px;
    padding:
      0
      max(var(--calc-pad), env(safe-area-inset-right, 0px))
      max(var(--calc-pad), env(safe-area-inset-bottom, 0px))
      max(var(--calc-pad), env(safe-area-inset-left, 0px));
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }

  .sghgjos-calc-display {
    flex: 0 1 auto;
    min-height: 72px;
    max-height: 28%;
    padding: 8px 8px 16px;
    font-size: clamp(40px, 14vw, 64px);
  }

  .sghgjos-calc-display.is-long {
    font-size: clamp(28px, 10vw, 42px);
  }

  .sghgjos-calc-keys {
    flex: 0 1 auto;
    min-height: 0;
    margin-top: auto;
    width: 100%;
    aspect-ratio: 4 / 5.15;
    max-height: calc(100% - 72px);
    grid-template-rows: repeat(5, minmax(0, 1fr));
  }

  .sghgjos-calc-keys button {
    aspect-ratio: auto;
    width: 100%;
    height: 100%;
    font-size: clamp(20px, 6.5vw, 30px);
  }

  .sghgjos-calc-keys button.op {
    font-size: clamp(26px, 7.5vw, 34px);
  }

  .sghgjos-calc-keys button.fn {
    font-size: clamp(16px, 5vw, 22px);
  }

  .sghgjos-calc-keys button.zero {
    height: 100%;
  }

  .sghgjos-calc-keys button:hover {
    filter: none;
  }

  .sghgjos-calc-keys button:active,
  .sghgjos-calc-keys button.is-pressed {
    filter: brightness(1.28);
  }
}

.sghgjos-term {
  flex: 1;
  min-height: 0;
  height: 100%;
  background: #0c0c0c;
  color: #33ff66;
  font-family: var(--mono);
  font-size: 13px;
  padding: 12px 14px;
  overflow: auto;
  line-height: 1.5;
}

.sghgjos-term .prompt {
  color: #7fdfff;
}

.sghgjos-term-input {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.sghgjos-term-input input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #33ff66;
  outline: none;
  font: inherit;
}

.sghgjos-calendar {
  flex: 1;
  min-height: 0;
  padding: clamp(10px, 2.2cqmin, 20px) clamp(12px, 2.5cqmin, 24px);
  height: 100%;
  width: 100%;
  max-width: none;
  margin: 0;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(140px, 26%, 220px);
  gap: clamp(6px, 1.5cqmin, 14px);
  box-sizing: border-box;
  container-type: size;
  container-name: calendar;
}

html.sghgjos-dark .sghgjos-calendar { background: var(--body-bg); }

.sghgjos-cal-main {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.sghgjos-cal-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: clamp(6px, 1.5cqh, 12px);
  flex-shrink: 0;
}

.sghgjos-cal-head h2 {
  margin: 0;
  font-size: clamp(15px, 3.2cqmin, 22px);
  font-weight: 700;
  flex: 1;
  text-align: center;
}

.sghgjos-cal-nav {
  width: clamp(26px, 5cqmin, 34px);
  height: clamp(26px, 5cqmin, 34px);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: clamp(18px, 3.8cqmin, 24px);
  line-height: 1;
  cursor: default;
}

.sghgjos-cal-nav:hover,
.sghgjos-cal-today-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

html.sghgjos-dark .sghgjos-cal-nav:hover,
html.sghgjos-dark .sghgjos-cal-today-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sghgjos-cal-today-btn {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #ff3b30;
  font-size: clamp(11px, 2.2cqmin, 14px);
  font-weight: 600;
  padding: 4px 8px;
  cursor: default;
}

.sghgjos-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: auto;
  grid-auto-rows: minmax(0, 1fr);
  gap: clamp(2px, 0.6cqmin, 6px);
  flex: 1;
  min-height: 0;
  text-align: center;
  font-size: clamp(14px, 3.2cqmin, 20px);
}

.sghgjos-cal-grid .head {
  color: var(--muted);
  font-weight: 600;
  padding: clamp(2px, 0.8cqh, 8px) 0;
  font-size: clamp(10px, 2cqmin, 13px);
}

.sghgjos-cal-grid .pad {
  min-height: 0;
}

.sghgjos-cal-grid .day {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  display: grid;
  place-items: center;
  position: relative;
  cursor: default;
  font: inherit;
  /* 铺满格子；圆用 radial-gradient(circle closest-side) 保证恒为正圆 */
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  place-self: stretch;
  box-sizing: border-box;
  container-type: size;
}

.sghgjos-cal-grid .day:hover {
  background: radial-gradient(
    circle closest-side at center,
    rgba(0, 0, 0, 0.05) 0 86%,
    transparent 87%
  );
}

html.sghgjos-dark .sghgjos-cal-grid .day:hover {
  background: radial-gradient(
    circle closest-side at center,
    rgba(255, 255, 255, 0.08) 0 86%,
    transparent 87%
  );
}

.sghgjos-cal-grid .day.is-sel:not(.today) {
  color: #ff3b30;
  font-weight: 600;
  background: radial-gradient(
    circle closest-side at center,
    rgba(255, 59, 48, 0.12) 0 86%,
    transparent 87%
  );
}

.sghgjos-cal-grid .day.today {
  color: #fff;
  font-weight: 700;
  background: radial-gradient(
    circle closest-side at center,
    #ff3b30 0 86%,
    transparent 87%
  );
}

.sghgjos-cal-side {
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  padding: 4px 0 0 clamp(10px, 2cqmin, 16px);
  font-size: clamp(11px, 2.2cqmin, 13px);
  color: var(--muted);
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

html.sghgjos-dark .sghgjos-cal-side {
  border-left-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-cal-mobile-bar,
.sghgjos-cal-peek,
.sghgjos-cal-side-date {
  display: none;
}

.sghgjos-cal-side-head {
  min-width: 0;
}

.sghgjos-cal-side .big {
  font-size: clamp(36px, 12cqh, 72px);
  font-weight: 200;
  color: #ff3b30;
  line-height: 1;
}

.sghgjos-cal-weekday {
  margin-top: 2px;
  font-size: clamp(12px, 2.4cqmin, 15px);
  color: var(--text);
}

.sghgjos-cal-side-meta {
  margin-top: 14px;
  font-size: 12px;
}

.sghgjos-cal-login-btn {
  margin-top: 10px;
  border: 0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: #fff;
  background: #ff3b30;
  cursor: pointer;
}

.sghgjos-cal-login-btn:hover {
  filter: brightness(1.05);
}

.sghgjos-cal-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.sghgjos-cal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.sghgjos-cal-field > span {
  font-size: 11px;
  color: var(--muted);
}

.sghgjos-cal-field > span em {
  color: #ff3b30;
  font-style: normal;
}

.sghgjos-cal-field input,
.sghgjos-cal-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.75);
  resize: vertical;
  font-family: inherit;
}

html.sghgjos-dark .sghgjos-cal-field input,
html.sghgjos-dark .sghgjos-cal-field textarea {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.sghgjos-cal-field input:focus,
.sghgjos-cal-field textarea:focus {
  outline: none;
  border-color: rgba(255, 59, 48, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.15);
}

.sghgjos-cal-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.sghgjos-cal-save-btn,
.sghgjos-cal-del-btn {
  border: 0;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}

.sghgjos-cal-save-btn {
  color: #fff;
  background: #ff3b30;
}

.sghgjos-cal-save-btn:disabled,
.sghgjos-cal-del-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.sghgjos-cal-del-btn {
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.1);
}

.sghgjos-cal-save-btn:hover:not(:disabled),
.sghgjos-cal-del-btn:hover:not(:disabled) {
  filter: brightness(1.05);
}

/* ===== Album ===== */
.sghgjos-album {
  z-index: 1;
  color: #333;
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, 'PingFang SC', sans-serif;
}

html.sghgjos-dark .sghgjos-album {
  color: #f5f5f7;
  color-scheme: dark;
}

.sghgjos-album-main {
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
}

.sghgjos-album-sidebar {
  cursor: default;
  user-select: none;
  background-color: rgba(244, 244, 244, 0.8);
  border-right: 1px solid rgba(224, 224, 224, 0.94);
  flex-direction: column;
  flex-shrink: 0;
  width: 220px;
  display: flex;
  overflow: hidden;
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}

html.sghgjos-dark .sghgjos-album-sidebar {
  background-color: rgba(44, 44, 46, 0.8);
  border-right-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-album-sidebar-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 10px 12px 6px;
  background: transparent;
  box-sizing: border-box;
}

.sghgjos-album-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.sghgjos-album-search-icon {
  position: absolute;
  left: 10px;
  color: #8e8e93;
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
}

.sghgjos-album-search {
  width: 100%;
  height: 32px;
  border: none;
  border-radius: 8px;
  padding: 0 10px 0 28px;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}

.sghgjos-album-search::placeholder {
  color: #8e8e93;
}

.sghgjos-album-search:focus {
  background: rgba(0, 0, 0, 0.09);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.28);
}

html.sghgjos-dark .sghgjos-album-search {
  background: rgba(255, 255, 255, 0.08);
}

html.sghgjos-dark .sghgjos-album-search:focus {
  background: rgba(255, 255, 255, 0.12);
}

.sghgjos-album-sidebar-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

html.sghgjos-dark .sghgjos-album-sidebar-scroll {
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.sghgjos-album-sidebar-scroll::-webkit-scrollbar {
  width: 6px;
  background: transparent;
}

.sghgjos-album-sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

html.sghgjos-dark .sghgjos-album-sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.24);
}

.sghgjos-album-sidebar-title {
  color: #9d9ca0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0 0 6px;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 600;
}

html.sghgjos-dark .sghgjos-album-sidebar-title {
  color: #8e8e93;
}

.sghgjos-album-category-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.sghgjos-album-category-item {
  cursor: pointer;
  border-radius: 6px;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  padding: 7px 10px;
  font-size: 12px;
  transition: background 0.2s;
  display: flex;
}

.sghgjos-album-category-item:hover {
  background: #e0e0e0;
}

.sghgjos-album-category-item.active {
  color: #1a1a1a;
  background: #c8c8c9;
  font-weight: 500;
}

html.sghgjos-dark .sghgjos-album-category-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

html.sghgjos-dark .sghgjos-album-category-item.active {
  color: #f5f5f7;
  background: rgba(10, 132, 255, 0.18);
}

.sghgjos-album-category-item .category-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  overflow: hidden;
}

.sghgjos-album-status.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sghgjos-album-right {
  position: relative;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  display: flex;
  overflow: hidden;
}

.sghgjos-album-toolbar {
  cursor: default;
  user-select: none;
  background: #f4f4f4;
  border-bottom: 1px solid #d5d5d5;
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 16px;
  display: flex;
}

html.sghgjos-dark .sghgjos-album-toolbar {
  background: #383838;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-album-toolbar-left {
  flex-shrink: 1;
  min-width: 0;
  align-items: center;
  gap: 8px;
  display: flex;
}

.sghgjos-album-toolbar-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sghgjos-album-toolbar-count {
  color: #999;
  font-size: 12px;
  flex-shrink: 0;
}

html.sghgjos-dark .sghgjos-album-toolbar-count {
  color: #8e8e93;
}

.sghgjos-album-drawer-toggle {
  display: none;
  color: #333;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  width: 26px;
  height: 26px;
  font-size: 14px;
  line-height: 1;
  transition: background 0.15s;
  flex-shrink: 0;
}

.sghgjos-album-drawer-toggle:hover {
  background: rgba(0, 0, 0, 0.1);
}

html.sghgjos-dark .sghgjos-album-drawer-toggle {
  color: #f5f5f7;
  background: rgba(255, 255, 255, 0.1);
}

html.sghgjos-dark .sghgjos-album-drawer-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

.sghgjos-album-toolbar-controls {
  align-items: center;
  gap: 12px;
  display: flex;
  flex-shrink: 0;
}

.sghgjos-album-layout-toggle {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  align-items: center;
  gap: 2px;
  padding: 2px;
  display: inline-flex;
}

html.sghgjos-dark .sghgjos-album-layout-toggle {
  background: rgba(255, 255, 255, 0.08);
}

.sghgjos-album-layout-toggle button {
  color: #666;
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: 4px;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  transition: all 0.15s;
  display: inline-flex;
}

.sghgjos-album-layout-toggle button:hover {
  color: #333;
}

.sghgjos-album-layout-toggle button.active {
  color: #1a1a1a;
  background: #fff;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

html.sghgjos-dark .sghgjos-album-layout-toggle button {
  color: #a1a1a6;
}

html.sghgjos-dark .sghgjos-album-layout-toggle button:hover { color: var(--text); }

html.sghgjos-dark .sghgjos-album-layout-toggle button.active {
  color: #f5f5f7;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.sghgjos-album-slider-wrap {
  align-items: center;
  display: flex;
}

.sghgjos-album-slider {
  appearance: none;
  cursor: pointer;
  background: #dcdcdc;
  border-radius: 2px;
  outline: none;
  width: 70px;
  height: 4px;
}

html.sghgjos-dark .sghgjos-album-slider {
  background: rgba(255, 255, 255, 0.2);
}

.sghgjos-album-slider::-webkit-slider-thumb {
  appearance: none;
  cursor: pointer;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  width: 14px;
  height: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sghgjos-album-content {
  background: #f8f8f8;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow-x: hidden;
  overflow-y: auto;
}

html.sghgjos-dark .sghgjos-album-content {
  background: #1e1f1e;
}

.sghgjos-album-grid {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  min-height: min-content;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  align-content: start;
  overflow: visible;
  box-sizing: border-box;
}

/*
 * 瀑布流：高度自适应时必须用 balance（或显式 column-count），
 * column-fill:auto + height:auto 会永远只排 1 列。
 */
.sghgjos-album-grid-masonry {
  display: block;
  column-gap: 8px;
  column-fill: balance;
  height: auto;
  min-height: 0;
}

.sghgjos-album-card {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  background: #fff;
  border-radius: 8px;
  width: 100%;
  min-width: 0;
  transition: box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* 宫格离屏卡片跳过渲染，减轻长列表滚动开销 */
@supports (content-visibility: auto) {
  .sghgjos-album-grid:not(.sghgjos-album-grid-masonry) > .sghgjos-album-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 240px;
  }
}

/* 占位撑开正方形格子，避免绝对定位图片导致高度塌陷/重叠 */
.sghgjos-album-card::before {
  content: '';
  display: block;
  padding-bottom: 100%;
}

.sghgjos-album-card-masonry {
  height: auto;
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin: 0 0 8px;
  display: block;
  width: 100%;
  contain: layout style;
  transition: opacity 0.18s ease;
}

/* 瀑布流追加：先占位再淡入，避免解码过程中闪跳 */
.sghgjos-album-card-masonry.is-pending {
  opacity: 0;
  pointer-events: none;
}

.sghgjos-album-card-masonry::before {
  display: none;
  padding-bottom: 0;
}

.sghgjos-album-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

html.sghgjos-dark .sghgjos-album-card {
  background: #2c2c2e;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

html.sghgjos-dark .sghgjos-album-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.sghgjos-album-card-img {
  display: block;
  background: #f0f0f0;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.sghgjos-album-card-masonry .sghgjos-album-card-img {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  /* 无分辨率时先占位，减轻图片解码后高度跳动 */
  min-height: 120px;
  background: #f0f0f0;
}

html.sghgjos-dark .sghgjos-album-card-img {
  background: #232322;
}

.sghgjos-album-card-img img {
  object-fit: cover;
  object-position: center;
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.2s ease;
}

.sghgjos-album-card-masonry .sghgjos-album-card-img img {
  width: 100%;
  height: auto;
  object-fit: contain;
  vertical-align: top;
  /* 有 aspect-ratio 时解码前先占位，减少瀑布流跳动 */
  background: #e8e8e8;
}

html.sghgjos-dark .sghgjos-album-card-masonry .sghgjos-album-card-img img {
  background: #232322;
}

.sghgjos-album-card:hover .sghgjos-album-card-img img {
  transform: scale(1.03);
}

.sghgjos-album-card-overlay {
  display: block;
  color: #fff;
  opacity: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  padding: 20px 10px 8px;
  transition: opacity 0.2s;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

.sghgjos-album-card:hover .sghgjos-album-card-overlay {
  opacity: 1;
}

.sghgjos-album-card-title {
  display: block;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
}

.sghgjos-album-card-date {
  display: block;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  margin: 0;
  font-size: 11px;
}

.sghgjos-album-empty {
  color: #999;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 60px 20px;
  font-size: 14px;
  display: flex;
  grid-column: 1 / -1;
}

html.sghgjos-dark .sghgjos-album-empty {
  color: #8e8e93;
}

.sghgjos-album-drawer-mask {
  display: none;
  z-index: 500;
  background: rgba(0, 0, 0, 0.3);
  position: absolute;
  inset: 0;
}

.sghgjos-album.is-drawer-open .sghgjos-album-drawer-mask {
  display: block;
}

/* ===== Album detail（对齐原站：窗口内详情，非直接全屏灯箱） ===== */
.sghgjos-album-detail-host {
  position: absolute;
  inset: 0;
  z-index: 400;
}

.sghgjos-album-detail-host[hidden] {
  display: none !important;
}

.sghgjos-album-detail {
  background: #f8f8f8;
  flex-direction: column;
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
}

html.sghgjos-dark .sghgjos-album-detail {
  background: #1e1f1e;
}

.sghgjos-album-detail-toolbar {
  cursor: default;
  user-select: none;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 10px;
  display: flex;
}

html.sghgjos-dark .sghgjos-album-detail-toolbar {
  background: #383838;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-album-back-btn {
  color: #333;
  cursor: pointer;
  background: transparent;
  border: none;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  font-size: 22px;
  line-height: 1;
  transition: color 0.15s;
  display: inline-flex;
}

.sghgjos-album-back-btn:hover {
  color: #000;
}

html.sghgjos-dark .sghgjos-album-back-btn { color: var(--text); }

.sghgjos-album-detail-title-inline {
  color: #333;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
}

html.sghgjos-dark .sghgjos-album-detail-title-inline { color: var(--text); }

.sghgjos-album-detail-actions {
  align-items: center;
  gap: 8px;
  display: flex;
}

.sghgjos-album-detail-action-btn {
  color: #555;
  cursor: pointer;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  font-size: 14px;
  transition: all 0.2s;
  display: inline-flex;
}

.sghgjos-album-detail-action-btn:hover {
  color: #333;
  background: #f0f0f0;
}

html.sghgjos-dark .sghgjos-album-detail-action-btn {
  color: #e8e8ed;
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.12);
}

html.sghgjos-dark .sghgjos-album-detail-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sghgjos-album-detail-body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.sghgjos-album-detail-image-wrap {
  touch-action: none;
  user-select: none;
  cursor: grab;
  background: #2a2a2a;
  flex: 1;
  justify-content: center;
  align-items: center;
  min-width: 0;
  display: flex;
  position: relative;
  overflow: hidden;
}

.sghgjos-album-detail-image-wrap.img-dragging {
  cursor: grabbing;
}

.sghgjos-album-detail-image {
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.12s;
}

.sghgjos-album-detail-image-wrap.img-dragging .sghgjos-album-detail-image {
  transition: none;
}

.sghgjos-album-detail-zoom-controls {
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  display: flex;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

html.sghgjos-dark .sghgjos-album-detail-zoom-controls {
  background: rgba(44, 44, 46, 0.92);
}

.sghgjos-album-detail-zoom-controls button {
  color: #555;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: 6px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  font-size: 14px;
  transition: background 0.15s;
  display: inline-flex;
}

html.sghgjos-dark .sghgjos-album-detail-zoom-controls button {
  color: #e8e8ed;
}

.sghgjos-album-detail-zoom-controls button:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.06);
}

html.sghgjos-dark .sghgjos-album-detail-zoom-controls button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.sghgjos-album-detail-zoom-controls button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.sghgjos-album-zoom-value {
  text-align: center;
  min-width: 42px;
  font-size: 12px;
  font-weight: 500;
  color: #333;
}

html.sghgjos-dark .sghgjos-album-zoom-value { color: var(--text); }

.sghgjos-album-zoom-sep {
  width: 1px;
  height: 16px;
  background: rgba(0, 0, 0, 0.12);
  margin: 0 2px;
}

html.sghgjos-dark .sghgjos-album-zoom-sep {
  background: rgba(255, 255, 255, 0.16);
}

.sghgjos-album-detail-reset-btn {
  min-width: auto !important;
  padding: 0 10px !important;
  font-size: 12px !important;
}

.sghgjos-album-detail-info {
  box-sizing: border-box;
  background: #fff;
  border-left: 1px solid #e5e5e5;
  flex-direction: column;
  flex-shrink: 0;
  width: 300px;
  max-width: 38%;
  padding: 16px 0;
  display: flex;
  overflow: hidden auto;
}

html.sghgjos-dark .sghgjos-album-detail-info {
  background: #232322;
  border-left-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-album-info-header {
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0 16px;
  display: flex;
}

.sghgjos-album-info-header h3 {
  color: #333;
  word-break: break-word;
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

html.sghgjos-dark .sghgjos-album-info-header h3 { color: var(--text); }

.sghgjos-album-vol {
  color: #999;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.sghgjos-album-info-time {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  padding: 0 16px;
}

.sghgjos-album-info-time-label {
  color: #999;
  font-size: 11px;
}

.sghgjos-album-info-time-value {
  color: #333;
  font-size: 13px;
}

html.sghgjos-dark .sghgjos-album-info-time-value {
  color: #e8e8ed;
}

.sghgjos-album-info-meta {
  margin-bottom: 12px;
  padding: 0 16px;
}

.sghgjos-album-meta-row {
  color: #666;
  margin: 0 0 6px;
  font-size: 13px;
}

html.sghgjos-dark .sghgjos-album-meta-row {
  color: #a1a1a6;
}

.sghgjos-album-open-post {
  align-self: flex-start;
  margin: 4px 16px 0;
  color: #0a84ff;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(10, 132, 255, 0.35);
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
}

.sghgjos-album-open-post:hover {
  background: rgba(10, 132, 255, 0.08);
}

/* Keep in sync with desktop.js MQ_MOBILE */
@media (max-width: 720px), (pointer: coarse) and (hover: none) {
  .sghgjos-album-detail-body {
    flex-direction: column;
  }

  .sghgjos-album-detail-info {
    width: 100%;
    max-width: none;
    border-left: none;
    border-top: 1px solid #e5e5e5;
    max-height: 36%;
  }

  html.sghgjos-dark .sghgjos-album-detail-info {
    border-top-color: rgba(255, 255, 255, 0.08);
  }
}

/* Keep in sync with desktop.js MQ_MOBILE */
@media (max-width: 720px), (pointer: coarse) and (hover: none) {
  .sghgjos-album-sidebar {
    position: absolute;
    z-index: 501;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  }

  .sghgjos-album.is-drawer-open .sghgjos-album-sidebar {
    transform: translateX(0);
  }

  .sghgjos-album-drawer-toggle {
    display: inline-flex;
  }

  .sghgjos-album-toolbar {
    padding-left: 12px;
  }

  .sghgjos-album-layout-toggle button {
    padding: 4px 6px;
  }
}

/*
 * 相册列表密度：仅窄屏（≤720px）启用。
 * 不要用 (pointer:coarse)——触控笔记本会被误判成手机，瀑布流变成 1 列。
 */
@media (max-width: 720px) {
  /* 手机：隐藏缩略图大小滑块（保留宫格/瀑布流） */
  .sghgjos-album-slider-wrap {
    display: none !important;
  }

  .sghgjos-album-toolbar-controls {
    gap: 0;
  }

  /* 宫格缝隙：白/黑细线（图1） */
  .sghgjos-album.is-layout-grid .sghgjos-album-content {
    background: #fff;
  }

  html.sghgjos-dark .sghgjos-album.is-layout-grid .sghgjos-album-content {
    background: #000;
  }

  /* 手机宫格：双列竖向封面（约 3:4），对齐图1 */
  .sghgjos-album-grid:not(.sghgjos-album-grid-masonry) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2px !important;
    padding: 0 !important;
    max-width: none;
    column-width: unset !important;
    column-gap: unset !important;
    column-fill: unset !important;
  }

  .sghgjos-album-grid:not(.sghgjos-album-grid-masonry) .sghgjos-album-card {
    border-radius: 0;
    box-shadow: none;
    background: #e8e8e8;
  }

  html.sghgjos-dark .sghgjos-album-grid:not(.sghgjos-album-grid-masonry) .sghgjos-album-card {
    background: #1c1c1e;
    box-shadow: none;
  }

  .sghgjos-album-grid:not(.sghgjos-album-grid-masonry) .sghgjos-album-card::before {
    padding-bottom: 133%;
  }

  .sghgjos-album-grid:not(.sghgjos-album-grid-masonry) .sghgjos-album-card-img {
    background: #e8e8e8;
  }

  html.sghgjos-dark .sghgjos-album-grid:not(.sghgjos-album-grid-masonry) .sghgjos-album-card-img {
    background: #1c1c1e;
  }

  .sghgjos-album-grid:not(.sghgjos-album-grid-masonry) .sghgjos-album-card-overlay {
    opacity: 1;
    padding: 28px 8px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  }

  .sghgjos-album-grid:not(.sghgjos-album-grid-masonry) .sghgjos-album-card-title {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
  }

  .sghgjos-album-grid:not(.sghgjos-album-grid-masonry) .sghgjos-album-card-date {
    display: none;
  }

  .sghgjos-album-grid:not(.sghgjos-album-grid-masonry) .sghgjos-album-card:hover {
    box-shadow: none;
  }

  .sghgjos-album-grid:not(.sghgjos-album-grid-masonry) .sghgjos-album-card:hover .sghgjos-album-card-img img {
    transform: none;
  }

  .sghgjos-album-grid:not(.sghgjos-album-grid-masonry) .sghgjos-album-card:active .sghgjos-album-card-img img {
    transform: scale(1.02);
  }

  .sghgjos-album-grid:not(.sghgjos-album-grid-masonry) .sghgjos-album-sentinel {
    padding: 16px 0;
    min-height: 44px;
  }

  /* 手机瀑布流：强制单列 */
  .sghgjos-album-grid-masonry {
    column-count: 1 !important;
    column-width: auto !important;
    column-gap: 0 !important;
    padding: 8px !important;
  }
}

.sghgjos-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Mobile — Phase 1: shell / launchpad / finder / reader */
/* Keep in sync with desktop.js MQ_MOBILE */
@media (max-width: 720px), (pointer: coarse) and (hover: none) {
  :root {
    --menubar-h: calc(36px + env(safe-area-inset-top, 0px));
    --dock-icon: 46px;
    --dock-h: 50px;
  }

  .sghgjos-mobile-only {
    display: flex !important;
  }

  .sghgjos-desktop-only {
    display: none !important;
  }

  /* --- Shell: menubar（仅桌面首页显示；关闭 App 时淡入） --- */
  html:not(.sghgjos-shell-home) {
    --menubar-h: env(safe-area-inset-top, 0px);
  }

  .sghgjos-menubar {
    padding: env(safe-area-inset-top, 0px) max(10px, env(safe-area-inset-right, 0px)) 0
      max(6px, env(safe-area-inset-left, 0px));
    height: var(--menubar-h);
    align-items: flex-end;
    padding-bottom: 4px;
    box-sizing: border-box;
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
  }

  html:not(.sghgjos-shell-home) .sghgjos-menubar {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
  }

  html.sghgjos-shell-home .sghgjos-menubar {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .sghgjos-menubar-left,
  .sghgjos-menubar-right {
    height: 32px;
  }

  .sghgjos-apple,
  .sghgjos-menubar-menus button,
  .sghgjos-mb-icon,
  .sghgjos-menubar-app-btn {
    height: 32px;
    max-height: none;
    min-width: 36px;
    padding: 0 10px;
    border-radius: 8px;
  }

  .sghgjos-apple {
    width: 36px;
  }

  .sghgjos-menubar-menus {
    display: none;
  }

  .sghgjos-clock {
    display: none;
  }

  /* --- Shell: home pager (即刻 | 主屏组件 | 博客) --- */
  .sghgjos-home-pager {
    top: var(--menubar-h);
    left: 0;
    right: 0;
    /* 主屏给 Dock 留底；侧屏（即刻/博客）收回这段高度 */
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    pointer-events: auto;
    /* 垂直原生滚动；水平由 JS。侧页滚动子元素也要同值，否则 Android 会吞掉横滑 */
    touch-action: pan-y;
    transition: bottom 0.22s ease;
  }

  html.sghgjos-shell-home:has(#sghgjos-home-pager[data-page="-1"]) .sghgjos-home-pager,
  html.sghgjos-shell-home:has(#sghgjos-home-pager[data-page="1"]) .sghgjos-home-pager {
    bottom: 0;
  }

  html:not(.sghgjos-shell-home) .sghgjos-home-pager {
    visibility: hidden;
    pointer-events: none;
  }

  .sghgjos-home-track {
    display: flex;
    width: 100%;
    height: 100%;
    will-change: transform;
    transform: translate3d(-100%, 0, 0); /* 默认主屏（中间页） */
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
    touch-action: pan-y;
  }

  .sghgjos-home-pager.is-dragging .sghgjos-home-track {
    transition: none;
  }

  @media (prefers-reduced-motion: reduce) {
    .sghgjos-home-track {
      transition: none;
    }
  }

  .sghgjos-home-screen[data-page="-1"],
  .sghgjos-home-screen[data-page="0"],
  .sghgjos-home-screen[data-page="1"] {
    position: relative;
    inset: auto;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: block;
    pointer-events: auto;
    touch-action: pan-y;
  }

  .sghgjos-home-screen[data-page="0"] {
    pointer-events: none;
  }

  .sghgjos-home-screen[data-page="0"] .sghgjos-widgets {
    pointer-events: none;
  }

  .sghgjos-widget-clock {
    top: 12%;
  }

  .sghgjos-widget-search {
    top: 18%;
    width: min(78vw, 420px);
  }

  .sghgjos-widget-search:has(.sghgjos-widget-search-input:focus) {
    width: min(94vw, 560px);
  }

  .sghgjos-widgets:has(.sghgjos-widget-clock) .sghgjos-widget-search {
    top: calc(12% + 7.25rem);
  }

  .sghgjos-home-jike {
    height: 100%;
    overflow: hidden;
    border-radius: 0;
    background: #ededed;
    touch-action: pan-y;
  }

  html.sghgjos-dark .sghgjos-home-jike {
    background: #000;
  }

  .sghgjos-home-jike .sghgjos-jike {
    height: 100%;
    min-height: 0;
    border-radius: 0;
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: pan-y;
    overscroll-behavior-x: none;
    -webkit-overflow-scrolling: touch;
  }

  .sghgjos-home-jike .sghgjos-jike-cover {
    height: min(230px, 36vh);
    flex-shrink: 0;
  }

  .sghgjos-home-jike .sghgjos-jike-feed {
    min-height: 160px;
    padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
  }

  .sghgjos-home-blog {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 0;
    background: #f5f5f7;
    touch-action: pan-y;
    overscroll-behavior-x: none;
    -webkit-overflow-scrolling: touch;
  }

  html.sghgjos-dark .sghgjos-home-blog {
    background: #1c1c1e;
  }

  .sghgjos-home-blog .sghgjos-blog-home {
    width: 100%;
    max-width: 100%;
    --reader-col: 100%;
    padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
  }

  .sghgjos-home-dots {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 30;
    justify-content: center;
    align-items: center;
    gap: 7px;
    pointer-events: auto;
  }

  .sghgjos-home-pager[data-page="-1"] .sghgjos-home-dots,
  .sghgjos-home-pager[data-page="1"] .sghgjos-home-dots {
    bottom: max(10px, env(safe-area-inset-bottom, 0px));
  }

  .sghgjos-home-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
    cursor: pointer;
  }

  .sghgjos-home-dots button.is-active {
    background: #fff;
    transform: scale(1.15);
  }

  .sghgjos-home-pager[data-page="-1"] .sghgjos-home-dots button,
  .sghgjos-home-pager[data-page="1"] .sghgjos-home-dots button {
    background: rgba(0, 0, 0, 0.22);
    box-shadow: none;
  }

  .sghgjos-home-pager[data-page="-1"] .sghgjos-home-dots button.is-active,
  .sghgjos-home-pager[data-page="1"] .sghgjos-home-dots button.is-active {
    background: rgba(0, 0, 0, 0.55);
  }

  /* --- Shell: desktop icons（仅桌面；手机左滑已改为博客屏） --- */
  .sghgjos-desktop-icons {
    display: none !important;
  }

  .sghgjos-desk-icon {
    width: 100%;
    max-width: 88px;
    padding: 10px 6px 8px;
    min-height: 88px;
  }

  .sghgjos-desk-icon .sghgjos-icon-face,
  .sghgjos-desk-icon .sghgjos-desk-ico-img {
    width: 58px;
    height: 58px;
  }

  .sghgjos-desk-icon span:not(.sghgjos-icon-face) {
    font-size: 12px;
  }

  /* --- Shell: windows --- */
  .sghgjos-windows {
    inset: var(--menubar-h) 0 0;
  }

  .sghgjos-window:not(.is-minimized) {
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    border-radius: 0 !important;
  }

  .sghgjos-titlebar {
    height: 44px;
    grid-template-columns: 72px 1fr 72px;
    padding: 0 14px;
  }

  .sghgjos-traffic {
    gap: 10px;
  }

  .sghgjos-traffic button {
    width: 22px;
    height: 22px;
  }

  /* 手机端：关闭/最小化图标常显；不显示缩放按钮（含绿点） */
  .sghgjos-window.is-active .sghgjos-traffic .btn-close::after,
  .sghgjos-window.is-active .sghgjos-traffic .btn-min::after {
    opacity: 1;
  }

  .sghgjos-traffic .btn-max {
    display: none !important;
  }

  .sghgjos-traffic button::after {
    background-size: 12px;
  }

  .sghgjos-resize {
    display: none;
  }

  /* --- Shell: dock ---
     Glass box stays centered (fit-content, capped at 100%).
     Scroll on the dock itself; height = icon size so overflow-x
     does not clip icons vertically (overflow-y becomes auto when x scrolls). */
  .sghgjos-dock-wrap {
    left: max(10px, env(safe-area-inset-left, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    bottom: max(6px, env(safe-area-inset-bottom, 0px));
    justify-content: center;
    align-items: flex-end;
    overflow: visible;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  }

  /* 负一屏（即刻）/ 右一屏（博客）：不显示 Dock，主屏再显示 */
  html.sghgjos-shell-home:has(#sghgjos-home-pager[data-page="-1"]) .sghgjos-dock-wrap,
  html.sghgjos-shell-home:has(#sghgjos-home-pager[data-page="1"]) .sghgjos-dock-wrap {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(110%);
  }

  .sghgjos-dock {
    flex: 0 1 auto;
    box-sizing: content-box;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    height: var(--dock-icon);
    padding: 6px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    justify-content: flex-start;
    align-items: center;
  }

  .sghgjos-dock::-webkit-scrollbar {
    display: none;
  }

  .sghgjos-dock-track {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-start;
    align-items: center;
    width: max-content;
    height: 100%;
    overflow: visible;
  }

  .sghgjos-dock-item .sghgjos-dock-ico {
    transition: none;
  }

  /* --- Shell: control center --- */
  .sghgjos-cc {
    width: calc(100% - 20px);
    max-width: none;
    right: 10px;
    left: 10px;
    top: calc(var(--menubar-h) + 6px);
  }

  /* --- Launchpad（手机：方形图标 + 上下滑动） --- */
  html.sghgjos-lp-open .sghgjos-home-dots {
    visibility: hidden;
    pointer-events: none;
  }

  .sghgjos-launchpad {
    padding: calc(var(--menubar-h) + 8px) max(10px, env(safe-area-inset-right, 0px))
      calc(72px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
    /* 手机无 backdrop-filter，半透明会透出桌面时钟/小组件 */
    background: #121216;
    overscroll-behavior: contain;
  }

  html.sghgjos-dark .sghgjos-launchpad {
    background: #000;
  }

  .sghgjos-lp-panel {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
  }

  .sghgjos-lp-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 10px;
    flex: 0 0 auto;
  }

  .sghgjos-lp-tabs {
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding: 2px 2px 4px;
    margin: 0 -2px;
  }

  .sghgjos-lp-tabs::-webkit-scrollbar {
    display: none;
  }

  .sghgjos-lp-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 8px 14px;
    font-size: 13px;
    line-height: 1.2;
    min-height: 36px;
  }

  .sghgjos-lp-search {
    min-width: 0;
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
  }

  .sghgjos-lp-search input {
    font-size: 16px; /* 避免 iOS 聚焦时页面缩放 */
  }

  .sghgjos-lp-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .sghgjos-lp-grid {
    display: grid;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(104px, auto);
    align-content: start;
    justify-items: center;
    gap: 14px 6px;
    padding: 4px 2px 20px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    scrollbar-width: none; /* 上下滑，隐藏滚动条更干净 */
  }

  .sghgjos-lp-grid::-webkit-scrollbar {
    display: none;
  }

  .sghgjos-lp-item {
    width: 100%;
    max-width: 84px;
    min-height: auto;
    height: auto;
    padding: 4px 2px;
    gap: 7px;
    border-radius: 12px;
    align-self: start;
    -webkit-tap-highlight-color: transparent;
  }

  .sghgjos-lp-item:hover,
  .sghgjos-lp-item:focus-visible {
    transform: none;
  }

  .sghgjos-lp-item:active {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(0.96);
  }

  .sghgjos-lp-ico {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    max-width: 60px;
    max-height: 60px;
    flex: 0 0 60px;
    aspect-ratio: 1 / 1;
    border-radius: 15px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  }

  .sghgjos-lp-ico-img {
    object-fit: contain;
  }

  .sghgjos-lp-ico-fallback {
    font-size: 22px;
  }

  .sghgjos-lp-label {
    max-width: 100%;
    width: 100%;
    font-size: 11px;
    line-height: 1.25;
    padding: 0 2px;
    flex: 0 0 auto;
  }

  .sghgjos-lp-empty {
    grid-column: 1 / -1;
    padding: 36px 12px;
    font-size: 13px;
  }

  .sghgjos-lp-skel {
    width: 56px;
    height: 76px;
    border-radius: 14px;
  }

  /* --- Finder --- */
  .sghgjos-app-finder {
    grid-template-columns: 1fr;
  }

  .sghgjos-finder-side {
    display: none;
  }

  .sghgjos-finder-main {
    min-height: 0;
    height: 100%;
  }

  .sghgjos-finder-sheet.is-grid {
    padding: 12px 10px 20px;
  }

  /* Mobile list: name (+ date when present); kind/cat → subtitle */
  .sghgjos-finder-thead .col-kind,
  .sghgjos-finder-thead .col-cat,
  .sghgjos-finder-row .col-kind,
  .sghgjos-finder-row .col-cat {
    display: none;
  }

  .sghgjos-finder-meta {
    display: block;
  }

  .sghgjos-finder-sheet.is-list {
    --finder-cols: minmax(0, 1fr);
  }

  .sghgjos-finder-sheet.is-list.has-date {
    --finder-cols: minmax(0, 1fr) minmax(68px, 88px);
  }

  /* Apps / simple lists: hide header chrome */
  .sghgjos-finder-sheet.is-list:not(.has-date) .sghgjos-finder-thead {
    display: none;
  }

  .sghgjos-finder-thead {
    height: 30px;
    font-size: 12px;
    padding: 0 16px 0 14px;
  }

  .sghgjos-finder-thead > span {
    line-height: 30px;
    border-right: 0;
    padding-right: 0;
  }

  .sghgjos-finder-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 8px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    min-height: 36px;
    font-size: 12px;
  }

  .sghgjos-finder-more {
    margin-left: auto;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 13px;
  }

  /* Toolbar: [nav …… view] / [位置] / [搜索] */
  .sghgjos-finder-toolbar {
    height: auto;
    min-height: 0;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 12px 10px;
    gap: 8px;
  }

  .sghgjos-finder-path.sghgjos-desktop-only {
    display: none !important;
  }

  .sghgjos-finder-tb-left {
    flex: 1 1 100%;
    order: 1;
    width: 100%;
    justify-content: space-between;
  }

  .sghgjos-mobile-finder-nav {
    display: flex !important;
    width: 100%;
    flex: 1 0 100%;
    order: 2;
    padding: 0;
  }

  .sghgjos-finder-tb-right {
    flex: 1 0 100%;
    order: 3;
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }

  .sghgjos-mobile-src-btn {
    height: 44px;
    border-radius: 12px;
    font-size: 16px; /* iOS: avoid focus zoom */
  }

  .sghgjos-mobile-src-btn .fi {
    width: 22px;
    height: 22px;
    border-radius: 6px;
  }

  .sghgjos-finder-src-item {
    min-height: 48px;
    font-size: 16px;
  }

  .sghgjos-finder-src-item .fi {
    width: 28px;
    height: 28px;
  }

  .sghgjos-finder-toolbar .sghgjos-tb-btn {
    width: 40px;
    height: 40px;
  }

  .sghgjos-finder-tb-right .sghgjos-tb-search,
  .sghgjos-finder-toolbar .sghgjos-tb-search {
    width: 100%;
    max-width: none;
    height: 40px;
    font-size: 16px; /* iOS: avoid focus zoom */
    margin-left: 0;
    border-radius: 12px;
    padding: 0 14px;
  }

  /* List rows */
  .sghgjos-finder-row {
    height: auto;
    min-height: 52px;
    font-size: 15px;
    padding: 8px 14px 8px 12px;
    column-gap: 10px;
    -webkit-tap-highlight-color: transparent;
  }

  .sghgjos-finder-row:active {
    background: rgba(0, 122, 255, 0.1);
  }

  .sghgjos-finder-row .col-name {
    gap: 12px;
  }

  .sghgjos-finder-row .doc-ico,
  .sghgjos-finder-row .sghgjos-finder-app-ico {
    width: 32px;
    height: 32px;
  }

  .sghgjos-finder-row .doc-ico {
    border-radius: 7px;
  }

  .sghgjos-finder-row .sghgjos-finder-app-ico .sghgjos-icon-face {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .sghgjos-finder-row .col-date {
    font-size: 11px;
    line-height: 1.25;
    text-align: right;
    white-space: normal;
    color: rgba(0, 0, 0, 0.38);
  }

  html.sghgjos-dark .sghgjos-finder-row .col-date {
    color: rgba(255, 255, 255, 0.42);
  }

  /* Per-src: apps — larger icons, roomier rows */
  .sghgjos-app-finder[data-fd-kind='apps'] .sghgjos-finder-row {
    min-height: 58px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .sghgjos-app-finder[data-fd-kind='apps'] .sghgjos-finder-row .sghgjos-finder-app-ico,
  .sghgjos-app-finder[data-fd-kind='apps'] .sghgjos-finder-row .sghgjos-finder-app-ico .sghgjos-icon-face {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .sghgjos-app-finder[data-fd-kind='apps'] .sghgjos-finder-card .sghgjos-finder-app-ico.lg,
  .sghgjos-app-finder[data-fd-kind='apps'] .sghgjos-finder-card .sghgjos-finder-app-ico.lg .sghgjos-icon-face {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }

  /* Per-src: media — thumb-forward grid */
  .sghgjos-app-finder[data-fd-kind='media'] .sghgjos-finder-sheet.is-grid {
    padding: 8px;
  }

  .sghgjos-app-finder[data-fd-kind='media'] .sghgjos-finder-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .sghgjos-app-finder[data-fd-kind='media'] .sghgjos-finder-card.is-media {
    padding: 0;
    min-height: 0;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.04);
  }

  .sghgjos-app-finder[data-fd-kind='media'] .sghgjos-finder-card.is-media .doc-ico.lg {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    border: 0;
    aspect-ratio: auto;
  }

  .sghgjos-app-finder[data-fd-kind='media'] .sghgjos-finder-card.is-media .sghgjos-finder-card-name {
    display: none;
  }

  .sghgjos-app-finder[data-fd-kind='media'] .sghgjos-finder-row .doc-ico.has-cover {
    width: 40px;
    height: 40px;
    border-radius: 8px;
  }

  /* Per-src: archive / category / pages — name first, compact MM-DD date */
  .sghgjos-app-finder[data-fd-kind='archive'] .sghgjos-finder-sheet.is-list.has-date,
  .sghgjos-app-finder[data-fd-kind='cat'] .sghgjos-finder-sheet.is-list.has-date,
  .sghgjos-app-finder[data-fd-kind='pages'] .sghgjos-finder-sheet.is-list.has-date {
    --finder-cols: minmax(0, 1fr) 40px;
  }

  .sghgjos-app-finder[data-fd-kind='archive'] .sghgjos-finder-row,
  .sghgjos-app-finder[data-fd-kind='cat'] .sghgjos-finder-row,
  .sghgjos-app-finder[data-fd-kind='pages'] .sghgjos-finder-row {
    min-height: 56px;
  }

  .sghgjos-app-finder[data-fd-kind='archive'] .sghgjos-finder-name,
  .sghgjos-app-finder[data-fd-kind='cat'] .sghgjos-finder-name,
  .sghgjos-app-finder[data-fd-kind='pages'] .sghgjos-finder-name {
    font-weight: 500;
  }

  .sghgjos-app-finder[data-fd-kind='archive'] .sghgjos-finder-row .col-date,
  .sghgjos-app-finder[data-fd-kind='cat'] .sghgjos-finder-row .col-date,
  .sghgjos-app-finder[data-fd-kind='pages'] .sghgjos-finder-row .col-date,
  .sghgjos-app-finder[data-fd-kind='archive'] .sghgjos-finder-thead .col-date,
  .sghgjos-app-finder[data-fd-kind='cat'] .sghgjos-finder-thead .col-date,
  .sghgjos-app-finder[data-fd-kind='pages'] .sghgjos-finder-thead .col-date {
    width: 40px;
    max-width: 40px;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
  }

  /* Per-src: trash / recent — softer empty + list */
  .sghgjos-app-finder[data-fd-kind='trash'] .sghgjos-finder-empty-ico,
  .sghgjos-app-finder[data-fd-kind='recent'] .sghgjos-finder-empty-ico {
    opacity: 0.55;
  }

  .sghgjos-finder-card {
    min-height: 96px;
    padding: 10px 6px;
    border-radius: 12px;
  }

  .sghgjos-finder-card:active {
    background: rgba(0, 122, 255, 0.12);
  }

  .sghgjos-finder-card .doc-ico.lg,
  .sghgjos-finder-card .sghgjos-finder-app-ico.lg {
    width: 56px;
    height: 56px;
  }

  .sghgjos-finder-card-name {
    max-width: 96px;
    font-size: 12px;
  }

  .sghgjos-finder-grid {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 10px 6px;
  }

  .sghgjos-finder-sheet.is-empty {
    padding: 64px 20px;
  }

  .sghgjos-finder-list,
  .sghgjos-finder-grid {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  /* --- Browser / Reader --- */
  .tb-bookmarks {
    display: none;
  }

  .tb-frame {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .tb-btn {
    width: 36px;
    height: 36px;
  }

  .tb-bm-panel {
    width: min(280px, 86vw);
  }

  .sghgjos-jike-item,
  .sghgjos-jike-feed > .sghgjos-empty {
    max-width: none;
  }

  .sghgjos-album-grid {
    max-width: none;
  }

  .sghgjos-reader {
    width: 100%;
    padding: 20px 16px 12px;
    font-size: 16.5px;
  }

  .sghgjos-reader h1 {
    font-size: 24px;
  }

  .sghgjos-reader .fmt table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* --- Post actions: match comment「发送」full width --- */
  .sghgjos-post-actions {
    align-items: stretch;
    padding-left: 0;
    padding-right: 0;
    gap: 12px;
  }

  .sghgjos-action-version {
    max-width: none;
    align-self: center;
  }

  .sghgjos-action-stack,
  .sghgjos-action-stack--dl {
    width: 100%;
    max-width: none;
    align-items: stretch;
  }

  .sghgjos-action-row,
  .sghgjos-action-row--dl {
    width: 100%;
    max-width: none;
    flex-wrap: nowrap;
    justify-content: stretch;
  }

  .sghgjos-action-btn {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border-radius: 10px;
    font-size: 15px;
  }

  .sghgjos-action-row--dl .sghgjos-action-btn {
    flex: 1 1 0;
    width: auto;
  }

  .sghgjos-action-copy--inline {
    flex: 0 0 auto;
    width: auto;
    max-width: 42%;
    min-height: 44px;
    border-radius: 10px;
  }

  .sghgjos-action-copy:not(.sghgjos-action-copy--inline) {
    max-width: none;
    width: 100%;
    border-radius: 10px;
  }

  /* --- Article comments (browser) --- */
  .sghgjos-blog-comments {
    width: 100%;
    padding: 4px 16px calc(72px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
  }

  .sghgjos-blog-comments h3 {
    margin: 12px 0 10px;
    font-size: 17px;
  }

  .sghgjos-cmt-list {
    gap: 12px;
  }

  .sghgjos-cmt-row {
    grid-template-columns: 32px 1fr;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
  }

  .sghgjos-cmt-av {
    width: 32px;
    height: 32px;
    border-radius: 6px;
  }

  .sghgjos-cmt-form {
    margin-top: 12px;
    gap: 8px;
  }

  .sghgjos-cmt-form textarea,
  .sghgjos-cmt-form input {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 16px; /* avoid iOS zoom on focus */
    border-radius: 10px;
  }

  .sghgjos-cmt-form textarea {
    min-height: 88px;
    resize: vertical;
  }

  .sghgjos-cmt-fields {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .sghgjos-cmt-meta {
    font-size: 13px;
  }

  .sghgjos-cmt-login {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
  }

  .sghgjos-cmt-login button {
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
  }

  .sghgjos-cmt-form button[type="submit"] {
    align-self: stretch;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
  }

  .sghgjos-cmt-empty {
    font-size: 13px;
    padding: 10px 0;
  }

  /* --- Memo: list ↔ detail drill-down --- */
  .sghgjos-memo {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    position: relative;
  }

  .sghgjos-memo-folders {
    display: none;
  }

  .sghgjos-memo-mid,
  .sghgjos-memo-body {
    min-height: 0;
    border-right: 0;
    height: 100%;
  }

  /* 默认列表全屏；进入详情后再显示正文 */
  .sghgjos-memo-body {
    display: none;
  }

  .sghgjos-memo.is-mview-detail .sghgjos-memo-body {
    display: flex;
  }

  .sghgjos-memo.is-mview-detail .sghgjos-memo-mid {
    display: none;
  }

  .sghgjos-memo-mobile-bar {
    display: flex !important;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 10px 12px 0;
    box-sizing: border-box;
  }

  .sghgjos-memo-folder-select {
    flex: 1;
    min-width: 0;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font-size: 15px;
    padding: 0 12px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238e8e93' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
  }

  html.sghgjos-dark .sghgjos-memo-folder-select {
    background-color: rgba(44, 44, 46, 0.95);
    border-color: rgba(255, 255, 255, 0.14);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a1a1a6' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  }

  .sghgjos-memo-mobile-new {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 214, 10, 0.45);
    color: #1d1d1f;
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
    cursor: default;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  html.sghgjos-dark .sghgjos-memo-mobile-new {
    background: rgba(255, 214, 10, 0.28);
    color: #fff;
  }

  .sghgjos-memo-search {
    padding: 10px 12px;
  }

  .sghgjos-memo-search input {
    height: 36px;
    border-radius: 10px;
    font-size: 16px; /* iOS: avoid focus zoom */
    padding: 0 12px;
  }

  .sghgjos-memo-list-head {
    display: flex !important;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 16px 10px;
    flex-shrink: 0;
  }

  .sghgjos-memo-list-head h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
  }

  .sghgjos-memo-list-head span {
    font-size: 13px;
    color: var(--muted);
    flex-shrink: 0;
  }

  .sghgjos-memo-list {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .sghgjos-memo-item {
    padding: 14px 16px;
    min-height: 64px;
    border-bottom-color: rgba(0, 0, 0, 0.06);
  }

  html.sghgjos-dark .sghgjos-memo-item {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  .sghgjos-memo-item:hover {
    background: transparent;
  }

  .sghgjos-memo-item:active {
    background: rgba(255, 214, 10, 0.18);
  }

  .sghgjos-memo-item strong {
    font-size: 16px;
    margin-bottom: 4px;
  }

  .sghgjos-memo-item span {
    font-size: 13px;
    line-height: 1.35;
  }

  .sghgjos-memo-detail-bar {
    display: flex !important;
    align-items: center;
    flex-shrink: 0;
    padding: 4px 8px 0;
    min-height: 44px;
    box-sizing: border-box;
  }

  .sghgjos-memo-back {
    border: 0;
    background: transparent;
    color: var(--taos-accent, var(--accent, #0a84ff));
    font-size: 17px;
    font-weight: 500;
    padding: 8px 10px;
    margin: 0;
    cursor: default;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sghgjos-memo-body-scroll {
    padding: 8px 16px 12px;
  }

  .sghgjos-memo-body h2,
  .sghgjos-memo-title-input {
    font-size: 22px;
  }

  .sghgjos-memo-body .memo-date {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .sghgjos-memo-body .fmt,
  .sghgjos-memo-body-input {
    font-size: 16px;
    line-height: 1.7;
  }

  .sghgjos-memo-foot {
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 12px;
  }

  .sghgjos-memo-foot button[data-memo-act] {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 16px;
    border-radius: 10px;
  }

  .sghgjos-memo-foot button[data-memo-act="save"],
  .sghgjos-memo-foot button[data-memo-act="restore"],
  .sghgjos-memo-foot button[data-memo-act="login"] {
    background: rgba(10, 132, 255, 0.1);
    color: var(--taos-accent, var(--accent, #0a84ff));
    font-weight: 600;
  }

  .sghgjos-memo-foot button[data-memo-act="delete"],
  .sghgjos-memo-foot button[data-memo-act="purge"] {
    background: rgba(255, 59, 48, 0.1);
    margin-left: auto;
  }

  .sghgjos-memo-demo-bar {
    flex-wrap: wrap;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    font-size: 13px;
    gap: 8px;
  }

  .sghgjos-memo-demo-bar button {
    margin-left: 0;
    min-height: 36px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
  }

  .sghgjos-memo.is-mview-detail ~ .sghgjos-memo-demo-bar {
    display: none;
  }

  /* --- Calendar: month ↔ day-detail drill-down --- */
  .sghgjos-calendar {
    max-width: none;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    position: relative;
  }

  .sghgjos-cal-main,
  .sghgjos-cal-side {
    min-height: 0;
    height: 100%;
  }

  .sghgjos-cal-side {
    display: none;
    border-left: 0;
    padding: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sghgjos-calendar.is-mview-detail .sghgjos-cal-main {
    display: none;
  }

  .sghgjos-calendar.is-mview-detail .sghgjos-cal-side {
    display: flex;
    flex-direction: column;
  }

  .sghgjos-cal-head {
    gap: 4px;
    margin-bottom: 8px;
  }

  .sghgjos-cal-head h2 {
    font-size: 18px;
  }

  .sghgjos-cal-nav {
    width: 40px;
    height: 40px;
    font-size: 24px;
    border-radius: 10px;
  }

  .sghgjos-cal-today-btn {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 10px;
  }

  .sghgjos-cal-grid {
    gap: 3px;
    font-size: 17px;
  }

  .sghgjos-cal-grid .head {
    font-size: 12px;
    padding: 4px 0;
  }

  .sghgjos-cal-grid .day {
    min-height: 40px;
    cursor: pointer;
  }

  .sghgjos-cal-grid .day:hover {
    background: transparent;
  }

  .sghgjos-cal-grid .day:active {
    background: radial-gradient(
      circle closest-side at center,
      rgba(0, 0, 0, 0.06) 0 86%,
      transparent 87%
    );
  }

  html.sghgjos-dark .sghgjos-cal-grid .day:active {
    background: radial-gradient(
      circle closest-side at center,
      rgba(255, 255, 255, 0.1) 0 86%,
      transparent 87%
    );
  }

  .sghgjos-cal-peek {
    display: flex !important;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-top: 10px;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 59, 48, 0.08);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    font: inherit;
    width: 100%;
    box-sizing: border-box;
    min-height: 52px;
  }

  html.sghgjos-dark .sghgjos-cal-peek {
    background: rgba(255, 59, 48, 0.14);
  }

  .sghgjos-cal-peek.is-empty {
    background: rgba(0, 0, 0, 0.04);
  }

  html.sghgjos-dark .sghgjos-cal-peek.is-empty {
    background: rgba(255, 255, 255, 0.06);
  }

  .sghgjos-cal-peek-label {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: #ff3b30;
  }

  .sghgjos-cal-peek.is-empty .sghgjos-cal-peek-label {
    color: var(--muted);
  }

  .sghgjos-cal-peek-title {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sghgjos-cal-peek.is-empty .sghgjos-cal-peek-title {
    color: var(--muted);
  }

  .sghgjos-cal-peek-chevron {
    flex-shrink: 0;
    font-size: 20px;
    color: var(--muted);
    line-height: 1;
  }

  .sghgjos-cal-mobile-bar {
    display: flex !important;
    align-items: center;
    flex-shrink: 0;
    min-height: 44px;
    margin: 0 0 4px;
    box-sizing: border-box;
  }

  .sghgjos-cal-back {
    border: 0;
    background: transparent;
    color: var(--taos-accent, var(--accent, #0a84ff));
    font-size: 17px;
    font-weight: 500;
    padding: 8px 4px;
    margin: 0;
    cursor: pointer;
    max-width: 100%;
  }

  .sghgjos-cal-side-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    flex-shrink: 0;
  }

  .sghgjos-cal-side .big {
    font-size: 56px;
    font-weight: 200;
  }

  .sghgjos-cal-weekday {
    font-size: 17px;
    font-weight: 500;
  }

  .sghgjos-cal-side-date {
    display: block;
    width: 100%;
    margin-top: 2px;
    font-size: 13px;
    color: var(--muted);
  }

  .sghgjos-cal-side-meta {
    margin-top: 18px;
    font-size: 14px;
  }

  .sghgjos-cal-login-btn {
    margin-top: 14px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
  }

  .sghgjos-cal-form {
    margin-top: 12px;
    gap: 12px;
    flex: 1;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .sghgjos-cal-field {
    gap: 6px;
  }

  .sghgjos-cal-field > span {
    font-size: 13px;
  }

  .sghgjos-cal-field input,
  .sghgjos-cal-field textarea {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 16px; /* iOS: avoid focus zoom */
  }

  .sghgjos-cal-field textarea {
    min-height: 120px;
  }

  .sghgjos-cal-form-actions {
    gap: 10px;
    margin-top: 4px;
  }

  .sghgjos-cal-save-btn,
  .sghgjos-cal-del-btn {
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
  }

  .sghgjos-cal-save-btn {
    flex: 1;
  }
}

/* ===== Browser blog home ===== */
.sghgjos-blog-home {
  box-sizing: border-box;
  width: var(--reader-col, 90%);
  max-width: 100%;
  margin: 0 auto;
  padding: 36px clamp(12px, 3.5%, 40px) 56px;
  color: #1d1d1f;
  container-type: inline-size;
  container-name: blog-home;
}

html.sghgjos-dark .sghgjos-blog-home { color: var(--text); }

.sghgjos-blog-hero {
  margin-bottom: 28px;
  padding: 32px 28px 28px;
  border-radius: 16px;
  background:
    radial-gradient(120% 90% at 12% -10%, rgba(0, 122, 255, 0.16), transparent 55%),
    radial-gradient(90% 70% at 100% 0%, rgba(88, 86, 214, 0.1), transparent 50%),
    #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

html.sghgjos-dark .sghgjos-blog-hero {
  background:
    radial-gradient(120% 90% at 12% -10%, rgba(10, 132, 255, 0.22), transparent 55%),
    radial-gradient(90% 70% at 100% 0%, rgba(94, 92, 230, 0.14), transparent 50%),
    #2c2c2e;
  border-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-blog-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--taos-accent, #007aff);
}

.sghgjos-blog-brand {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.sghgjos-blog-tagline {
  margin: 0 0 16px;
  max-width: 34em;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted, #86868b);
}

.sghgjos-blog-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted, #86868b);
}

.sghgjos-blog-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}

.sghgjos-blog-cat {
  appearance: none;
  cursor: default;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: #1d1d1f;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.sghgjos-blog-cat em {
  font-style: normal;
  opacity: 0.55;
  margin-left: 4px;
}

.sghgjos-blog-cat:hover {
  border-color: var(--taos-accent, #007aff);
  color: var(--taos-accent, #007aff);
}

.sghgjos-blog-cat.is-active {
  border-color: var(--taos-accent, #007aff);
  background: rgba(0, 122, 255, 0.1);
  color: var(--taos-accent, #007aff);
}

html.sghgjos-dark .sghgjos-blog-cat {
  background: #1c1c1e;
  border-color: rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
}

html.sghgjos-dark .sghgjos-blog-cat:hover {
  border-color: #0a84ff;
  color: #0a84ff;
}

html.sghgjos-dark .sghgjos-blog-cat.is-active {
  border-color: #0a84ff;
  background: rgba(10, 132, 255, 0.18);
  color: #0a84ff;
}

.sghgjos-blog-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sghgjos-blog-section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sghgjos-blog-more {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--taos-accent, #007aff);
  font-size: 13px;
  font-weight: 500;
  cursor: default;
  padding: 0;
}

.sghgjos-blog-more:hover {
  text-decoration: underline;
}

.sghgjos-blog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  column-count: 2;
  column-gap: 16px;
}

.sghgjos-blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  margin: 0 0 16px;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  break-inside: avoid;
  page-break-inside: avoid;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

html.sghgjos-dark .sghgjos-blog-card {
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.08);
}

.sghgjos-blog-card:hover {
  border-color: rgba(0, 122, 255, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

html.sghgjos-dark .sghgjos-blog-card:hover {
  border-color: rgba(10, 132, 255, 0.4);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
}

.sghgjos-blog-card.is-featured {
  column-span: all;
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
}

.sghgjos-blog-card.is-featured.has-wide-cover {
  display: flex;
  flex-direction: column;
}

.sghgjos-blog-card-media {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 900 / 383;
  background: #e8edf3;
  overflow: hidden;
}

.sghgjos-blog-card-media.is-square-cover {
  aspect-ratio: 1 / 1;
  background: #eef2f7;
}

.sghgjos-blog-card.has-cover .sghgjos-blog-card-media {
  background-color: #e5e7eb;
}

html.sghgjos-dark .sghgjos-blog-card-media,
html.sghgjos-dark .sghgjos-blog-card-media.is-square-cover,
html.sghgjos-dark .sghgjos-blog-card.has-cover .sghgjos-blog-card-media {
  background: #3a3a3c;
}

.sghgjos-blog-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.sghgjos-blog-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.34) 0%,
    rgba(0, 0, 0, 0.08) 28%,
    transparent 48%,
    transparent 72%,
    rgba(0, 0, 0, 0.05) 100%
  );
  pointer-events: none;
}

.sghgjos-blog-card-media.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(90% 80% at 20% 10%, rgba(0, 122, 255, 0.22), transparent 55%),
    linear-gradient(160deg, #e8eef7 0%, #d7dee8 100%);
}

.sghgjos-blog-card-media.is-placeholder span {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: rgba(29, 29, 31, 0.28);
  line-height: 1;
  user-select: none;
}

html.sghgjos-dark .sghgjos-blog-card-media.is-placeholder {
  background:
    radial-gradient(90% 80% at 20% 10%, rgba(10, 132, 255, 0.28), transparent 55%),
    linear-gradient(160deg, #3a3a3c 0%, #2c2c2e 100%);
}

html.sghgjos-dark .sghgjos-blog-card-media.is-placeholder span {
  color: rgba(255, 255, 255, 0.28);
}

.sghgjos-blog-card.is-featured .sghgjos-blog-card-media {
  width: 100%;
  min-height: 0;
  height: auto;
  align-self: stretch;
}

.sghgjos-blog-card.is-featured.has-square-cover .sghgjos-blog-card-media {
  aspect-ratio: 1 / 1;
  align-self: start;
}

.sghgjos-blog-card.is-featured.has-wide-cover .sghgjos-blog-card-media {
  aspect-ratio: 900 / 383;
  align-self: stretch;
}

.sghgjos-blog-card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 14px 16px 16px;
  pointer-events: none;
}

.sghgjos-blog-card.is-featured .sghgjos-blog-card-body {
  justify-content: center;
  padding: 36px 36px 36px 32px;
  min-height: 0;
  box-sizing: border-box;
}

.sghgjos-blog-card-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: inherit;
  padding: 0;
}

.sghgjos-blog-card-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  pointer-events: none;
  max-width: calc(42% - 4px);
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--taos-accent, #007aff);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.16);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sghgjos-blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  margin-left: auto;
  max-width: 56%;
  pointer-events: none;
}

.sghgjos-blog-card-tag {
  display: inline-block;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--muted, #86868b);
  background: rgba(0, 0, 0, 0.06);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sghgjos-blog-card.is-featured .sghgjos-blog-card-cat {
  top: 14px;
  left: 14px;
  padding: 4px 11px;
  font-size: 12px;
}

.sghgjos-blog-card.is-featured .sghgjos-blog-card-tag {
  padding: 3px 9px;
  font-size: 12px;
}

html.sghgjos-dark .sghgjos-blog-card-cat {
  color: #0a84ff;
  background: rgba(44, 44, 46, 0.9);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

html.sghgjos-dark .sghgjos-blog-card-tag {
  color: var(--muted, #98989d);
  background: rgba(255, 255, 255, 0.08);
}

.sghgjos-blog-card-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}

.sghgjos-blog-card.is-featured .sghgjos-blog-card-title {
  font-size: 28px;
  line-height: 1.25;
  -webkit-line-clamp: 3;
  margin-bottom: 12px;
}

.sghgjos-blog-card:hover .sghgjos-blog-card-title {
  color: var(--taos-accent, #007aff);
}

.sghgjos-blog-card-summary {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted, #86868b);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sghgjos-blog-card.is-featured .sghgjos-blog-card-summary {
  font-size: 15px;
  line-height: 1.65;
  -webkit-line-clamp: 5;
  margin-bottom: 18px;
}

.sghgjos-blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  font-size: 12px;
  color: var(--muted, #86868b);
}

.sghgjos-blog-card-meta-left {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
}

.sghgjos-blog-empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--muted, #86868b);
  font-size: 14px;
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: 14px;
}

html.sghgjos-dark .sghgjos-blog-empty {
  border-color: rgba(255, 255, 255, 0.12);
}

.sghgjos-blog-loadmore {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 8px 0 4px;
}

.sghgjos-blog-loadmore-btn {
  appearance: none;
  cursor: default;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: var(--taos-accent, #007aff);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}

.sghgjos-blog-loadmore-btn:hover:not(:disabled) {
  border-color: var(--taos-accent, #007aff);
  background: rgba(0, 122, 255, 0.06);
}

.sghgjos-blog-loadmore-btn:disabled {
  opacity: 0.65;
  color: var(--muted, #86868b);
}

html.sghgjos-dark .sghgjos-blog-loadmore-btn {
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.12);
  color: #0a84ff;
}

html.sghgjos-dark .sghgjos-blog-loadmore-btn:hover:not(:disabled) {
  border-color: #0a84ff;
  background: rgba(10, 132, 255, 0.14);
}

.sghgjos-blog-sentinel {
  width: 100%;
  height: 1px;
  pointer-events: none;
}

.sghgjos-blog-end {
  margin-top: 22px;
  padding: 12px 0 4px;
  text-align: center;
  font-size: 12px;
  color: var(--muted, #86868b);
}

@container blog-home (max-width: 640px) {
  .sghgjos-blog-list {
    column-count: 1;
  }
  .sghgjos-blog-card {
    margin-bottom: 12px;
  }
  .sghgjos-blog-card.is-featured {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .sghgjos-blog-card.is-featured .sghgjos-blog-card-media,
  .sghgjos-blog-card.is-featured.has-square-cover .sghgjos-blog-card-media,
  .sghgjos-blog-card.is-featured.has-wide-cover .sghgjos-blog-card-media {
    min-height: 0;
    max-width: none;
    height: auto;
    align-self: stretch;
  }
  .sghgjos-blog-card.is-featured .sghgjos-blog-card-body {
    padding: 20px 18px 22px;
    min-height: 0;
  }
  .sghgjos-blog-card.is-featured .sghgjos-blog-card-title {
    font-size: 22px;
  }
  .sghgjos-blog-card-body {
    padding: 14px 14px 16px;
  }
  .sghgjos-blog-card-title {
    font-size: 16px;
  }
}

/* Keep in sync with desktop.js MQ_MOBILE */
@media (max-width: 720px), (pointer: coarse) and (hover: none) {
  .sghgjos-blog-home {
    width: 100%;
    padding: 22px 18px 40px;
  }
  .sghgjos-blog-hero {
    padding: 24px 18px 22px;
  }
  /* 分类标签：手机端固定 3 列 ≈ 两行，避免单行挤出或横向滚动 */
  .sghgjos-blog-cats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 22px;
  }
  .sghgjos-blog-cat {
    width: 100%;
    min-width: 0;
    padding: 8px 6px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sghgjos-blog-list {
    column-count: 1;
  }
  .sghgjos-blog-card {
    margin-bottom: 12px;
  }
  .sghgjos-blog-card.is-featured {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .sghgjos-blog-card.is-featured .sghgjos-blog-card-media,
  .sghgjos-blog-card.is-featured.has-square-cover .sghgjos-blog-card-media,
  .sghgjos-blog-card.is-featured.has-wide-cover .sghgjos-blog-card-media {
    min-height: 0;
    max-width: none;
    height: auto;
    align-self: stretch;
  }
  .sghgjos-blog-card.is-featured .sghgjos-blog-card-body {
    padding: 20px 18px 22px;
    min-height: 0;
  }
  .sghgjos-blog-card.is-featured .sghgjos-blog-card-title {
    font-size: 22px;
  }
  .sghgjos-blog-card-body {
    padding: 14px 14px 16px;
  }
  .sghgjos-blog-card-title {
    font-size: 16px;
  }
}

/* Launchpad：超窄屏再收一档图标 */
@media (max-width: 360px) {
  .sghgjos-lp-ico {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    max-width: 52px !important;
    max-height: 52px !important;
    flex-basis: 52px !important;
    border-radius: 13px;
  }

  .sghgjos-lp-label {
    font-size: 10px;
  }

  .sghgjos-lp-grid {
    gap: 10px 4px;
    grid-auto-rows: minmax(96px, auto);
  }
}

/* ===== Components app ===== */
.sghgjos-components {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 20px;
  background: var(--body-bg);
  color: var(--text);
  overflow: auto;
}

.sghgjos-components-head h1 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sghgjos-components-head p {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--muted);
}

.sghgjos-components-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sghgjos-components-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--divider);
}

.sghgjos-components-ico {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sghgjos-components-ico .sghgjos-icon-face {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.sghgjos-components-meta {
  flex: 1;
  min-width: 0;
}

.sghgjos-components-name {
  font-size: 14px;
  font-weight: 600;
}

.sghgjos-components-desc {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.sghgjos-components-foot {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ——— Music (Audius) ——— */
.sghgjos-music {
  --music-accent: #ff2d55;
  --music-accent-soft: rgba(255, 45, 85, 0.14);
  display: flex;
  flex: 1;
  min-height: 0;
  height: 100%;
  background: var(--body-bg, #f5f5f7);
  color: var(--text, #1d1d1f);
  overflow: hidden;
}

html.sghgjos-dark .sghgjos-music {
  background: #1c1c1e;
}

.sghgjos-music-nav {
  width: 132px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 10px 12px;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.45);
}

html.sghgjos-dark .sghgjos-music-nav {
  border-right-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.sghgjos-music-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  background: transparent;
  color: var(--text, #1d1d1f);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: default;
}

.sghgjos-music-nav-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

html.sghgjos-dark .sghgjos-music-nav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sghgjos-music-nav-btn.is-active {
  background: var(--music-accent-soft);
  color: var(--music-accent);
}

.sghgjos-music-nav-ico {
  width: 1.1em;
  text-align: center;
  opacity: 0.85;
}

.sghgjos-music-nav-foot {
  margin-top: auto;
  padding: 10px 8px 2px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sghgjos-music-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--music-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sghgjos-music-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sghgjos-music-head {
  padding: 16px 20px 8px;
  flex-shrink: 0;
}

.sghgjos-music-head-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sghgjos-music-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sghgjos-music-sub {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.sghgjos-music-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.sghgjos-music-chip {
  border: 0;
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
  cursor: default;
  white-space: nowrap;
}

html.sghgjos-dark .sghgjos-music-chip {
  background: rgba(255, 255, 255, 0.08);
}

.sghgjos-music-chip:hover {
  background: rgba(0, 0, 0, 0.08);
}

html.sghgjos-dark .sghgjos-music-chip:hover {
  background: rgba(255, 255, 255, 0.12);
}

.sghgjos-music-chip.is-active {
  background: var(--music-accent);
  color: #fff;
}

.sghgjos-music-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 1;
  min-width: 180px;
  max-width: 360px;
}

.sghgjos-music-search input {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.8);
  color: inherit;
  font: inherit;
  font-size: 13px;
  outline: none;
}

html.sghgjos-dark .sghgjos-music-search input {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.sghgjos-music-search input:focus {
  border-color: var(--music-accent);
  box-shadow: 0 0 0 3px var(--music-accent-soft);
}

.sghgjos-music-search button,
.sghgjos-music-refresh {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--music-accent);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: default;
  white-space: nowrap;
}

.sghgjos-music-refresh {
  margin-left: auto;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

html.sghgjos-dark .sghgjos-music-refresh {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sghgjos-music-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 4px 12px 8px;
}

.sghgjos-music-scroll::-webkit-scrollbar {
  width: 8px;
}
.sghgjos-music-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 4px;
}
html.sghgjos-dark .sghgjos-music-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
}

.sghgjos-music-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.sghgjos-music-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sghgjos-music-row {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 10px;
  padding: 2px 4px 2px 0;
}

.sghgjos-music-row:hover {
  background: rgba(0, 0, 0, 0.04);
}
html.sghgjos-dark .sghgjos-music-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sghgjos-music-row.is-active {
  background: var(--music-accent-soft);
}

.sghgjos-music-row-main {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 28px 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 8px 6px 8px 8px;
  border-radius: 10px;
  cursor: default;
}

.sghgjos-music-idx {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.sghgjos-music-row.is-active .sghgjos-music-idx,
.sghgjos-music-row.is-active .sghgjos-music-title {
  color: var(--music-accent);
}

.sghgjos-music-thumb,
.sghgjos-music-now-cover {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: linear-gradient(145deg, #ff8fa3, #ff2d55 55%, #c7003d);
  flex-shrink: 0;
}

.sghgjos-music-thumb.is-ph,
.sghgjos-music-now-cover.is-ph {
  background: linear-gradient(145deg, #ffb3c1, #ff2d55 60%, #b80038);
}

.sghgjos-music-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sghgjos-music-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sghgjos-music-artist {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sghgjos-music-dur {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-right: 4px;
}

.sghgjos-music-like {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: default;
  opacity: 0.55;
}

.sghgjos-music-row:hover .sghgjos-music-like,
.sghgjos-music-like.is-on {
  opacity: 1;
}

.sghgjos-music-like.is-on {
  color: var(--music-accent);
}

.sghgjos-music-like:disabled {
  opacity: 0.25;
}

.sghgjos-music-eq {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 12px;
  width: 14px;
}

.sghgjos-music-eq i {
  display: block;
  width: 2px;
  height: 100%;
  border-radius: 1px;
  background: var(--music-accent);
  animation: sghgjos-music-eq 0.85s ease-in-out infinite;
}

.sghgjos-music-eq i:nth-child(2) {
  animation-delay: 0.15s;
  height: 70%;
}
.sghgjos-music-eq i:nth-child(3) {
  animation-delay: 0.3s;
  height: 45%;
}

@keyframes sghgjos-music-eq {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}

.sghgjos-music-player {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(220px, 1.4fr) minmax(100px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html.sghgjos-dark .sghgjos-music-player {
  border-top-color: rgba(255, 255, 255, 0.08);
  background: rgba(28, 28, 30, 0.88);
}

.sghgjos-music-now {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sghgjos-music-now-cover {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.sghgjos-music-now-meta {
  min-width: 0;
  flex: 1;
}

.sghgjos-music-now-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sghgjos-music-now-artist {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sghgjos-music-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.sghgjos-music-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sghgjos-music-ctrl {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  opacity: 0.85;
}

.sghgjos-music-ctrl:hover {
  background: rgba(0, 0, 0, 0.06);
  opacity: 1;
}
html.sghgjos-dark .sghgjos-music-ctrl:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sghgjos-music-ctrl.is-on {
  color: var(--music-accent);
  opacity: 1;
}

.sghgjos-music-ctrl.is-main {
  width: 40px;
  height: 40px;
  background: var(--text, #1d1d1f);
  color: var(--body-bg, #fff);
  font-size: 15px;
  opacity: 1;
}

html.sghgjos-dark .sghgjos-music-ctrl.is-main {
  background: #f5f5f7;
  color: #1c1c1e;
}

.sghgjos-music-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 420px;
}

.sghgjos-music-time {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  width: 34px;
  text-align: center;
}

.sghgjos-music-seek,
.sghgjos-music-vol input {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.12);
  outline: none;
  flex: 1;
  min-width: 0;
}

html.sghgjos-dark .sghgjos-music-seek,
html.sghgjos-dark .sghgjos-music-vol input {
  background: rgba(255, 255, 255, 0.16);
}

.sghgjos-music-seek::-webkit-slider-thumb,
.sghgjos-music-vol input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--music-accent);
  border: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.sghgjos-music-vol {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 13px;
  min-width: 0;
}

.sghgjos-music-vol input {
  max-width: 110px;
}

@media (max-width: 720px), (pointer: coarse) and (hover: none) {
  .sghgjos-music {
    flex-direction: column;
  }

  .sghgjos-music-nav {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    overflow-x: auto;
  }

  html.sghgjos-dark .sghgjos-music-nav {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  .sghgjos-music-nav-btn {
    flex: 0 0 auto;
    padding: 8px 12px;
  }

  .sghgjos-music-nav-foot {
    display: none;
  }

  .sghgjos-music-head {
    padding: 12px 14px 6px;
  }

  .sghgjos-music-head h1 {
    font-size: 18px;
  }

  .sghgjos-music-search {
    margin-left: 0;
    max-width: none;
    width: 100%;
    flex-basis: 100%;
  }

  .sghgjos-music-player {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .sghgjos-music-vol {
    display: none;
  }

  .sghgjos-music-row-main {
    grid-template-columns: 24px 36px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .sghgjos-music-like {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .sghgjos-dock-item.is-bounce .sghgjos-dock-ico {
    animation: none !important;
  }
  .sghgjos-wallpaper {
    transform: none !important;
  }
}
