/* Basic Bookmark: shared website and extension UI.
   Theme tokens → base controls → navigation → library → forms → responsive. */
@import url('./theme.css?v=43f21a543f90');
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  border: 0;
  background: none;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
:where(button, a, input, textarea, select):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
input,
textarea,
select {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--focus);
}
label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  pointer-events: none;
}
svg.icon-folder {
  fill: var(--folder-fill);
  stroke: var(--folder-stroke);
  stroke-width: 1;
}
svg.icon-bookmark {
  fill: var(--green);
  stroke: none;
}
h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
}
.primary {
  background: var(--green);
  color: var(--on-accent);
  border-color: var(--green);
}
.primary:hover:not(:disabled) {
  background: var(--accent-hover);
}
.secondary {
  background: var(--surface);
}
.secondary:hover:not(:disabled) {
  background: var(--hover);
}
.primary svg,
.secondary svg {
  width: 14px;
  height: 14px;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  padding: 7px;
  color: var(--muted);
  border-radius: 4px;
}
.icon-button:hover {
  color: var(--green);
  background: var(--hover);
}
.danger,
.form-error {
  color: var(--danger);
}
.shell {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
.app-header {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
  padding: 10px 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.4px;
  white-space: nowrap;
}
.brand-mark {
  width: 12px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}
.brand-name {
  white-space: nowrap;
}
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.nav > button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  min-height: 40px;
  font-size: 13px;
  border-radius: 4px;
  white-space: nowrap;
  min-width: 0;
}
.nav > button:hover {
  background: var(--hover);
}
.nav > button.active {
  background: var(--selected);
}
.account-link {
  max-width: 280px;
}
.account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-header > .theme-toggle {
  margin-left: auto;
  width: 40px;
  height: 40px;
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
.main {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 54px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}
.topbar.account-topbar {
  display: none;
}
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
}
.search input {
  width: 100%;
  max-width: 460px;
  border: 0;
  background: transparent;
  padding: 7px 0;
  font-size: 13px;
}
#sync-status {
  font-size: 11px;
  color: var(--muted);
}
.content {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 24px 28px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
  margin-bottom: 16px;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.library-breadcrumb {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  min-width: 0;
  font-size: 12px;
  white-space: nowrap;
  color: var(--muted);
}
.page-heading > .library-breadcrumb {
  flex: 1;
}
.library-breadcrumb > * {
  flex-shrink: 0;
}
.library-breadcrumb button {
  color: var(--green);
}
.library-breadcrumb button:hover {
  text-decoration: underline;
}
.library-breadcrumb [aria-current] {
  color: var(--foreground);
  overflow: hidden;
  text-overflow: ellipsis;
}
.library-breadcrumb .breadcrumb-target {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 4px;
}
.library-breadcrumb svg {
  width: 11px;
  height: 11px;
}
.bookmarks {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.bookmarks.is-empty {
  display: flex;
  flex: 1;
}
.empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.bookmark,
.library-folder {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  gap: 10px;
  border-bottom: 1px solid var(--row-line);
  padding: 0 8px;
}
.bookmark:hover,
.library-folder:hover {
  background: var(--row-hover);
}
.bookmark.is-selected,
.library-folder.is-selected {
  background: var(--selected);
}
.bookmark-link,
.folder-open {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 20px;
  min-width: 0;
  padding: 12px 0;
}
.folder-open {
  text-align: left;
  gap: 10px;
}
.bookmark-title,
.folder-title strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 400;
}
.folder-title {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}
.domain {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bookmark-link .domain {
  max-width: 180px;
}
.row-icon,
.folder-row-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--muted);
}
.library-folder > .icon-button:last-child {
  display: none;
}
.bookmark > .icon-button,
.library-folder > .icon-button {
  opacity: 0;
}
.bookmark:hover > .icon-button,
.bookmark:focus-within > .icon-button,
.library-folder:hover > .icon-button,
.library-folder:focus-within > .icon-button {
  opacity: 1;
}
[draggable='true'] {
  -webkit-user-drag: element;
  user-select: none;
  cursor: grab;
}
.dragging {
  opacity: 0.35;
}
.drop-target {
  background: var(--selected) !important;
  outline: 1px solid var(--focus);
  outline-offset: -1px;
}
/* Bookmarks Bar and its menus. */
.favorites-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 8px 22px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  white-space: nowrap;
}
.favorites-label {
  padding-right: 14px;
  margin-right: 2px;
  border-right: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}
.favorite-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  max-width: 190px;
  border-radius: 4px;
  font-size: 12px;
  flex-shrink: 0;
}
.favorite-trigger > span:not(.favorite-caret):not(.site-icon) {
  overflow: hidden;
  text-overflow: ellipsis;
}
.favorite-trigger:hover,
.favorite-trigger[aria-expanded='true'] {
  background: var(--hover);
}
.favorite-trigger svg {
  width: 16px;
  height: 16px;
}
.favorite-caret {
  display: flex;
}
.favorite-caret svg {
  width: 11px;
  height: 11px;
  transform: rotate(90deg);
}
.favorite-trigger.favorite-icon-only {
  width: 30px;
  min-width: 30px;
  justify-content: center;
  padding: 6px;
  gap: 0;
}
.favorite-trigger.favorite-icon-only > span:not(.site-icon) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.favorite-trigger.favorite-icon-only > .favorite-caret {
  display: none;
}
.favorites-menu,
.item-menu {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px;
  box-shadow: var(--shadow);
  overflow-y: auto;
}
.favorites-menu {
  z-index: 900;
  width: 260px;
  max-width: calc(100vw - 16px);
}
.item-menu {
  z-index: 1000;
  min-width: 160px;
  max-height: calc(100vh - 16px);
}
.favorite-menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.favorite-menu-header button {
  color: var(--green);
  padding: 4px;
}
.favorite-menu-row,
.item-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border-radius: 3px;
  font-size: 13px;
  text-align: left;
}
.favorite-menu-row {
  justify-content: space-between;
  gap: 10px;
}
.favorite-menu-row > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.favorite-menu-row:hover,
.item-menu button:hover {
  background: var(--hover);
}
.favorite-menu-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
}
.favorite-menu-icon {
  order: -1;
  display: flex;
  flex-shrink: 0;
}
.favorite-menu-row:has(> .favorite-menu-icon) {
  justify-content: flex-start;
}
.favorite-before {
  box-shadow: inset 0 2px var(--green);
}
.favorite-after {
  box-shadow: inset 0 -2px var(--green);
}
.favorite-trigger.favorite-before {
  box-shadow: inset 2px 0 var(--green);
}
.favorite-trigger.favorite-after {
  box-shadow: inset -2px 0 var(--green);
}
.site-icon {
  position: relative;
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.site-icon img {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.site-icon.icon-loaded img {
  opacity: 1;
}
.site-icon.icon-loaded > svg {
  display: none;
}
/* Selection. */
.bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
}
.bulk-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.bulk-toolbar [role='status'] {
  margin-right: auto;
  color: var(--muted);
}
.bookmark-select,
.bulk-toolbar input[type='checkbox'] {
  appearance: auto;
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}
/* Account and dialogs. */
.settings {
  max-width: 580px;
  width: 100%;
}
.settings section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 24px;
}
.settings h2 {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 14px;
}
.settings p,
.dialog-copy {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}
.settings .secondary {
  margin: 10px 6px 0 0;
}
.form-grid {
  display: grid;
  gap: 14px;
}
.email-label-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.email-label-line strong {
  font-size: 12px;
  font-weight: 400;
}
.email-verification {
  margin: 16px 0;
  font-size: 12px;
}
.email-verification p {
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.email-verified {
  color: var(--green);
}
.email-unverified {
  color: var(--warning);
}
.verification-feedback:empty {
  display: none;
}
.verification-feedback {
  font-size: 12px;
  line-height: 1.5;
}
.form-error {
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}
.form-error:empty {
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 24px;
  width: calc(100% - 30px);
  max-width: 420px;
  max-height: calc(100svh - 32px);
  overflow-y: auto;
  background: var(--surface);
  color: var(--foreground);
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #17251db3;
}
dialog h2 {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 20px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
#toast {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: var(--on-accent);
  padding: 11px 16px;
  border-radius: 4px;
  font-size: 13px;
  z-index: 1100;
  max-width: 90vw;
  box-shadow: var(--shadow);
}
#toast.visible {
  display: block;
}
/* Minimal account entry and Notes. */
.auth-screen {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 340px;
  padding: 24px 0;
}
.auth-card .brand {
  margin-bottom: 32px;
}
.auth-card h1 {
  font-size: 22px;
  margin-bottom: 24px;
}
.auth-form {
  display: grid;
  gap: 18px;
}
.auth-form input {
  width: 100%;
  height: 44px;
}
.auth-form .primary {
  width: 100%;
  height: 44px;
  font-size: 13px;
}
/* Public welcome page: benefit first, sign-in within reach. */
.welcome-header {
  width: min(1160px, calc(100% - 80px));
  margin: auto;
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.welcome-header .brand {
  font-size: 18px;
  gap: 10px;
}
.auth-screen.welcome {
  width: min(1080px, calc(100% - 80px));
  min-height: calc(100svh - 108px);
  margin: auto;
  padding: 48px 0 100px;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(48px, 8vw, 130px);
  align-items: center;
  justify-items: stretch;
}
.welcome-kicker {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.025em;
  margin: 0 0 24px;
}
.welcome-story h1 {
  font:
    normal clamp(46px, 5.1vw, 72px)/1.08 Georgia,
    serif;
  letter-spacing: -0.055em;
  margin: 0;
  color: var(--foreground);
}
.welcome-story h1 em {
  color: var(--green);
  font-weight: normal;
}
.welcome-description {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
  max-width: 365px;
  margin: 28px 0 38px;
}
.welcome-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}
.welcome-platforms span + span::before {
  content: '·';
  margin-right: 18px;
}
.welcome .auth-card {
  max-width: none;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 16px 60px #20332606;
}
.welcome .auth-card h1 {
  margin: 0 0 28px;
  font-size: 24px;
  letter-spacing: -0.035em;
}
@media (max-width: 760px) {
  .welcome-header {
    width: calc(100% - 40px);
    padding: 22px 0;
  }
  .auth-screen.welcome {
    width: min(460px, calc(100% - 40px));
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 24px 0 40px;
    gap: 28px;
  }
  .welcome-story h1 {
    font-size: clamp(38px, 8.5vw, 52px);
  }
  .welcome-kicker {
    margin-bottom: 14px;
  }
  .welcome-description {
    font-size: 15px;
    margin: 18px 0 0;
  }
  .welcome-platforms {
    display: none;
  }
  .welcome .auth-card {
    padding: 24px;
  }
}
.auth-help {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.auth-notice,
.auth-error {
  margin: 0 0 20px;
}
.auth-error {
  color: var(--danger);
  font-size: 13px;
}
.auth-switch {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.auth-switch button,
.auth-switch a,
.auth-retry {
  color: var(--green);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 4px;
}
.auth-retry {
  display: block;
  margin: 12px auto 0;
}
.notes-page {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 60vh;
}
#notes-editor {
  display: block;
  width: 100%;
  flex: 1;
  min-height: 55vh;
  resize: vertical;
  font-size: 16px;
  line-height: 1.7;
  padding: 18px;
}
/* Extension popup: shared components with a compact header. */
.popup {
  width: 600px;
  min-height: 450px;
  max-height: 600px;
  overflow: auto;
}
.popup .shell {
  min-height: 450px;
}
.popup .app-header {
  gap: 10px;
  min-height: 50px;
  padding: 8px 12px;
}
.extension-name {
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--green);
  white-space: nowrap;
}
.extension-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.native-sync-button[aria-pressed='true'] {
  color: var(--green);
  background: var(--selected);
}
.popup .content {
  padding: 16px 15px;
}
.popup .topbar {
  height: 46px;
  padding: 0 15px;
}
.popup .heading-actions {
  gap: 6px;
  flex-wrap: wrap;
}
.popup .heading-actions .primary,
.popup .heading-actions .secondary {
  min-height: 34px;
  font-size: 11px;
  padding: 6px 8px;
}
.popup .heading-actions svg,
.popup .bookmark-link .domain {
  display: none;
}
.popup .favorites-bar {
  padding: 8px 12px;
}
.popup .favorite-trigger {
  max-width: 150px;
}
.popup .auth-screen {
  min-height: 450px;
}
.popup .auth-card {
  padding: 12px 0;
}
.popup #notes-editor {
  min-height: 280px;
}
.popup.extension-import {
  width: auto;
  max-height: none;
  min-height: 100svh;
}
.popup.extension-import .shell {
  min-height: 100svh;
}
.popup.extension-import .settings {
  max-width: 680px;
}
@media (max-width: 650px) {
  body:not(.popup) .app-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 12px 16px;
  }
  .app-header .nav {
    grid-row: 2;
    grid-column: 1/-1;
    gap: 4px;
  }
  .app-header > .theme-toggle {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }
  .app-header .nav > button {
    flex: 1;
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    padding: 10px 8px;
    font-size: 12px;
  }
  .app-header .account-link {
    max-width: none;
    flex: 1.5;
  }
  .app-header .brand {
    font-size: 17px;
  }
  .content {
    padding: 18px 16px;
  }
  .topbar {
    padding: 0 16px;
    gap: 8px;
  }
  .search input,
  .form-grid input,
  .auth-form input {
    font-size: 16px;
  }
  .favorites-bar {
    padding: 8px 16px;
  }
  .page-heading {
    gap: 12px;
    flex-wrap: wrap;
  }
  .page-heading > .library-breadcrumb {
    flex-basis: 100%;
  }
  .heading-actions {
    gap: 6px;
    flex-wrap: wrap;
  }
  .heading-actions .primary,
  .heading-actions .secondary {
    min-height: 40px;
  }
  .bookmark,
  .library-folder {
    min-height: 48px;
  }
  .bookmark-link .domain,
  .folder-title .domain {
    display: none;
  }
  .bookmark > .icon-button,
  .library-folder > .icon-button {
    opacity: 1;
    min-width: 36px;
    min-height: 40px;
  }
  .library-folder > .icon-button:last-child {
    display: none;
  }
  #notes-editor {
    padding: 14px;
  }
  #sync-status {
    max-width: 135px;
    font-size: 10px;
  }
  .popup .page-heading > .library-breadcrumb {
    flex-basis: auto;
  }
}
@media (hover: none) {
  .bookmark > .icon-button,
  .library-folder > .icon-button {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
