:root {
  --stt-gold: #d4af37;
  --stt-midnight: #0c0f17;
}

.stt-admin-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 34px;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font: 13px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  z-index: 2147483000;
}
.stt-admin-bar__link {
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
}
.stt-admin-bar__link:hover { opacity: 1; text-decoration: underline; }

.stt-admin-menu {
  position: relative;
}
.stt-admin-menu > summary {
  list-style: none;
  cursor: pointer;
}
.stt-admin-menu > summary::-webkit-details-marker { display: none; }
.stt-admin-caret { opacity: 0.9; }

.stt-admin-menu__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 170px;
  padding: 6px;
  background: #111;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.35);
  display: none;
}
.stt-admin-menu[open] .stt-admin-menu__dropdown { display: block; }

.stt-admin-menu__item {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  opacity: 0.92;
}
.stt-admin-menu__item:hover {
  background: rgba(255,255,255,0.08);
  opacity: 1;
  text-decoration: none;
}

html.stt-has-admin-bar body { padding-top: 34px !important; }

/* Site header/top-bar offsets when admin bar is present */
html.stt-has-admin-bar .top-bar { top: 34px !important; }
html.stt-has-admin-bar .premium-header { top: 74px !important; } /* 40 + 34 */
html.stt-has-admin-bar .premium-header.scrolled { top: 69px !important; } /* 35 + 34 */

.stt-edit-fab {
  position: fixed;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.15);
  background: var(--stt-gold);
  color: #111;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  cursor: pointer;
  z-index: 2147483001;
}
.stt-edit-fab:hover { filter: brightness(0.98); }
.stt-edit-fab svg { width: 18px; height: 18px; }

.stt-edit-highlight {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(212, 175, 55, 0.95);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
  pointer-events: none;
  display: none;
  z-index: 2147483000;
}

.stt-edit-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2147483001;
}

.stt-edit-badge {
  position: fixed;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.15);
  background: var(--stt-gold);
  color: #111;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
  cursor: pointer;
  pointer-events: auto;
}
.stt-edit-badge:hover { filter: brightness(0.98); }
.stt-edit-badge svg { width: 16px; height: 16px; }

.stt-editor-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2147483002;
}
.stt-editor-modal {
  width: min(900px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  border: 1px solid rgba(0,0,0,0.08);
}
.stt-editor-modal__header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stt-editor-modal__title { font: 700 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
.stt-editor-modal__body { padding: 16px; }
.stt-editor-modal__footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(0,0,0,0.08);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.stt-btn {
  appearance: none;
  border: 1px solid rgba(0,0,0,0.18);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font: 600 13px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  cursor: pointer;
}
.stt-btn:hover { background: rgba(0,0,0,0.03); }
.stt-btn--primary {
  background: var(--stt-gold);
  border-color: rgba(0,0,0,0.15);
}
.stt-btn--primary:hover { filter: brightness(0.98); }
.stt-btn--danger { background: #ffe7e7; border-color: rgba(255,0,0,0.25); }

.stt-field label {
  display: block;
  margin-bottom: 6px;
  font: 700 12px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.stt-field textarea,
.stt-field select,
.stt-field input[type="text"] {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.18);
  padding: 10px 12px;
  font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.stt-help {
  margin-top: 8px;
  color: rgba(0,0,0,0.65);
  font: 12px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.stt-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.stt-thumb {
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.03);
  cursor: pointer;
  position: relative;
}
.stt-thumb img { width: 100%; height: 90px; object-fit: cover; display: block; }
.stt-thumb__label {
  padding: 6px 8px;
  font: 11px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: rgba(0,0,0,0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stt-thumb--selected { border-color: var(--stt-gold); }
.stt-thumb--selected::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font: 700 12px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
