body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 1rem;
  background-color: #fdfdfd;
  color: #111;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}
p {
  margin: 1rem 0;
}
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}
.navbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px) minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  background: #fdfdfd;
  z-index: 10;
}
.navbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}
.navbar-wordmark {
  font-weight: 700;
  font-size: 1.1rem;
  color: #111;
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  white-space: nowrap;
}
.navbar-link:hover {
  color: #111;
}
.navbar-link.active {
  color: #111;
}
.navbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  min-width: 0;
}
.navbar-page-bar {
  padding: 1.5rem 2rem 0;
}
.navbar-page-bar:empty {
  padding: 0;
}
.navbar-page-bar .topbar {
  margin-bottom: 1.25rem;
}
.main-content-body {
  padding: 1.5rem 2rem;
}
@media (max-width: 800px) {
  .navbar-page-bar {
    padding: 1rem 1rem 0;
  }
  .main-content-body {
    padding: 1rem;
  }
}
@media (max-width: 767px) {
  .navbar {
    grid-template-columns: minmax(0, max-content) minmax(0, 1fr) minmax(0, max-content);
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }
  .navbar-left {
    gap: 0.5rem;
  }
  .navbar-link {
    display: none;
  }
  .navbar-create-label {
    display: none;
  }
  .navbar-right {
    gap: 0.35rem;
  }
}
.gallery {
  column-width: 180px;
  column-count: 5;
  column-gap: 0;
  width: 100%;
}
@media (max-width: 1100px) {
  .gallery {
    column-count: 4;
  }
}
@media (max-width: 860px) {
  .gallery {
    column-count: 3;
  }
}
@media (max-width: 620px) {
  .gallery {
    column-count: 2;
  }
}
@media (max-width: 420px) {
  .gallery {
    column-count: 1;
  }
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.skeleton-gallery {
  column-width: 180px;
  column-count: 5;
  column-gap: 0;
  width: 100%;
}
@media (max-width: 1100px) {
  .skeleton-gallery {
    column-count: 4;
  }
}
@media (max-width: 860px) {
  .skeleton-gallery {
    column-count: 3;
  }
}
@media (max-width: 620px) {
  .skeleton-gallery {
    column-count: 2;
  }
}
@media (max-width: 420px) {
  .skeleton-gallery {
    column-count: 1;
  }
}
.skeleton-tile {
  break-inside: avoid;
  margin: 0 0.4rem 0.8rem;
  border-radius: 8px;
  background: #e8e8e8;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.skeleton-card {
  aspect-ratio: 1;
  border-radius: 12px;
  background: #e8e8e8;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-text {
  max-width: 640px;
}
.skeleton-line {
  height: 0.9rem;
  border-radius: 6px;
  background: #e8e8e8;
  margin-bottom: 0.75rem;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}




.gallery img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.gallery figure:hover img {
  transform: scale(1.05);
}
.photo-card-actions {
  display: flex;
  justify-content: flex-end;
  padding: 6px 6px 0;
}
.photo-card-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: none;
  color: #666;
  cursor: pointer;
}
.photo-card-actions button:hover {
  background: #f0f0f0;
  color: #111;
}
.photo-card-actions button.active {
  color: #e74c3c;
}
.photo-card-actions button .material-symbols-outlined {
  font-size: 18px;
}
.gallery figure.interaction-skipped {
  opacity: 0.35;
  pointer-events: none;
}


table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  padding-bottom: 8px;
  border-bottom: 1px solid #ccc;
}

tbody td {
  padding: 8px 0;
  font-size: 0.9em;
}

tbody tr:not(:last-child) {
  border-bottom: 1px solid #eee;
}

tbody tr:hover {
  background-color: #f9f9f9;
}

td:last-child {
  text-align: right;
}

.modal-overlay {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, background 0.18s ease;
}
.modal-overlay.active {
  opacity: 1;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}
.modal-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.96) translateY(8px);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e0e0e0;
}
.modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  line-height: 1;
}
.modal-close:hover {
  color: #333;
}
.modal-body {
  padding: 1.25rem;
}
.modal-body label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #555;
}
.modal-body select,
.modal-body input[type="text"] {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-family: inherit;
  box-sizing: border-box;
}
.modal-body select:focus,
.modal-body input[type="text"]:focus {
  outline: none;
  border-color: #0066cc;
}

.board-visibility {
  align-items: center;
  color: #666;
  font-size: 0.9rem;
  margin: 0;
  gap: 3px;
}

.create-board-form {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.create-board-form div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.create-board-form label {
  font-size: 0.85rem;
  color: #555;
}
.create-board-form input,
.create-board-form select {
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.inline-form {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.actions-cell {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.gallery figure {
  break-inside: avoid;
  margin: 0 0.4rem 0.8rem;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eee;
}
.gallery figure .photo-card-media {
  border-radius: 0;
  overflow: hidden;
}

.download-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0066cc;
  color: #fff;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
}
.download-btn:hover {
  background: #0055aa;
}
.photo-detail-image {
  position: relative;
}


.photo-tags-preview {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  overflow: hidden;
  max-height: 1.6rem;
  pointer-events: none;
}

.photo-card-media {
  position: relative;
  display: block;
}
.match-region-box {
  position: absolute;
  border: 2px solid #ffcc00;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.photo-tags-preview span {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-modal-content {
  max-width: 600px;
}
.photo-modal-content img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  background: #f0f0f0;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.photo-modal-content textarea,
.photo-modal-content input[type="text"] {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-family: inherit;
  box-sizing: border-box;
}
.photo-modal-content textarea:focus,
.photo-modal-content input[type="text"]:focus {
  outline: none;
  border-color: #0066cc;
}
.photo-modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.photo-modal-actions button {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.photo-modal-actions button[type="submit"] {
  background: #1e66f5;
  color: #fff;
}
.photo-modal-actions button[type="submit"]:hover {
  background: #0055aa;
}

.cq-crop-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1100;
}
.cq-crop-modal {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  width: 90%;
  max-width: 640px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cq-crop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e5e5;
}
.cq-crop-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}
.cq-crop-frame-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.cq-crop-frame {
  position: relative;
  display: grid;
  width: fit-content;
  max-width: 100%;
  max-height: 100%;
  touch-action: none;
  user-select: none;
}
.cq-crop-image {
  grid-area: 1 / 1;
  max-width: 100%;
  max-height: min(70vh, 60vh);
  display: block;
  pointer-events: none;
  user-select: none;
}
.cq-crop-box {
  position: absolute;
  border: 2px solid #111;
  background: rgba(0, 0, 0, 0.1);
  cursor: move;
  touch-action: none;
}
.cq-crop-preset-preview {
  position: absolute;
  border: 2px dashed #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 4px;
  pointer-events: none;
}
.cq-crop-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #e5e5e5;
  flex-shrink: 0;
  max-height: 5.5rem;
  overflow-y: auto;
}
.cq-crop-preset-chip {
  padding: 0.35rem 0.7rem;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  background: #fafafa;
  color: #333;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.cq-crop-preset-chip:hover {
  background: #f0f0f0;
  border-color: #999;
}
.cq-crop-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #111;
  border: 2px solid #fff;
  border-radius: 50%;
  touch-action: none;
}
.cq-crop-handle-nw { top: -8px; left: -8px; cursor: nwse-resize; }
.cq-crop-handle-ne { top: -8px; right: -8px; cursor: nesw-resize; }
.cq-crop-handle-sw { bottom: -8px; left: -8px; cursor: nesw-resize; }
.cq-crop-handle-se { bottom: -8px; right: -8px; cursor: nwse-resize; }
.cq-crop-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 1rem 1.25rem;
  border-top: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.discover-photo-info {
  margin-bottom: 1rem;
}
.discover-photo-info p {
  margin: 0 0 0.5rem;
  color: #333;
}
.discover-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.discover-tag {
  background: #e0e0e0;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #555;
}
.no-tags {
  color: #999;
  font-size: 0.85rem;
}
.discover-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.discover-actions button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-like {
  background: #fee2e2;
  color: #dc2626;
}
.btn-like:hover {
  background: #fecaca;
}
.btn-skip {
  background: #e5e5e5;
  color: #666;
}
.btn-skip:hover {
  background: #d4d4d4;
}
.discover-save {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}
.discover-save label {
  font-size: 0.85rem;
  color: #555;
  white-space: nowrap;
}
.discover-save select {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.discover-save button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}
.discover-save button:hover {
  background: #0055aa;
}

.board-header {
  padding: 0 0 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #e5e5e5;
}
.board-header-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
}
.board-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #666;
}
.board-header-visibility {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.board-header-visibility .material-symbols-outlined {
  font-size: 0.95rem !important;
}
.board-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #e5e5e5;
}
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #666;
  font-size: 0.9rem;
  min-width: 0;
}
.topbar-breadcrumb .material-symbols-outlined {
  color: #999;
  font-size: 1.05rem !important;
}
.topbar-breadcrumb-sep {
  font-size: 0.9rem !important;
  color: #ccc;
}
.topbar-breadcrumb-current {
  color: #111;
  font-weight: 600;
  font-size: 1.05rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.discover-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.5rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  background: #fff;
  color: #444;
  font-size: 0.82rem;
  cursor: pointer;
  flex: none;
}
.discover-refresh-btn:hover {
  background: #f5f5f5;
  color: #111;
}
.discover-refresh-btn .material-symbols-outlined {
  font-size: 1rem !important;
  color: inherit;
  transition: transform 0.4s ease;
}
.discover-refresh-btn.is-refreshing .material-symbols-outlined {
  transform: rotate(360deg);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 0;
}
.navbar-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0.35rem 0.4rem 0.35rem 0.9rem;
  border: 1px solid #e2e2e2;
  border-radius: 999px;
  background: #f5f5f5;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}


@keyframes cq-search-spin {
  to { transform: rotate(360deg); }
}
.navbar-search:focus-within {
  background: #fff;
  border-color: #b3d1ff;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}
.navbar-search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}
.navbar-search-form > .material-symbols-outlined {
  color: #999;
  flex-shrink: 0;
}
.navbar-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  font-size: 0.9rem;
  color: #111;
}
.navbar-search-color-chip {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e2e2e2;
  flex-shrink: 0;
}
.navbar-search-trigger {
  position: absolute;
  width: 0;
  height: 0;
  padding: 0;
  border: none;
  opacity: 0;
  pointer-events: none;
}
.navbar-search-panel {
  width: min(420px, 90vw);
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.navbar-search-panel-section {
  padding: 0.4rem 0;
}
.navbar-search-panel-section + .navbar-search-panel-section {
  border-top: 1px solid #eee;
}
.navbar-scope-heading {
  padding: 0.4rem 0.6rem 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #999;
}
.navbar-scope-row-group {
  max-height: 160px;
  overflow-y: auto;
}
.navbar-scope-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 400;
  color: #333;
  cursor: pointer;
}
.navbar-scope-row:hover {
  background: #f5f5f5;
}
.navbar-image-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-direction: column;
  text-align: center;
  margin: 0 0.6rem;
  padding: 1.25rem 1rem;
  border: 1.5px dashed #d0d0d0;
  border-radius: 10px;
  color: #666;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.navbar-image-dropzone .material-symbols-outlined {
  font-size: 1.5rem !important;
  color: #999;
}
.navbar-image-dropzone p {
  margin: 0;
  font-size: 0.85rem;
}
.navbar-image-dropzone:hover,
.navbar-image-dropzone.is-dragover {
  border-color: #999;
  background: #fafafa;
}
.navbar-color-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0.6rem;
}
.navbar-color-swatch-input {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.navbar-color-hex {
  flex: 1;
  min-width: 0;
}
.search-chip-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.search-image-chip {
  position: relative;
  display: flex;
  align-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.search-image-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.search-image-chip-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #333;
  color: #fff;
  cursor: pointer;
}
.search-image-chip-remove .material-symbols-outlined {
  font-size: 0.7rem !important;
}
.topbar-search-tools {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}
.topbar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  background: none;
  color: #555;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.topbar-icon-btn:hover {
  background: #f2f2f2;
  border-color: #e5e5e5;
  color: #111;
}
.topbar-icon-btn.active {
  background: #eaf2ff;
  border-color: #cfe2ff;
  color: #0066cc;
}
.topbar-icon-btn-danger:hover {
  background: #fdeded;
  border-color: #f6c9c9;
  color: #dc2626;
}
.topbar-divider,
.topbar-spacer {
  width: 1px;
  height: 22px;
  background: #e5e5e5;
  margin: 0 0.35rem;
}
.topbar-text-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #333;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.topbar-text-btn:hover {
  background: #f2f2f2;
  border-color: #e5e5e5;
}

.discover-search {
  margin-bottom: 1.5rem;
}
.search-form {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
}
.search-input-wrapper input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
}
.search-input-wrapper .material-symbols-outlined {
  color: #666;
}
.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.color-picker-wrapper label {
  font-size: 0.85rem;
  color: #555;
}
.color-picker-wrapper input[type="color"] {
  width: 36px;
  height: 36px;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  padding: 2px;
}
.clear-color {
  font-size: 0.8rem;
  color: #666;
}
.search-form button {
  padding: 0.5rem 1.25rem;
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}
.search-form button:hover {
  background: #0055aa;
}
.search-results-info {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #666;
}
.color-indicator {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  vertical-align: middle;
  border: 1px solid #ccc;
}

.photo-detail-page {
  max-width: 1200px;
  margin: 0 auto;
}
.photo-detail-nav {
  margin-bottom: 1rem;
}
.photo-detail-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
}
@media (max-width: 800px) {
  .photo-detail-content {
    grid-template-columns: 1fr;
  }
}
.photo-detail-image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-detail-image-frame {
  position: relative;
  display: grid;
}
.photo-detail-image-frame img {
  grid-area: 1 / 1;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}
.photo-detail-image.sensitive-blurred img {
  filter: blur(32px);
}
.photo-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.photo-detail-actions-row {
  display: flex;
  gap: 0.5rem;
}
.photo-detail-section h2 {
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem;
}
.photo-detail-section p {
  margin: 0;
  color: #333;
}
.photo-detail-colors {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.color-swatch:hover {
  transform: scale(1.1);
}
.photo-meta {
  font-size: 0.9rem;
  color: #666;
}
.photo-detail-actions {
  display: flex;
  gap: 0.75rem;
}

.hidden {
  display: none !important;
}

.bulk-toolbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.bulk-toolbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.selected-count {
  font-size: 0.9rem;
  color: #666;
}
.bulk-toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.btn-bulk {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #333;
  transition: background 0.15s ease;
}
.btn-bulk:hover {
  background: #e5e5e5;
}
.btn-bulk-danger {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}
.btn-bulk-danger:hover {
  background: #fecaca;
}
.btn-bulk-cancel {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: #666;
}
.btn-bulk-cancel:hover {
  color: #333;
}
.btn-select-all {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}
.btn-select-all:hover {
  background: #0055aa;
}
.btn-select-mode {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  color: #666;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.btn-select-mode:hover {
  background: #f5f5f5;
  color: #333;
}
.photo-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
}
.photo-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #0066cc;
}
.gallery figure {
  position: relative;
}
.gallery figure.selected {
  outline: 3px solid #0066cc;
  outline-offset: -3px;
}
.gallery figure.selected::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 102, 204, 0.15);
  pointer-events: none;
}
.gallery figure.sensitive-blurred img {
  filter: blur(24px) !important;
}
.sensitive-reveal-btn {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  height: 100%;
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
.sensitive-reveal-btn:hover {
  background: rgba(0, 0, 0, 0.5);
}

.settings-page {
  max-width: 760px;
}
.settings-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e0e0e0;
  flex-shrink: 0;
}
.settings-avatar-preview-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #aaa;
}

.profile-page {
  max-width: 900px;
}
.profile-header {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}
.profile-avatar img {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
}
.profile-avatar .avatar-large {
  width: 128px;
  height: 128px;
}
.profile-avatar .avatar-empty {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 3px solid #e0e0e0;
  background: #f0f0f0;
  color: #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-avatar .avatar-empty .material-symbols-outlined {
  font-size: 3rem !important;
}
.profile-info {
  flex: 1;
}
.profile-name {
  font-size: 1.75rem;
  margin: 0 0 0.25rem;
}
.profile-username {
  font-size: 1rem;
  color: #666;
  margin: 0 0 0.5rem;
}
.profile-pronouns {
  font-size: 0.9rem;
  color: #666;
  margin: 0 0 0.75rem;
}
.profile-bio {
  font-size: 1rem;
  color: #333;
  margin: 0;
  white-space: pre-wrap;
}
.profile-boards h2 {
  font-size: 0.8rem;
  font-weight: 600;
  
  color: #666;
  letter-spacing: 0.05em;
  margin: 0 0 1rem;
}
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.board-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 4rem 1.5rem;
  color: #666;
}
.board-empty-state .material-symbols-outlined {
  font-size: 2.5rem !important;
  color: #ccc;
  margin-bottom: 0.5rem;
}
.board-empty-state h2 {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
}
.board-empty-state p {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}
.board-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: visible;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.board-card > .board-preview {
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.board-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.board-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 1;
  background: #e0e0e0;
}
.board-preview-thumb {
  background-size: cover;
  background-position: center;
  background-color: #f0f0f0;
}
.board-preview-empty {
  background: #e8e8e8;
}
.board-preview-empty-full {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8e8e8;
  color: #aaa;
}
.board-preview-empty-full .material-symbols-outlined {
  font-size: 3rem !important;
}
.board-card-info {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.board-card-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.board-card-name {
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-card-count {
  font-size: 0.8rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.board-preview-thumb-sensitive {
  filter: blur(16px);
}
.board-card-menu-panel {
  position: absolute;
  top: 2.75rem;
  right: 0.75rem;
  z-index: 20;
  background: var(--color-popover, #fff);
  color: var(--color-popover-foreground, #111);
  border: 1px solid var(--color-border, #e5e5e5);
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  padding: 0.25rem;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.board-card-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.375rem 0.5rem;
  background: none;
  border: none;
  border-radius: var(--radius-sm, 6px);
  cursor: default;
  font-size: 0.875rem;
  color: inherit;
  text-align: left;
}
.board-card-menu-item .material-symbols-outlined {
  font-size: 1rem !important;
  color: var(--color-muted-foreground, #737373);
}
.board-card-menu-item:hover {
  background: var(--color-accent, #f2f2f2);
  color: var(--color-accent-foreground, inherit);
}
.board-card-menu-item-danger {
  color: var(--color-destructive, #dc2626);
}
.board-card-menu-item-danger:hover {
  background: var(--color-destructive, #dc2626);
  color: var(--color-destructive-foreground, #fff);
}
.board-card-menu-item-danger:hover .material-symbols-outlined {
  color: inherit;
}
.board-card-menu-separator {
  margin: 0.25rem -0.25rem;
  border-top: 1px solid var(--color-border, #e5e5e5);
}
.board-card-menu-form {
  padding: 0 0.6rem 0.1rem;
}
.board-card-menu-select {
  margin: 0.15rem 0;
}
.photo-card-menu-panel {
  position: fixed;
  top: auto;
  right: auto;
  width: 200px;
  min-width: 0;
}
a.board-card-menu-item {
  text-decoration: none;
}
.dashboard-summary {
  font-size: 0.85rem;
  color: #666;
}
.no-content {
  color: #666;
  font-size: 0.95rem;
}
.storage-summary {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.storage-summary-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.storage-summary-value {
  font-size: 1.5rem;
  font-weight: 600;
}
.storage-summary-label {
  font-size: 0.8rem;
  color: #666;
}
@media (max-width: 600px) {
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  .board-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

a .material-symbols-outlined {
  text-decoration: none;
}

.hidden {
  display:none;
}
