.gg-app-shell {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(232, 137, 74, 0.11), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(100, 210, 255, 0.09), transparent 34%),
    rgba(13, 18, 26, 0.58);
}

.gg-app-shell button,
.gg-app-shell input,
.gg-app-shell textarea,
.gg-app-shell select {
  font: inherit;
}

.gg-app-shell input,
.gg-app-shell textarea,
.gg-app-shell select {
  color: var(--text);
}

.gg-app-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gg-glass-toolbar {
  height: 48px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(17, 22, 30, calc(0.4 + var(--glass-intensity) * 0.36));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
}

.gg-toolbar-title {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.gg-spacer {
  flex: 1;
  min-width: 8px;
}

.gg-toolbar-btn,
.gg-segment button,
.gg-pill-btn {
  height: 28px;
  min-width: 28px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 9px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.075);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.gg-toolbar-btn:hover,
.gg-segment button:hover,
.gg-pill-btn:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

.gg-toolbar-btn:disabled {
  opacity: 0.34;
  pointer-events: none;
}

.gg-segment {
  display: inline-flex;
  padding: 2px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.2);
  border: 0.5px solid rgba(255, 255, 255, 0.07);
}

.gg-segment button {
  height: 24px;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 7px;
  padding: 0 8px;
}

.gg-segment button.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.gg-search,
.gg-url-field {
  height: 28px;
  border: 0.5px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  outline: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(0, 0, 0, 0.22);
  color: var(--text);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.22);
}

.gg-search {
  width: 172px;
  padding: 0 10px 0 28px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(255,255,255,.55)' d='M9.5 3a6.5 6.5 0 0 1 5.2 10.4l4.45 4.45-1.3 1.3-4.45-4.45A6.5 6.5 0 1 1 9.5 3Zm0 1.8a4.7 4.7 0 1 0 0 9.4 4.7 4.7 0 0 0 0-9.4Z'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  background-repeat: no-repeat, no-repeat;
  background-position: 9px center, 0 0;
}

.gg-search::placeholder,
.gg-url-field::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.gg-search:focus,
.gg-url-field:focus {
  border-color: rgba(10, 132, 255, 0.65);
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.18), inset 0 1px 4px rgba(0, 0, 0, 0.22);
}

.gg-sidebar {
  flex: 0 0 var(--gg-sidebar-w, 220px);
  width: var(--gg-sidebar-w, 220px);
  padding: 10px 8px;
  overflow: auto;
  border-right: 0.5px solid rgba(255, 255, 255, 0.075);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(12, 16, 22, calc(0.36 + var(--glass-intensity) * 0.34));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
}

.gg-sidebar-title {
  padding: 6px 10px 10px;
  font-size: 20px;
  font-weight: 720;
  letter-spacing: -0.03em;
}

.gg-sidebar-section {
  margin: 7px 0 14px;
}

.gg-sidebar-label {
  padding: 5px 10px 6px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gg-sidebar-item {
  width: 100%;
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  text-align: left;
}

.gg-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.gg-sidebar-item.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.gg-sidebar-glyph {
  width: 19px;
  height: 19px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 1px 4px rgba(0, 0, 0, 0.24);
}

.gg-empty {
  margin: auto;
  max-width: 320px;
  padding: 28px;
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
  line-height: 1.45;
}

.gg-muted {
  color: rgba(255, 255, 255, 0.52);
}

/* Finder */
.gg-finder {
  --gg-sidebar-w: 210px;
}

.gg-finder-path {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}

.gg-finder-path button {
  color: inherit;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gg-finder-path button:hover {
  color: #fff;
}

.gg-finder-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.gg-finder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  align-content: start;
  padding: 18px;
}

.gg-finder-file {
  min-width: 0;
  height: 94px;
  padding: 8px 6px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.76);
}

.gg-finder-file:hover,
.gg-finder-file.selected {
  background: var(--accent-soft);
  color: #fff;
}

.gg-finder-file-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    rgba(0, 0, 0, 0.16);
  border: 0.5px solid rgba(255, 255, 255, 0.09);
}

.gg-finder-file-name {
  max-width: 100%;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.gg-finder-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.gg-finder-list th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 28px;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.5);
  text-align: left;
  font-weight: 650;
  background: rgba(20, 26, 34, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

.gg-finder-list td {
  height: 31px;
  padding: 0 10px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.74);
}

.gg-finder-list tr {
  cursor: default;
}

.gg-finder-list tr:hover,
.gg-finder-list tr.selected {
  background: var(--accent-soft);
}

.gg-finder-list .name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.gg-status-bar {
  height: 26px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 11px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.07);
  background: rgba(12, 16, 22, 0.34);
}

/* Safari styles live in js/apps/safari.js (Sonoma light chrome). */

/* Notes */
.gg-notes {
  --gg-sidebar-w: 190px;
  background: #17140f;
}

.gg-notes-list-col {
  flex: 0 0 245px;
  width: 245px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 0.5px solid rgba(255, 255, 255, 0.075);
  background:
    linear-gradient(180deg, rgba(255, 214, 10, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(15, 16, 19, calc(0.36 + var(--glass-intensity) * 0.3));
}

.gg-notes-list-toolbar {
  height: 48px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
}

.gg-notes-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px;
}

.gg-note-row {
  width: 100%;
  display: block;
  padding: 10px 11px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
}

.gg-note-row:hover,
.gg-note-row.active {
  background: rgba(255, 214, 10, 0.15);
}

.gg-note-row-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.gg-note-row-meta {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
}

.gg-note-row-preview {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  line-height: 1.32;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.gg-notes-editor {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 214, 10, 0.07), transparent 30%),
    rgba(20, 18, 14, 0.7);
}

.gg-notes-editor-toolbar {
  height: 48px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}

.gg-notes-title {
  flex: 0 0 auto;
  width: 100%;
  padding: 22px 28px 6px;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 24px;
  font-weight: 720;
  letter-spacing: -0.04em;
}

.gg-notes-date {
  padding: 0 28px 12px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.gg-notes-body {
  flex: 1;
  min-height: 0;
  width: 100%;
  padding: 0 28px 28px;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.55;
  user-select: text;
}

.gg-notes-body::selection,
.gg-notes-title::selection {
  background: rgba(255, 214, 10, 0.32);
}

/* System Settings */
.gg-settings {
  --gg-sidebar-w: 235px;
}

.gg-settings-sidebar-search {
  width: calc(100% - 12px);
  margin: 4px 6px 10px;
}

.gg-settings-profile {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 8px 12px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 8px;
}

.gg-settings-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ff9f0a, #bf5af2);
  color: #fff;
  font-weight: 800;
}

.gg-settings-pane {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 26px 32px 42px;
}

.gg-settings-pane h1 {
  margin-bottom: 18px;
  font-size: 26px;
  font-weight: 760;
  letter-spacing: -0.05em;
}

.gg-settings-lead {
  max-width: 560px;
  margin: -10px 0 18px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
  line-height: 1.45;
}

.gg-settings-group {
  max-width: 610px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 13px;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.04);
}

.gg-settings-row {
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
}

.gg-settings-row:last-child {
  border-bottom: 0;
}

.gg-settings-label {
  font-size: 13px;
  font-weight: 620;
  color: rgba(255, 255, 255, 0.88);
}

.gg-settings-desc {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  line-height: 1.35;
}

.gg-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.24);
  transition: background 0.16s;
}

.gg-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: translate 0.18s var(--ease-out);
}

.gg-switch.on {
  background: var(--accent);
}

.gg-switch.on::after {
  translate: 18px 0;
}

.gg-slider-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.gg-range {
  accent-color: var(--accent);
  width: 100%;
}

.gg-accent-swatches {
  display: flex;
  gap: 8px;
}

.gg-accent-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.24);
}

.gg-accent-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--accent-soft), 0 1px 5px rgba(0, 0, 0, 0.24);
}

.gg-about-card {
  max-width: 610px;
  padding: 28px;
  border-radius: 18px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.16), transparent 36%),
    rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.09);
}

.gg-about-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1d2735, #0b111b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 14px 32px rgba(0, 0, 0, 0.3);
  font-size: 34px;
}

.gg-about-specs {
  margin-top: 20px;
  text-align: left;
}

/* Settings side effects on the desktop */
html.gg-reduce-transparency {
  --glass-blur: 4px;
  --glass-fill: rgba(38, 44, 54, 0.9);
  --glass-tint: rgba(28, 32, 40, 0.94);
}

html.gg-reduce-transparency .liquid-glass,
html.gg-reduce-transparency .window-toolbar,
html.gg-reduce-transparency .window-sidebar,
html.gg-reduce-transparency .gg-sidebar,
html.gg-reduce-transparency .gg-glass-toolbar {
  backdrop-filter: none !important;
}

#dock.gg-dock-magnify-off .dock-item:hover {
  transform: none;
}

#dock.gg-dock-magnify-on .dock-item:hover {
  transform: translateY(-8px) scale(1.18);
}

html.gg-menubar-autohide .menubar {
  transform: translateY(calc(-1 * var(--menubar-h) + 2px));
  transition: transform 0.22s var(--ease-out);
}

html.gg-menubar-autohide .menubar:hover {
  transform: translateY(0);
}

html.gg-notifications-off .toast,
html.gg-notifications-off .notification-center {
  display: none !important;
}

@media (max-width: 760px) {
  .gg-sidebar {
    flex-basis: 168px;
    width: 168px;
  }

  .gg-search {
    width: 130px;
  }

  .gg-notes-list-col {
    flex-basis: 205px;
    width: 205px;
  }

}
