:root {
  --bg: #d3deeb;
  --panel: #ffffff;
  --text: #111827;
  --muted-1: #e5e7eb; /* gray-200 */
  --muted-2: #6b7280; /* gray-500 */
  --muted-3: #1f2937; /* gray-800 */
  --muted: var(--muted-2);
  /* Default brand/button color set to standard blue */
  --brand: #3b82f6;
  --brand-ink: #ffffff;
  --accent: #3b82f6;
  --danger: #ef4444;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --header-h: 120px; /* unified header height */
}

/* Harden the [hidden] attribute to always hide elements */
[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    'Apple Color Emoji',
    'Segoe UI Emoji';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Offset content for fixed header */
  padding-top: var(--header-h);
}

/* Reserve gutter for vertical scrollbar to prevent layout shifts */
html {
  scrollbar-gutter: stable;
}
@supports not (scrollbar-gutter: stable) {
  html {
    overflow-y: scroll;
  }
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  display: block;
  border-bottom: 0;
  background: #ffffff;
  z-index: 100;
}
.site-header .header-content {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr max-content 1fr; /* spacer, title, spacer */
  justify-items: center;
  align-items: stretch;
}

/* Remove special spanning; rely on header-content centering (grid on non-home pages) */
.header-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  align-self: center;
  justify-self: center;
  grid-row: 2; /* title row when using grid */
}
/* Global counts: baseline styles */
#global-counts {
  text-align: center;
  min-height: 1.1em;
}
/* Default: hide header actions; show only when explicitly logged in */
.header-actions {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 16px; /* 20px button spacing */
  align-self: start; /* top of header */
  justify-self: center;
  grid-row: 1; /* buttons row (top) */
  margin-bottom: 0;
}
/* Extra guard: hide header actions when logged out via body class */
body.logged-out #header-actions {
  display: none !important;
}
body.logged-in #header-actions {
  display: flex;
}
/* Hide global counts when logged out */
body.logged-out #global-counts {
  display: none;
}
body.logged-in #global-counts {
  display: block;
}
/* On logged-in home header, make counts span both columns so they center across full width */
body.logged-in:not(.page-folder):not(.page-viewer):not(.page-editor) #global-counts {
  grid-column: 1 / -1;
}

/* HOME (index) HEADER: use simple flex column layout instead of grid */
body:not(.page-folder):not(.page-viewer):not(.page-editor) .site-header .header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* vertically center the middle item (title) */
  gap: 6px;
  position: relative; /* allow absolute positioning of header-actions at top */
}
body:not(.page-folder):not(.page-viewer):not(.page-editor) .header-actions {
  order: 0; /* keep first in source order */
  position: absolute; /* pin to top of header */
  top: 0;
  left: 50%;
  transform: translateX(-50%); /* horizontally center */
}
/* Absolutely center the main title (DRAGBOXES / MY FOLDERS) in the home header */
body:not(.page-folder):not(.page-viewer):not(.page-editor) .header-top {
  order: 1; /* still conceptually in the middle */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* exact center of the header area */
  text-align: center;
}
body:not(.page-folder):not(.page-viewer):not(.page-editor) #global-counts {
  order: 2; /* conceptually below title */
  position: absolute; /* place relative to centered title */
  top: calc(50% + 20px); /* slightly closer below the title's vertical center */
  left: 50%;
  transform: translateX(-50%);
}

/* Header logout: top row tab (visible only when logged in) */
body.logged-out .header-logout {
  display: none !important;
}
body.logged-in .header-logout {
  display: flex;
  grid-row: 1;
  align-self: start;
  justify-self: end;
}
body.logged-in .header-logout .btn {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  padding: 6px 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Make home header buttons appear as bottom tabs */
body.logged-in .header-actions .btn {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  padding: 6px 10px;
  font-size: 0.95rem;
}
body.logged-in .brand {
  font-size: 2rem;
}

/* Home (index) page only: use two columns so left/top actions and right/top logout don't overlap */
body.logged-in:not(.page-folder):not(.page-viewer):not(.page-editor) .site-header .header-content {
  grid-template-columns: 1fr 1fr;
}
body.logged-in:not(.page-folder):not(.page-viewer):not(.page-editor) .header-top {
  grid-column: 1 / -1;
}
body.logged-in:not(.page-folder):not(.page-viewer):not(.page-editor) .header-actions {
  grid-column: 1 / -1;
}
body.logged-in:not(.page-folder):not(.page-viewer):not(.page-editor) .header-logout {
  grid-column: 2;
}
/* Make header and folder actions look like inline text links */
.header-actions .btn,
.folder-header .line-2 .btn,
.folder-header .line-2 a.btn {
  /* header buttons: real buttons with gray border */
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--border);
  padding: 8px 12px;
  margin: 0;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  white-space: nowrap; /* keep labels like "Log Out" on a single line */
}
.header-actions .btn:hover,
.folder-header .line-2 .btn:hover,
.folder-header .line-2 a.btn:hover {
  color: var(--accent); /* blue hover */
}
/* Icon-only button image sizing */
.header-actions .btn img {
  width: 18px;
  height: 18px;
  display: block;
}
/* Insert separators: two spaces, a pipe, two spaces */
/* No automatic separators between buttons */

/* Folder page header: match index header layout (top buttons, centered title, counts below) */
.folder-header {
  display: contents;
}
.page-folder .site-header .header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}
.page-folder .site-header .container {
  max-width: none;
}
.page-folder .folder-header .line-2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 0;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.page-folder .folder-header .line-2 .btn {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  padding: 6px 10px;
  font-size: 0.95rem;
  font-weight: 600;
}
.page-folder .folder-header .line-1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.page-folder #folder-counts {
  position: absolute;
  top: calc(50% + 20px);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}
.page-editor .viewer-crumbs .actions .btn {
  padding: 5px 7px;
}
.page-editor #viewer-actions .actions .btn {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  border-radius: 0;
  color: #6b7280; /* gray */
  font-weight: 600;
}
.page-editor #viewer-actions .actions .btn.danger:hover,
.page-editor #viewer-actions .actions .btn.delete:hover {
  color: var(--danger);
}
.logo {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: url('../icons/logo.svg') center/contain no-repeat;
  background-color: transparent;
  box-shadow: none;
}
.brand {
  font-size: 2rem;
  font-weight: 700;
  display: inline-flex;
  gap: 10px; /* 10px letter spacing between spans */
  line-height: 1;
  margin: 0;
}

#global-counts {
  min-height: 1.1em; /* reserve space even while loading */
  white-space: nowrap; /* avoid wrapping counts across multiple lines on mobile */
}
.header-top,
.folder-header .line-1,
.viewer-title {
  margin: 0;
}

/* Folder header title sizing */
.folder-header .folder-name {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

/* Viewer page: use unified header height */
body.page-viewer {
  overflow-x: hidden;
}

/* Compact viewer header bar */
.viewer-bar {
  display: contents;
}
.viewer-actions {
  display: none;
  align-items: center;
  gap: 10px;
}
body.editing .viewer-actions {
  display: flex;
}
.page-viewer .viewer-actions {
  display: none !important;
}
/* Viewer page header grid: 44px, 32px, 44px; title in middle row */
.page-viewer .site-header .header-content {
  grid-template-rows: 44px 32px 44px; /* spacer, title, spacer */
  row-gap: 6px; /* small space between slideshow (top) and title */
}
/* viewer-actions participates in centering via parent grid; no explicit row */
.page-editor #viewer-actions {
  display: flex !important;
}
.page-editor #viewer-actions .sep {
  color: var(--muted);
  margin: 0 8px;
}

/* Editor TinyMCE toolbar: style custom autosave label and delete icon */
.page-editor .tox .tox-toolbar .tox-tbtn[aria-label='Autosave enabled'],
.page-editor .tox .tox-toolbar .tox-tbtn[aria-label='AUTO-SAVE'] {
  color: var(--muted);
  pointer-events: none;
}
.page-editor .tox .tox-toolbar .tox-tbtn[aria-label='Autosave enabled'].saving,
.page-editor .tox .tox-toolbar .tox-tbtn[aria-label='AUTO-SAVE'].saving {
  color: var(--text); /* black while saving */
}
.page-editor .tox .tox-toolbar .tox-tbtn[aria-label='Delete Note'] {
  color: inherit; /* same color as other icons */
}
.tox .tox-toolbar .tox-tbtn[aria-label='Delete Note']:hover {
  filter: brightness(0.9);
}
.tox .tox-dialog[aria-label*='Image' i] .tox-dialog__body-nav {
  display: none !important;
}
.tox .tox-dialog[aria-label*='Image' i] .tox-dialog__body {
  padding-top: 0 !important;
  grid-template-columns: 1fr !important;
  column-gap: 0 !important;
}
.tox .tox-dialog[aria-label*='Image' i] .tox-dialog__body .tox-dialog__body-content {
  margin-top: 0 !important;
  margin-left: 0 !important;
}
.tox .tox-dialog .tox-dialog__body-nav:has(.tox-dialog__body-nav-item:only-child) {
  display: none !important;
}
.tox
  .tox-dialog:has(.tox-dialog__body-nav:has(.tox-dialog__body-nav-item:only-child))
  .tox-dialog__body {
  padding-top: 0 !important;
}
.tox
  .tox-dialog:has(.tox-dialog__body-nav:has(.tox-dialog__body-nav-item:only-child))
  .tox-dialog__body
  .tox-dialog__body-content {
  margin-top: 0 !important;
}
.save-status {
  color: var(--muted);
  font-size: 0.95rem;
}
/* Editor page: position save-status at top-right of header */
.page-editor .site-header .header-content {
  position: relative;
}
.page-editor #save-status {
  display: none !important; /* hide legacy saving text */
}
.viewer-crumbs {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
/* Keep headers single-row on viewer/editor: hide breadcrumbs and actions */
.viewer-crumbs {
  display: none !important;
}
.viewer-title {
  line-height: 1;
  width: 100%;
  text-align: center;
  align-self: center;
  justify-self: center;
  grid-row: 2; /* middle row */
}
.viewer-title .item-title,
.viewer-title .title-input {
  font-size: 2rem;
}
.viewer-title .folder-sub {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: 4px;
}
/* Hide breadcrumbs to ensure title remains absolutely centered */
.viewer-crumbs {
  display: none;
}
.viewer-bar .sep {
  color: var(--muted);
  font-size: 1.1rem; /* match crumb size */
}
.viewer-bar .item-title {
  font-size: 2rem;
  font-weight: 600;
}

/* Viewer: image navigation row under the title */
.viewer-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  align-self: start; /* top of header */
  justify-self: center;
  grid-row: 1; /* move buttons to top row */
}
.viewer-sub .btn {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  padding: 6px 10px;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Viewer: top-right Edit button aligned to the 800px note column */

/* Title input: hidden by default; shown only in edit mode */
.viewer-title .title-input {
  display: none;
  width: 100%;
  margin: 4px auto 0;
  padding: 8px 12px;
  font-size: 1.4rem;
  font-weight: 500;
  text-align: center;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
.page-editor .viewer-title .title-input {
  border: 0; /* remove border in editor */
  padding: 4px 6px; /* smaller in editor */
  width: 100%; /* remove width restrictions */
  max-width: none;
  display: block;
  font-size: 2rem;
}
body.editing .viewer-title .item-title {
  display: none;
}
body.editing .viewer-title .title-input {
  display: block;
}

/* Remove padding around editor in edit mode */
body.editing .note-content {
  padding: 0;
}
/* Auth */
.auth-view {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 16px 40px;
}
.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  width: 400px; /* target modal width */
  max-width: 100%; /* stay responsive on small screens */
  overflow: auto;
  box-shadow: var(--shadow);
}
.auth-title {
  margin: 0 0 8px 0;
  font-size: 28px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.9rem;
}
.error {
  color: var(--danger);
  margin-top: 8px;
}
.auth-card .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
  align-items: stretch;
  width: 100%; /* full card width */
}
.auth-card label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.auth-card input[type='email'],
.auth-card input[type='password'],
.auth-card input[type='text'] {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
  display: block;
  width: 90%; /* 90% of the auth-card width */
  max-width: none;
  box-sizing: border-box;
  margin-left: auto; /* center within the card */
  margin-right: auto;
}
input::placeholder {
  color: #6b7280;
}

/* Prevent iOS/Android auto-zoom on focus */
@media (max-width: 700px) {
  input,
  select,
  textarea {
    font-size: 16px; /* stops mobile Safari zoom */
    line-height: 1.3;
  }
}

/* Login auth card: labels on the left, inputs on the right */
.auth-card .form-row {
  /* keep spacing consistent with earlier rule, but don't override width */
  margin: 12px 0;
}
.auth-card .form-row label {
  text-align: right;
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 16px;
}

.auth-card .actions {
  width: 90%; /* same width as inputs */
  margin-left: auto; /* center the column in the card */
  margin-right: auto;
}

.btn {
  --btn-bg: #f3f4f6;
  --btn-fg: #111827;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
}
.btn.primary {
  --btn-bg: var(--brand);
  --btn-fg: var(--brand-ink);
  border-color: transparent;
  font-weight: 700;
}
.btn.danger {
  --btn-bg: #fee2e2;
  --btn-fg: #991b1b;
  border-color: transparent;
  font-weight: 700;
}
.btn.success {
  --btn-bg: #22c55e; /* green-500 */
  --btn-fg: #ffffff;
  border-color: transparent;
  font-weight: 700;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* User view */
.user-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}
.user-header .spacer {
  flex: 1;
}
.page-title {
  margin: 0;
  font-size: 24px;
}
.user-header .btn {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 700px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Home page folder list: single column, centered, max 600px */
#folder-list {
  grid-template-columns: 1fr; /* override .grid responsive columns */
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 20px; /* space between header and first folder */
  gap: 12px; /* space between folders */
  margin-bottom: 0; /* bottom space provided by .user-view padding */
}
#folder-list .folder-separator {
  display: none;
}

/* Favorite star badge on top-right of favorite folders */
.folder-card[data-favorite='true'] .card-body::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 40px;
  width: 24px;
  height: 24px;
  background: transparent
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23facc15'><path d='M12 17.27 18.18 21 16.54 13.97 22 9.24 14.81 8.63 12 2 9.19 8.63 2 9.24 7.46 13.97 5.82 21z'/></svg>")
    center/contain no-repeat;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.2));
  pointer-events: none;
}

/* Ensure bottom breathing room on the Home page regardless of last-child margin collapsing */
.user-view {
  padding-bottom: 200px;
}

/* Folder page: spacing between header and grid */
.page-folder #box-grid {
  margin-top: 20px;
  gap: 12px;
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding-left: 0;
}
.page-folder #box-grid > li {
  flex: 0 0 calc((100% - 12px) / 2);
}
@media (min-width: 700px) {
  .page-folder #box-grid > li {
    flex-basis: calc((100% - (12px * 2)) / 3);
  }
}
@media (min-width: 1000px) {
  .page-folder #box-grid > li {
    flex-basis: calc((100% - (12px * 3)) / 4);
  }
}

/* Also add bottom padding on the folder page container so space is guaranteed */
.page-folder main.container {
  padding-bottom: 200px;
}

.page-folder #box-empty {
  text-align: center;
}

.cards {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.card-body {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 16px;
  cursor: grab;
}
.card-body:active {
  cursor: grabbing;
}
.card-title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 6px;
}
/* Folder cards: position context */
.folder-card .card-body {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}
/* Top-right visibility badge (Public/Private) */
.folder-card .card-visibility-badge {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  color: var(--muted-3);
  border: 0;
}

/* If favorite star is present, shift the badge left to avoid overlap */
.folder-card[data-favorite='true'] .card-visibility-badge {
  right: 12px;
}
.folder-card .folder-preview {
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #f9fafb;
}
.folder-card .folder-preview .box-preview {
  border-top: 0; /* remove divider line inside small preview */
}
.folder-card .folder-preview .note-preview,
.folder-card .folder-preview .fp-note {
  padding: 4px;
  line-height: 1.15;
  font-size: 11px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.folder-card .folder-preview .note-preview h1,
.folder-card .folder-preview .note-preview h2,
.folder-card .folder-preview .note-preview h3,
.folder-card .folder-preview .note-preview h4,
.folder-card .folder-preview .note-preview h5,
.folder-card .folder-preview .note-preview h6 {
  font-size: 1em;
  margin: 0 0 2px 0;
}
.folder-card .folder-preview .note-preview p {
  margin: 0;
}
.folder-card .folder-preview .note-preview ol,
.folder-card .folder-preview .note-preview ul {
  margin: 0;
  padding-left: 1.1em;
  list-style-position: outside;
}
.folder-card .folder-preview .note-preview li {
  margin: 0;
}
/* Ensure solid bullets at top level in tiny folder previews, with standard nesting */
.folder-card .folder-preview .note-preview ul {
  list-style-type: disc;
}
.folder-card .folder-preview .note-preview ul ul {
  list-style-type: circle;
}
.folder-card .folder-preview .note-preview ul ul ul {
  list-style-type: square;
}
.folder-card .folder-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.folder-card .folder-info {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.folder-card .folder-preview .fp-note {
  width: 100%;
  height: 100%;
  padding: 6px;
  color: var(--muted-3);
  line-height: 1.2;
  overflow: hidden;
}
/* Tighten note preview inside the small home preview square */
.folder-card .folder-preview .note-preview {
  padding: 6px;
  line-height: 1.2;
}
/* Force compact, uniform typography inside tiny folder previews regardless of inline styles */
.folder-card .folder-preview .note-preview,
.folder-card .folder-preview .note-preview * {
  font-size: 11px !important;
  line-height: 1.2 !important;
  text-transform: none !important;
}
.folder-card .folder-preview .note-preview h1,
.folder-card .folder-preview .note-preview h2,
.folder-card .folder-preview .note-preview h3,
.folder-card .folder-preview .note-preview h4,
.folder-card .folder-preview .note-preview h5,
.folder-card .folder-preview .note-preview h6 {
  font-size: 1em !important;
  margin: 0 0 2px 0;
}
/* Ensure inline images inside note previews don't fill the preview square */
.folder-card .folder-preview .note-preview img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}
/* Inline pill styling for visibility (Private/Public) on folder cards */
.folder-card .card-visibility {
  display: inline-block;
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 0.8rem;
  line-height: 1.2;
}
/* Counts line under title (left-aligned) */
.folder-card .card-counts {
  color: var(--muted-2);
  font-size: 0.9rem;
}
.card-meta {
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.card-meta .card-counts {
  margin-left: auto;
}
/* On folder cards, show counts immediately after visibility (no right push) */
.folder-card .card-meta .card-counts {
  margin-left: 0;
}
.card-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 12px;
}
.btn.small {
  padding: 4px 8px;
  font-size: 0.85rem;
}
.code-badge {
  display: inline-block;
  background: #f3f4f6;
  color: #111827;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;
  font-size: 0.9em;
}
.drag-ghost {
  opacity: 0.6;
}
.drag-dragging {
  outline: 2px dashed var(--accent);
  cursor: grabbing;
}

/* Make entire box draggable (cursor UX) */
.box-card {
  cursor: grab;
}
.box-card:active {
  cursor: grabbing;
}

/* Folder page: prevent selecting any content inside box cards */
.page-folder .box-card,
.page-folder .box-card * {
  -webkit-user-select: none;
  user-select: none;
}

/* Folder page: ensure inner media doesn't intercept clicks/drag; only the card responds */
.page-folder .box-card .box-preview,
.page-folder .box-card .box-preview * {
  pointer-events: none;
}

/* Box cards: fixed two-line title area above square preview */
.box-card .card-body {
  height: 50px;
  padding: 0 12px; /* keep horizontal padding; no vertical to preserve exact height */
  display: flex;
  align-items: center; /* vertically center one-line or two-line title block */
}
.box-card .card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0; /* no extra spacing since there is no meta line */
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden; /* ellipsis when truncated to 2 lines */
}

/* Boxes without explicit titles: light gray card and muted placeholder title */
.box-card.no-title {
  background: #e5e7eb;
}
.box-card.no-title .card-title {
  color: var(--muted-1);
}
/* Link card titles: blue (no underline) */
.box-card[data-type='link'] .card-title {
  color: var(--muted-2);
  text-decoration: none;
}
/* Ensure link titles stay blue even on no-title cards */
/* For blank link titles (placeholders), use muted and remove underline */
.box-card.no-title[data-type='link'] .card-title {
  color: var(--muted-1);
  text-decoration: none;
}
/* Media titles (non-blank, non-link): use muted-3 color */
.box-card[data-type='media']:not(.no-title) .card-title {
  color: var(--muted-2);
}
.box-card[data-type='media'][data-media-kind='youtube']:not(.no-title) .card-title {
  color: var(--muted-2);
}
/* Note titles (non-blank): use muted-2 */
.box-card[data-type='note']:not(.no-title) .card-title {
  color: var(--muted-2);
}
.box-card.no-title .card-body {
  background: #ffffff;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Folder header */
.folder-header {
  display: contents;
}
.folder-header .line-1 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  transform: none;
  justify-content: center;
  grid-row: 2; /* ensure title uses middle row */
}
.folder-header .crumb {
  font-size: 1.5rem;
  color: #6b7280; /* gray */
  text-decoration: none;
  font-weight: 700;
}
.folder-header .crumb:hover {
  color: var(--accent); /* blue on hover */
}
.folder-header .sep {
  font-size: 1.5rem;
}
.folder-header .folder-name {
  font-size: clamp(1.2rem, 4vw, 2rem);
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  max-width: 100vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.folder-header .line-2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px; /* 20px button spacing */
  margin-top: 0;
  align-self: end; /* bottom of header grid */
  grid-row: 3; /* buttons row */
}
.folder-header .line-2 .btn {
  font-size: 1rem;
  padding: 8px 12px; /* match home header buttons */
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}
.folder-header .line-2 .btn:hover {
  color: var(--accent); /* blue on hover */
}
.folder-header .line-2 a.btn:visited {
  color: var(--btn-fg);
}
.folder-header .shortcode-line {
  margin-top: 6px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: grid;
  place-items: start center; /* align to top (below header) and center horizontally */
  z-index: 1000; /* above .site-header (z-index: 100) */
  padding: 16px;
  padding-top: calc(var(--header-h) + 20px); /* 20px below header */
  overscroll-behavior: contain; /* stop scroll chaining to body */
  touch-action: none; /* iOS: prevent body panning under overlay */
}
.modal-box {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
  max-height: 85vh; /* keep modal within viewport */
  overflow: auto; /* allow internal scrolling */
  overscroll-behavior: contain; /* keep scroll inside modal */
  touch-action: auto; /* allow normal scrolling inside */
}
.modal-content {
  position: relative;
}
.modal-content h3 {
  margin: 0 0 8px 0;
}
.modal-content .delete-top-right {
  position: absolute;
  top: 8px;
  right: 8px;
}
.modal-content .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.modal-content .form-row-inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.modal-content .form-row-inline label {
  min-width: 64px;
}
.modal-content .form-row-inline input[type='text'],
.modal-content .form-row-inline input[type='email'],
.modal-content .form-row-inline input[type='password'] {
  flex: 1;
}
.modal-content .actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.modal-content .stack-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

/* Rounded slider toggle switch */
.switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  background: #e5e7eb; /* gray-200 */
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s ease;
  border: 1px solid var(--border);
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}
.switch-input:checked + .switch {
  background: var(--accent);
  border-color: transparent;
}
.switch-input:checked + .switch::after {
  transform: translateX(20px);
}
.switch-input:focus-visible + .switch {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Lock body scroll when any modal is open */
body.modal-open {
  overflow: hidden; /* desktop/Android */
}

/* Constrain media previews inside Add Media / Add Link modals */
.media-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 260px; /* prevent overflow; scroll if many items */
  overflow: auto;
  padding-right: 4px; /* room for scrollbar */
}
.media-item {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 6px;
}
.media-item img,
.media-item video,
.media-item iframe {
  width: 100%;
  height: 140px;
  display: block;
  object-fit: cover; /* crop to thumbnail */
  background: #000;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.thumb-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 140px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
}
.media-item input[type='text'] {
  width: 100%;
  padding: 6px 8px;
  font-size: 0.9rem;
}
.modal-content .media-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
/* moved media-item rules to the consolidated block below */

/* Viewer default content styles (legacy) */
.viewer-content {
  max-width: 800px;
}
.viewer-media {
  width: 100%;
  height: auto;
  display: block;
  max-height: 70vh;
  object-fit: contain;
  background: #f3f4f6;
  border-radius: 12px;
}

/* Full-screen viewer modes */
body.mode-note,
body.mode-image,
body.mode-video {
  height: 100%;
}
body.mode-note .viewer-content,
body.mode-image .viewer-content,
body.mode-video .viewer-content {
  max-width: none;
  width: 100%;
  min-height: calc(100vh - var(--header-h));
  padding: 0;
  margin: 0;
}

/* Note mode: white background with generous whitespace around content */
body.mode-note {
  background: var(--bg);
}
body.mode-note #content-area {
  display: grid;
  place-items: start center;
  min-height: calc(100vh - var(--header-h));
  padding: 20px 24px 200px; /* extra bottom space for comfortable scrolling */
}
/* In edit mode, remove side/bottom padding so editor can be truly edge-to-edge */
body.editing #content-area {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h);
  bottom: 0;
  overflow: hidden; /* prevent page scroll; scroll inside editor */
  padding: 0;
  display: block; /* disable centering so children can fill width */
}
.note-view {
  width: 100%;
  display: flex;
  justify-content: center;
}
/* In edit mode, avoid flex centering to allow full-width editor */
body.editing .note-view {
  display: block;
  height: 100%;
}
.note-content {
  background: #ffffff;
  color: var(--text);
  max-width: 800px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.note-content > :first-child {
  margin-top: 0;
}
/* In edit mode (all breakpoints), let the editor span the full width */
body.editing .note-content {
  max-width: none;
  height: 100%;
  padding: 0; /* ensure no inner gaps */
}

/* Desktop: constrain editor and title input to 800px, centered */
@media (min-width: 701px) {
  body.editing .note-content {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
  /* TinyMCE fills parent which is constrained above */
  body.editing .note-content .tox-tinymce {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
  /* Title input line constrained too */
  .viewer-title .title-input {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Prevent body scrolling in edit mode; editor will handle its own scroll */
body.editing {
  overflow: hidden;
}

/* Mobile-friendly edit mode: edge-to-edge */
/* Always remove container side padding when editing (all breakpoints) */
body.editing.page-viewer .container {
  padding-left: 0;
  padding-right: 0;
}
@media (max-width: 700px) {
  body.editing .viewer-content {
    padding: 0;
  }
  body.editing .note-content {
    max-width: none;
    border-radius: 0;
    box-shadow: none;
  }
}

/* Ensure TinyMCE host fills the width of the note-content */
body.editing .note-content .tox-tinymce {
  width: 100% !important;
  border-radius: 0;
  box-shadow: none;
  border: 0;
  height: 100% !important; /* fill the fixed viewport below header */
  display: flex;
  flex-direction: column;
}
/* Allow sticky header inside TinyMCE */
body.editing .note-content .tox-tinymce,
body.editing .note-content .tox-editor-container {
  overflow: visible !important;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0; /* allow children to shrink */
}
/* Desktop: allow TinyMCE toolbar to wrap into multiple rows (no horizontal scroll) */
body.editing .note-content .tox .tox-toolbar,
body.editing .note-content .tox .tox-toolbar__primary {
  flex-wrap: wrap !important;
  white-space: normal;
  overflow: visible;
}
body.editing .note-content .tox .tox-toolbar__group {
  flex: 0 0 auto;
}
/* Hide TinyMCE overflow/drawer button ("…") */
/* Ensure TinyMCE overflow/drawer ("…") remains visible on all sizes so hidden buttons are accessible */

/* Mobile: keep toolbar single-line with horizontal scroll for small screens */
@media (max-width: 700px) {
  body.editing .note-content .tox .tox-toolbar,
  body.editing .note-content .tox .tox-toolbar__primary {
    flex-wrap: nowrap !important;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    background: #fff; /* avoid dark flashing during horizontal scroll */
    overscroll-behavior-x: contain; /* reduce bounce artifacts */
  }
}
/* Stick the TinyMCE editor header under the fixed site header */
body.editing .note-content .tox .tox-editor-header {
  position: sticky;
  top: 0; /* container is already offset below site header */
  z-index: 400; /* above content */
}
body.editing .note-content .tox .tox-toolbar-overlord {
  border-bottom: 1px solid var(--border);
}

/* Editor bottom action bars */
.editor-bottom {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  bottom: 0;
  width: 100%;
  max-width: 800px; /* whole bar width */
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 10px 0; /* vertical comfort */
  z-index: 500; /* above editor content */
}
.editor-bottom .container {
  display: flex;
  max-width: none;
  width: 100%;
  margin: 0;
}
.editor-bottom .actions {
  width: 100%;
}
.editor-bottom--right .actions {
  margin-left: auto;
  justify-content: flex-end;
}
.editor-bottom--center .actions {
  justify-content: center;
}

/* Make editor content area take remaining height and scroll internally */
body.editing .note-content .tox .tox-sidebar-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
body.editing .note-content .tox .tox-edit-area {
  height: 100%;
}

/* Prefer modern viewport units to avoid URL bar jumps on mobile */
@supports (height: 100svh) {
  body.mode-note .viewer-content {
    min-height: calc(100svh - var(--header-h));
  }
  body.mode-note #content-area {
    min-height: calc(100svh - var(--header-h));
  }
}
@supports (height: 100dvh) {
  body.mode-note .viewer-content {
    min-height: calc(100dvh - var(--header-h));
  }
  body.mode-note #content-area {
    min-height: calc(100dvh - var(--header-h));
  }
}

/* Image mode: center image, gray background fills unused space */
body.mode-image {
  background: #1f2937; /* gray-800 */
}
body.mode-image #content-area {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h);
  bottom: 0;
  display: grid;
  place-items: center;
  padding: 0;
}
.view-media {
  width: 100%;
  height: calc(100vh - var(--header-h));
  object-fit: contain;
  background: transparent;
  border-radius: 0;
}

/* Video mode: dark background, media fills viewport */
body.mode-video {
  background: #000000;
}
body.mode-video #content-area {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h);
  bottom: 0;
  display: grid;
  place-items: center;
  padding: 0;
}
.view-frame {
  border: 0;
}

/* Box previews (square area under title/meta on folder page) */
.box-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* square */
  border-top: 1px solid var(--border);
  overflow: hidden;
  background: #f9fafb;
}
.box-preview img,
.box-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* center-crop visuals */
  display: block;
  position: relative;
  z-index: 2;
}
/* Link boxes: fit entire image/video inside the available space (override generic cover) */
.box-preview.link img,
.box-preview.link video,
.box-preview.link iframe {
  object-fit: contain;
  background: transparent;
}
.page-folder .box-preview.link img,
.page-folder .box-preview.link video,
.page-folder .box-preview.link iframe {
  object-fit: contain;
}
.modal-content .media-item .box-preview {
  aspect-ratio: 1 / 1;
}
.modal-content .media-item .box-preview img,
.modal-content .media-item .box-preview video,
.modal-content .media-item .box-preview iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  border: 0;
  border-radius: 0;
}
/* In Add/Edit link modals, give link previews the same stacked layout as box faces */
.modal-content .media-item .box-preview.link {
  display: flex;
  flex-direction: column;
}
.modal-content .media-item .box-preview.link .box-thumb-url {
  /* Override earlier modal absolute-position URL styling with stacked layout */
  position: static;
  top: auto;
  left: auto;
  right: auto;
  margin: 8px 12px 4px;
  flex: 0 0 auto;
}
.modal-content .media-item .box-preview.link img,
.modal-content .media-item .box-preview.link video,
.modal-content .media-item .box-preview.link iframe {
  /* override generic modal rule so image fills only the space below the URL */
  object-fit: contain;
  height: auto;
  flex: 1 1 auto;
}
.box-preview.media video {
  background: #000;
}
.box-preview.media iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}
/* Vector icons (e.g., favicon.svg): allow upscale to fit without blur */
/* Subtle loading shimmer for Add Media modal previews */
.modal-content .media-item .box-preview.loading::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: db-shimmer 1.1s linear infinite;
}
@keyframes db-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Add Media modal: visible loading text */
.modal-content .media-item .box-preview .box-thumb-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted-3);
  font-size: 13px;
  user-select: none;
}

/* URL label: handled per context rules below */

/* Add Media modal: URL background label (behind icon) */
.modal-content .media-item .box-preview .box-thumb-url,
.box-card .box-preview .box-thumb-url,
.folder-card .folder-preview .box-preview .box-thumb-url {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  color: var(--muted-2);
  opacity: 0.6;
  font-size: 1rem;
  line-height: 1.2;
  white-space: normal;
  overflow: hidden;
  word-break: break-word;
  pointer-events: none;
  z-index: 1;
}

/* Folder grid: align URL text left and match card title inset (12px) */
.box-card .box-preview .box-thumb-url {
  text-align: left;
  left: 12px;
  right: 12px;
}

/* Link previews: dedicated 2-line URL area at top with media directly underneath */
.box-preview.link {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* URL area inside link previews: two lines max, ellipsis on second line */
.box-preview.link .box-thumb-url {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  margin: 8px 12px 4px;
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
  /* Reserve a single line of height with ellipsis on overflow */
  min-height: 1.2em;
  max-height: 1.2em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
}

/* Media inside link previews: align under URL and fit inside the remaining area */
.box-preview.link .box-thumb-media {
  flex: 1 1 auto;
  min-height: 0; /* allow shrinking within the square */
  display: flex;
  align-items: flex-start; /* default: butt media up against URL area */
  justify-content: center; /* keep horizontally centered */
  position: relative; /* position context for play badge on link media */
}
.box-preview.link .box-thumb-media img,
.box-preview.link .box-thumb-media video,
.box-preview.link .box-thumb-media iframe {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Home (index) page only: center link preview media vertically within the square */
body.logged-in:not(.page-folder):not(.page-viewer):not(.page-editor)
  .box-preview.link
  .box-thumb-media {
  align-items: center;
}

.box-preview .note-preview {
  padding: 12px;
  color: var(--muted-3);
  line-height: 1.25;
  overflow: hidden; /* clip any overflow; no scrollbars on card faces */
  display: block; /* allow natural flow */
  height: 100%; /* fill the preview area */
  /* Removed line clamps so text can fill the box height */
}
.note-preview > :first-child {
  margin-top: 0;
}

/* End icon URL centering overrides */
/* Compact content rules for viewer note body and card previews */
.note-content {
  line-height: 1.25;
}
.note-content p {
  margin: 0.25em 0;
}
.note-content ol,
.note-content ul {
  margin: revert;
  padding-left: revert;
  list-style: revert;
  list-style-position: revert;
}
.note-content li {
  margin: 0.25em 0;
}
.note-content ul {
  list-style-type: disc;
}
.note-content ul ul {
  list-style-type: circle;
}
.note-content ul ul ul {
  list-style-type: square;
}
.note-content blockquote {
  margin: 0;
  padding-left: 0.8ch;
  border-left: 2px solid var(--border);
}

.note-content img,
.note-content video,
.note-content iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Compact list/quote spacing inside box face previews */
.box-preview .note-preview p {
  margin: 0.25em 0;
}
.box-preview .note-preview ol,
.box-preview .note-preview ul {
  margin: revert;
  padding-left: revert;
  list-style: revert;
  list-style-position: revert;
}
.box-preview .note-preview li {
  margin: 0.25em 0;
}
.box-preview .note-preview ul {
  list-style-type: disc;
}
.box-preview .note-preview ul ul {
  list-style-type: circle;
}
.box-preview .note-preview ul ul ul {
  list-style-type: square;
}
.box-preview .note-preview blockquote {
  margin: 0;
  padding-left: 0.8ch;
  border-left: 2px solid var(--border);
}

/* Folder page: add bottom fade for note box previews */
.page-folder .box-preview.note::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 15%;
  pointer-events: none;
  /* Match .box-preview background (#f9fafb) and fade from transparent */
  background: linear-gradient(to bottom, rgba(249, 250, 251, 0) 0%, rgba(249, 250, 251, 1) 100%);
}

/* Video play overlay and fallback */
.box-preview.has-play .play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  pointer-events: none; /* do not block card click */
  background: transparent url('../icons/play-overlay.png') center/contain no-repeat;
  /* hide any text fallback if present */
  color: transparent;
  text-indent: -9999px;
  z-index: 3;
}

/* Link/Youtube previews: nudge play overlay upward to sit over the top-aligned thumbnail */
.box-preview.link.has-play .play-badge {
  top: 40%;
}

/* Home page folder preview size override */
.folder-card .folder-preview .box-preview.has-play .play-badge {
  width: 30px;
  height: 30px;
}

.modal-content .box-preview.has-play .play-badge {
  width: 45px;
  height: 45px;
}

.box-thumb-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: #0f172a;
  color: #e5e7eb;
  font-weight: 700;
  letter-spacing: 0.5px;
}

#footer-logout {
  padding-bottom: 100px;
}
#footer-logout .site-footer {
  display: flex;
  justify-content: center;
}
#footer-logout .site-footer .container {
  display: flex;
  justify-content: center;
  gap: 20px;
}
#footer-logout .btn {
  font-weight: 600;
}
