:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface2: #1a1a1a;
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.14);
  --text: #f0f0f0;
  --text2: #888;
  --text3: #555;
  --accent: #e8e8e8;
  --danger: #c0392b;
  --highlight: rgba(255,255,255,0.05);
  --radius: 12px;
  --header-h: 160px;
  --font: 'DM Sans', sans-serif;
  --mono: 'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  height: 100%;
}

#app { min-height: 100vh; }

/* ─── MAX WIDTH WRAPPER ─── */
.content-wrap {
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
}

.hidden { display: none !important; }

/* ─── LOGIN ─── */
#login-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s ease;
}

.login-box {
  width: 100%; max-width: 320px; padding: 0 32px;
  display: flex; flex-direction: column; gap: 12px;
  animation: fadeUp .4s ease;
}

.login-logo {
  font-size: 40px; text-align: center; color: var(--text2);
  margin-bottom: 4px;
}

.login-box h1 {
  font-family: var(--mono); font-size: 22px; font-weight: 300;
  text-align: center; letter-spacing: 4px;
  color: var(--text); margin-bottom: 16px;
}

.login-box input {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px;
  color: var(--text); font-family: var(--font); font-size: 14px;
  outline: none; transition: border-color .2s;
}
.login-box input:focus { border-color: var(--border2); }

.login-box button {
  background: var(--text); color: var(--bg);
  border: none; border-radius: 8px; padding: 13px;
  font-family: var(--font); font-size: 14px; font-weight: 500;
  cursor: pointer; letter-spacing: 1px;
  transition: opacity .15s;
}
.login-box button:hover { opacity: .85; }

#login-err {
  font-size: 12px; color: var(--danger); text-align: center;
  min-height: 18px;
}

/* ─── HEADER ─── */
#main-header {
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 10px 12px 8px;
}

.header-right { display: flex; gap: 6px; }

.icon-btn {
  background: none; border: none; color: var(--text2);
  cursor: pointer; padding: 6px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: color .2s, background .2s;
}
.icon-btn:hover { color: var(--text); background: var(--highlight); }

/* ─── HIGHLIGHTS ─── */
#highlights-row {
  padding: 8px 0 10px;
  overflow: hidden;
  position: relative;
}

/* fade-out gradient on right — only desktop */
@media (hover: hover) {
  #highlights-row::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 60px;
    background: linear-gradient(to right, transparent, var(--bg));
    pointer-events: none;
    z-index: 2;
  }
}

#highlights-scroll {
  max-width: 1080px; margin: 0 auto;
  display: flex; gap: 0;
  padding: 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#highlights-scroll::-webkit-scrollbar { display: none; }

.highlight-item {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  width: var(--hl-item-w, 19vw);
  max-width: var(--hl-item-w, 212px);
}

.highlight-ring {
  width: var(--hl-ring-w, 17vw);
  height: var(--hl-ring-w, 17vw);
  max-width: 185px;
  max-height: 185px;
  min-width: 54px;
  min-height: 54px;
  border-radius: 50%;
  padding: 3px;
  background: var(--surface);
  border: 2px solid var(--border);
  -webkit-transition: border-color .2s;
  transition: border-color .2s;
  flex-shrink: 0;
}

.highlight-item.active .highlight-ring,
.highlight-item:hover .highlight-ring {
  border-color: var(--text2);
}

.highlight-avatar {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.highlight-avatar img { width: 100%; height: 100%; object-fit: cover; }
.highlight-avatar svg { width: 40%; height: 40%; color: var(--text3); }

.add-ring { border-style: dashed; }



.add-avatar svg { color: var(--text3); }

.highlight-item span {
  font-size: 10px; color: var(--text2);
  width: var(--hl-item-w, 19vw); max-width: var(--hl-item-w, 212px);
  overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
  text-align: center;
}
.highlight-item.active span { color: var(--text); }

/* ─── VIEW TOGGLE ─── */
.view-toggle-row {
  border-top: 1px solid var(--border);
}

.view-toggle-inner {
  max-width: 1080px; margin: 0 auto;
  display: -webkit-flex;
  display: flex;
  width: 100%;
}

.view-btn {
  flex: 1; background: none; border: none; color: var(--text3);
  padding: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1.5px solid transparent;
  transition: color .15s, border-color .15s;
}
.view-btn.active { color: var(--text); border-bottom-color: var(--text); }
.view-btn:hover { color: var(--text2); }

/* ─── GALLERY ─── */
#gallery-container {
  max-width: 1080px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
}

.grid-item {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  position: relative;
}

.grid-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .2s;
}

.grid-item:hover img { opacity: .85; }

.grid-item .item-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  transition: background .2s;
}
.grid-item:hover .item-overlay { background: rgba(0,0,0,0.15); }

/* FEED */
.gallery-feed { display: flex; flex-direction: column; }

.feed-item {
  border-bottom: 1px solid var(--border);
  animation: fadeIn .3s ease;
  padding-bottom: 16px;
  margin-bottom: 8px;
}

.feed-img-wrap {
  width: 100%; aspect-ratio: 1;
  overflow: hidden; cursor: pointer;
  background: var(--surface);
}
.feed-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .3s ease;
}
.feed-img-wrap:hover img { transform: scale(1.01); }

.feed-meta {
  padding: 4px 4px 4px 14px;
  display: flex; justify-content: space-between; align-items: center;
  min-height: 44px;
}

.feed-date {
  font-family: var(--mono); font-size: 11px; color: var(--text3);
  letter-spacing: .5px;
}

.feed-caption {
  padding: 4px 14px 12px;
  font-size: 14px; color: var(--text);
  line-height: 1.6; white-space: pre-wrap;
}

.feed-caption-btn {
  background: none; border: none; color: var(--text3);
  cursor: pointer; padding: 4px; margin-left: 4px;
  display: inline-flex; align-items: center;
  opacity: .6; transition: opacity .15s, color .15s;
  vertical-align: middle;
}
.feed-caption-btn:hover { opacity: 1; color: var(--text); }



.feed-group-tag {
  font-size: 11px; color: var(--text3);
  background: var(--surface2); border-radius: 20px;
  padding: 3px 10px;
}

/* EMPTY STATE */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 80px 20px;
  color: var(--text3);
}
.empty-icon { font-size: 40px; }
.empty-state p { font-family: var(--mono); font-size: 13px; letter-spacing: 2px; }

/* ─── LIGHTBOX ─── */
#lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s ease;
}

.lb-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(4px);
}

.lb-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  width: calc(90vh - 52px);
  max-width: calc(100vw - 120px);
  max-height: 90vh;
}

@media (max-width: 640px) {
  .lb-content {
    width: 90vw;
    max-width: 90vw;
  }
}

#lb-img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.lb-meta {
  padding: 10px 14px 12px;
  display: flex; flex-direction: column; gap: 8px;
  background: rgba(0,0,0,0.7);
}

.lb-meta-top {
  display: flex; justify-content: space-between; align-items: center;
}

#lb-date {
  font-family: var(--mono); font-size: 11px; color: var(--text3);
}

#lb-admin-controls { display: flex; gap: 8px; }

.lb-caption {
  font-size: 13px; color: var(--text2);
  line-height: 1.5; white-space: pre-wrap;
  cursor: default;
  min-height: 0;
}
.lb-caption:empty { display: none; }

/* admin: tap caption to edit */
.is-admin .lb-caption:not(:empty) {
  cursor: pointer;
  border-bottom: 1px dashed var(--border2);
  padding-bottom: 2px;
}

#lb-caption-edit {
  display: flex; flex-direction: column; gap: 6px;
}

#lb-caption-input {
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 8px; padding: 8px 10px;
  color: var(--text); font-family: var(--font); font-size: 13px;
  resize: none; outline: none; width: 100%;
  line-height: 1.5;
}
#lb-caption-input:focus { border-color: var(--text3); }

.lb-action-btn {
  display: flex; align-items: center; gap: 5px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 12px;
  color: var(--text2); font-family: var(--font); font-size: 12px;
  cursor: pointer; transition: all .15s;
}
.lb-action-btn:hover { background: var(--surface); color: var(--text); }
.lb-action-btn.danger { border-color: rgba(192,57,43,0.3); }
.lb-action-btn.danger:hover { background: var(--danger); color: #fff; }

.lb-close, .lb-prev, .lb-next {
  position: absolute; z-index: 2;
  background: rgba(0,0,0,0.5); border: 1px solid var(--border);
  border-radius: 50%; color: var(--text2);
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: rgba(255,255,255,0.1); color: var(--text);
}
.lb-close { position: fixed; top: 16px; right: 16px; z-index: 3; }
.lb-prev { left: -52px; top: 50%; transform: translateY(-50%); margin-top: -26px; }
.lb-next { right: -52px; top: 50%; transform: translateY(-50%); margin-top: -26px; }

/* Mobile: hide prev/next (swipe), overlay close inside image */
@media (max-width: 640px) {
  .lb-prev, .lb-next { display: none !important; }
  .lb-close { top: 12px; right: 12px; }
}

/* ─── ADMIN PANEL (bottom sheet) ─── */
#admin-panel {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease;
}

.panel-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
}

.panel-sheet {
  position: relative; z-index: 1;
  width: 100%; max-width: 1080px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border);
  padding: 8px 20px 40px;
  max-height: 90vh; overflow-y: auto;
  animation: slideUp .3s ease;
  scrollbar-width: none;
}

.panel-handle {
  width: 36px; height: 3px; border-radius: 2px;
  background: var(--border2); margin: 10px auto 20px;
}

.panel-sheet h2 {
  font-family: var(--mono); font-size: 13px; font-weight: 300;
  letter-spacing: 2px; color: var(--text2);
  margin-bottom: 16px;
}

.panel-sheet hr {
  border: none; border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* UPLOAD DROP ZONE */
#upload-drop-zone {
  border: 1.5px dashed var(--border2);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text3);
}
#upload-drop-zone:hover, #upload-drop-zone.drag-over {
  border-color: var(--text2); color: var(--text2);
  background: var(--highlight);
}
#upload-drop-zone p { font-size: 14px; }
#upload-drop-zone span { font-size: 11px; font-family: var(--mono); }

#file-input { display: none; }

/* UPLOAD PREVIEW */
#upload-preview-list {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px; margin-top: 12px;
}

.preview-thumb {
  aspect-ratio: 1; border-radius: 6px;
  overflow: hidden; position: relative;
  background: var(--surface2);
}
.preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
  position: absolute; top: 3px; right: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,0.7); border: none; color: #fff;
  font-size: 11px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

/* UPLOAD OPTIONS */
.upload-group-row {
  display: flex; align-items: center; gap: 12px; margin-top: 16px;
}
.upload-group-row label { font-size: 12px; color: var(--text3); white-space: nowrap; }
.upload-group-row select {
  flex: 1; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px;
  color: var(--text); font-family: var(--font); font-size: 13px;
  outline: none;
}

.primary-btn {
  width: 100%; margin-top: 12px;
  background: var(--text); color: var(--bg);
  border: none; border-radius: 10px; padding: 14px;
  font-family: var(--font); font-size: 14px; font-weight: 500;
  cursor: pointer; letter-spacing: .5px;
  transition: opacity .15s;
}
.primary-btn:disabled { opacity: .3; cursor: default; }
.primary-btn:not(:disabled):hover { opacity: .85; }

/* PROGRESS */
#upload-progress { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.prog-bar { height: 2px; background: var(--surface2); border-radius: 2px; overflow: hidden; }
#prog-fill { height: 100%; background: var(--text); width: 0%; transition: width .3s; }
#prog-label { font-family: var(--mono); font-size: 11px; color: var(--text3); text-align: right; }

/* GROUPS LIST */
#groups-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.group-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--surface2);
  border-radius: 10px;
  cursor: grab; transition: opacity .15s, background .15s;
  user-select: none;
}
.group-row.dragging { opacity: .4; }
.group-row.drag-over { background: var(--highlight); outline: 1px solid var(--border2); }

.group-row-drag {
  color: var(--text3); font-size: 16px; cursor: grab;
  padding: 0 2px; letter-spacing: -1px;
  flex-shrink: 0;
}

.group-row-thumb {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg); overflow: hidden; flex-shrink: 0;
  cursor: pointer; position: relative;
  border: 1px solid var(--border);
  transition: border-color .15s;
}
.group-row-thumb:hover { border-color: var(--text3); }
.group-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.group-row-thumb .thumb-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text3);
}
.group-row-name { flex: 1; font-size: 13px; }
.group-row-count { font-size: 11px; color: var(--text3); font-family: var(--mono); }
.group-row-del {
  background: none; border: none; color: var(--text3);
  cursor: pointer; padding: 4px; font-size: 16px;
  transition: color .15s; flex-shrink: 0;
}
.group-row-del:hover { color: var(--danger); }

/* empty group in highlights — dim ring */
.hl-empty .highlight-ring { opacity: .45; border-style: dashed; }
.hl-empty span { opacity: .5; }

/* ─── COVER PICKER ─── */
#cover-picker-overlay {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: flex-end; justify-content: center;
}
.cover-picker-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.7);
}
.cover-picker-sheet {
  position: relative; z-index: 1;
  width: 100%; max-width: 600px;
  background: var(--surface); border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border);
  padding: 16px 16px 40px;
  max-height: 80vh; display: flex; flex-direction: column; gap: 12px;
  animation: slideUp .25s ease;
}
.cover-picker-title {
  font-size: 12px; color: var(--text3);
  font-family: var(--mono); letter-spacing: 1px; flex-shrink: 0;
}
.cover-picker-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px; overflow-y: auto; flex: 1;
}
.cover-thumb {
  aspect-ratio: 1; border-radius: 6px; overflow: hidden;
  cursor: pointer; opacity: .75; transition: opacity .15s;
  border: 2px solid transparent;
}
.cover-thumb:hover { opacity: 1; }
.cover-thumb.selected { border-color: var(--text); opacity: 1; }
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-picker-actions {
  display: flex; gap: 8px; flex-shrink: 0;
}
.cover-picker-actions .lb-action-btn { cursor: pointer; flex: 1; justify-content: center; }

.new-group-row {
  display: flex; gap: 8px;
}
.new-group-row input {
  flex: 1; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
  color: var(--text); font-family: var(--font); font-size: 13px; outline: none;
}
.new-group-row input:focus { border-color: var(--border2); }

.small-btn {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px;
  color: var(--text2); font-family: var(--font); font-size: 13px;
  cursor: pointer; white-space: nowrap; transition: all .15s;
}
.small-btn:hover { color: var(--text); border-color: var(--border2); }

/* ─── GROUP PICKER ─── */
#group-picker {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease;
}
.picker-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.6);
}
.picker-sheet {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px;
  background: var(--surface);
  border-radius: 20px 20px 0 0; padding: 20px 20px 40px;
  animation: slideUp .25s ease;
}
.picker-sheet p { font-size: 12px; color: var(--text3); margin-bottom: 14px; font-family: var(--mono); letter-spacing: 1px; }
#picker-groups-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.picker-group-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px; cursor: pointer;
  background: var(--surface2); transition: background .15s;
}
.picker-group-item:hover { background: var(--highlight); }
.picker-group-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg); overflow: hidden;
}
.picker-group-avatar img { width: 100%; height: 100%; object-fit: cover; }
.picker-group-name { font-size: 14px; }
.picker-empty {
  font-size: 12px; color: var(--text3);
  text-align: center; padding: 12px 0;
  font-family: var(--mono);
}

.picker-create-row {
  display: flex; gap: 8px; margin-bottom: 12px;
}

.picker-new-input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
  color: var(--text); font-family: var(--font); font-size: 13px; outline: none;
}
.picker-new-input:focus { border-color: var(--border2); }

.picker-cancel {
  width: 100%; background: none; border: 1px solid var(--border);
  border-radius: 10px; padding: 12px;
  color: var(--text2); font-family: var(--font); font-size: 14px;
  cursor: pointer; transition: all .15s;
}
.picker-cancel:hover { background: var(--highlight); color: var(--text); }

/* ─── CAPTION MODAL ─── */
#caption-modal {
  position: fixed; inset: 0; z-index: 450;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease;
}
.caption-modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.6);
}
.caption-modal-sheet {
  position: relative; z-index: 1;
  width: 100%; max-width: 600px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border);
  padding: 8px 20px 40px;
  animation: slideUp .25s ease;
}
.caption-modal-title {
  font-family: var(--mono); font-size: 12px; color: var(--text3);
  letter-spacing: 1px; margin-bottom: 12px;
}
#caption-modal-input {
  width: 100%;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 10px; padding: 12px 14px;
  color: var(--text); font-family: var(--font); font-size: 14px;
  resize: none; outline: none; line-height: 1.6;
  min-height: 90px;
}
#caption-modal-input:focus { border-color: var(--text3); }
.caption-modal-actions {
  display: flex; gap: 8px; margin-top: 12px;
}
.caption-modal-actions .primary-btn { flex: 1; margin-top: 0; }
.caption-modal-actions .small-btn { flex-shrink: 0; }

/* ─── ANIMATIONS ─── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

.grid-item { animation: fadeIn .25s ease; }

/* ─── GROUP BADGES ─── */
.grid-badges {
  position: absolute; bottom: 5px; right: 5px;
  display: flex; gap: 3px; flex-wrap: wrap-reverse;
  justify-content: flex-end;
  max-width: 85%;
  pointer-events: none;
}

.grid-badge {
  border-radius: 50%;
  border: 2.5px solid;
  background-size: cover; background-position: center;
  background-color: var(--surface2);
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.feed-badge-none {
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px dashed var(--border2);
  opacity: .4;
}
.feed-item { animation: fadeIn .25s ease; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 0; height: 0; }
* { scrollbar-width: none; -ms-overflow-style: none; }

/* ─── LIGHTBOX ICON BUTTONS ─── */
.lb-meta-right {
  display: flex; align-items: center; gap: 4px;
}
#lb-admin-controls {
  display: flex; align-items: center; gap: 4px;
}
.lb-icon-btn {
  background: none; border: none;
  cursor: pointer; padding: 10px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .lb-icon-btn { color: var(--text3); }
  .lb-icon-btn:hover { color: var(--text); background: var(--highlight); }
  .lb-icon-btn.danger:hover { color: var(--danger); }
}

@media (hover: none) {
  .lb-icon-btn { color: var(--text); }
  .lb-icon-btn.danger { color: var(--text); }
}

/* ─── PRICE PILL ─── */
.price-pill {
  display: inline-block;
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.price-pill-grid {
  position: absolute; bottom: 6px; left: 6px;
  font-size: 11px; padding: 2px 8px;
}

/* ─── DELETE MODAL ─── */
.delete-modal-text {
  font-size: 13px; color: var(--text3);
  margin-bottom: 16px;
}
.danger-btn {
  background: var(--danger) !important;
  color: #fff !important;
}

/* ─── PRICE INPUT ─── */
.price-input-wrap {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
}
.price-input-wrap input {
  flex: 1;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 10px; padding: 12px 14px;
  color: var(--text); font-family: var(--mono); font-size: 20px;
  outline: none; text-align: right;
}
.price-input-wrap input:focus { border-color: var(--text3); }
.price-currency {
  font-family: var(--mono); font-size: 24px; color: var(--text2);
}

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface); border: 1px solid var(--border2);
  color: var(--text); font-size: 13px; padding: 10px 20px;
  border-radius: 20px; z-index: 9999;
  opacity: 0; transition: all .25s ease; pointer-events: none;
  white-space: nowrap;
}
.toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── PRICE & DELETE MODALS positioning ─── */
#price-modal,
#delete-modal {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease;
}
#price-modal .caption-modal-backdrop,
#delete-modal .caption-modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.7);
}
#price-modal .caption-modal-sheet,
#delete-modal .caption-modal-sheet {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px;
}

/* ─── SHARE OVERLAY BUTTON ─── */
.lb-share-overlay {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(0,0,0,0.55);
  border: none;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.1);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.lb-share-overlay.visible {
  opacity: 1; pointer-events: auto;
}
.lb-share-overlay:hover { background: rgba(0,0,0,0.75); }

/* ─── LIGHTBOX PRICE PILL ─── */
.lb-price-pill {
  position: absolute;
  bottom: 52px;
  left: 12px;
  z-index: 3;
  font-size: 14px;
  padding: 4px 12px;
  pointer-events: none;
}

/* ─── FEED ACTION BAR ─── */
.feed-actions { display: flex; gap: 2px; }
.feed-action-btn {
  background: none; border: none;
  cursor: pointer; padding: 10px 14px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}

/* Desktop — grey until hover */
@media (hover: hover) {
  .feed-action-btn { color: var(--text3); }
  .feed-action-btn:hover { color: var(--text); background: var(--highlight); }
  .feed-action-btn.danger:hover { color: var(--danger); }
}

/* Touch — always bright */
@media (hover: none) {
  .feed-action-btn { color: var(--text); }
  .feed-action-btn.danger { color: var(--text); }
}
