html { scroll-behavior: smooth; }
body { min-width: 320px; }
.glass { background: rgba(255,255,255,.78); backdrop-filter: blur(10px); }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: translateY(0); }
.hero-grid {
  background-image:
    radial-gradient(circle at 15% 20%, rgba(197,160,89,.22), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(255,255,255,.12), transparent 40%),
    radial-gradient(circle at 75% 80%, rgba(197,160,89,.16), transparent 50%);
}
#progress { transform-origin: left; transform: scaleX(0); }
.teamBulletActive { background: var(--gold, #ab7d45) !important; }
.site-editor-toolbar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(720px, calc(100% - 24px));
  transform: translateX(-50%);
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  padding: 10px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
  backdrop-filter: blur(12px);
  color: #0f172a;
}
.site-editor-toolbar > div { flex: 1; min-width: 0; }
.site-editor-toolbar strong,
.site-editor-toolbar span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-editor-toolbar span { color: #64748b; font-size: 12px; }
.site-editor-toggle,
.site-editor-link,
.site-editor-primary,
.site-editor-secondary,
.site-editor-close,
.site-edit-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}
.site-editor-toggle,
.site-editor-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 700;
}
.site-editor-toggle { background: #0f172a; color: #fff; }
.site-editor-link { background: #f1f5f9; color: #0f172a; }
.site-edit-section { position: relative; }
.site-edit-button {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 45;
  display: none;
  height: 42px;
  width: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #c5a059;
  color: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .22);
}
body.site-editing .site-edit-button { display: inline-flex; }
body.site-editing .site-edit-section { outline: 2px dashed rgba(197, 160, 89, .65); outline-offset: -2px; }
.site-editor-modal { display: none; position: fixed; inset: 0; z-index: 100; }
.site-editor-modal.is-open { display: block; }
.site-editor-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .62); }
.site-editor-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(620px, 100%);
  overflow-y: auto;
  background: #fff;
  color: #0f172a;
  box-shadow: -24px 0 60px rgba(15, 23, 42, .24);
}
.site-editor-panel header,
.site-editor-panel footer {
  position: sticky;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  padding: 18px;
}
.site-editor-panel header { top: 0; border-bottom: 1px solid #e2e8f0; }
.site-editor-panel footer { bottom: 0; border-top: 1px solid #e2e8f0; }
.site-editor-panel h2 { margin: 0; font-size: 20px; font-weight: 800; }
.site-editor-panel p { margin: 4px 0 0; color: #64748b; font-size: 13px; }
.site-editor-close {
  display: grid;
  height: 40px;
  width: 40px;
  place-items: center;
  border-radius: 8px;
  background: #f1f5f9;
}
.site-editor-form { padding: 18px; }
.site-editor-field { display: grid; gap: 8px; margin-bottom: 16px; font-weight: 700; }
.site-editor-field input,
.site-editor-field textarea,
.site-editor-field select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  font-weight: 400;
  outline: none;
}
.site-editor-field textarea { min-height: 130px; resize: vertical; }
.site-editor-field textarea.is-code { min-height: 220px; font-family: Consolas, Monaco, monospace; font-size: 13px; }
.site-editor-check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.site-editor-check input { width: auto; }
.site-editor-primary,
.site-editor-secondary {
  border-radius: 8px;
  padding: 11px 14px;
  font-weight: 800;
}
.site-editor-primary { background: #c5a059; color: #fff; }
.site-editor-secondary { background: #f1f5f9; color: #0f172a; }
.site-editor-toast {
  position: fixed;
  right: 16px;
  top: 84px;
  z-index: 95;
  max-width: min(380px, calc(100% - 32px));
  border-radius: 8px;
  background: #dcfce7;
  color: #166534;
  padding: 12px 14px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .18);
  font-weight: 700;
}
.site-editor-toast.is-error { background: #fee2e2; color: #991b1b; }
@media (max-width: 640px) {
  .site-editor-toolbar { align-items: stretch; flex-wrap: wrap; }
  .site-editor-toolbar > div { flex-basis: 100%; }
  .site-editor-toggle,
  .site-editor-toolbar form { flex: 1; }
  .site-editor-link { width: 100%; }
}

.psme-edit-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 50;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(200, 200, 200, .2);
  backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  cursor: pointer;
  color: inherit;
}
.psme-edit-btn:hover { transform: translateY(-1px); }
body.site-editing .psme-edit-btn { display: grid; }
body.site-editing .site-edit-section { outline: 2px dashed rgba(197, 160, 89, .65); outline-offset: -2px; }

.psme-modal { display: none; }
.psme-modal.open { display: block; }
.psme-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 9998; }
.psme-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: min(860px, 94vw);
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  z-index: 9999;
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
  color: #0f172a;
}
.psme-head { padding: 14px 16px; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; gap: 12px; }
.psme-title { font-weight: 800; font-size: 15px; }
.psme-close { margin-left: auto; border: none; background: transparent; font-size: 26px; cursor: pointer; line-height: 1; }
.psme-body { padding: 16px; }
.psme-foot { padding: 14px 16px; border-top: 1px solid #e2e8f0; display: flex; justify-content: flex-end; gap: 10px; }

.psme-row { border: 1px solid #e2e8f0; border-radius: 14px; padding: 12px; margin-bottom: 12px; background: #fff; }
.psme-rowhead { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.psme-label { font-weight: 700; }
.psme-small { font-size: 12px; color: #64748b; margin-top: 6px; }
.psme-input,
.psme-textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
}
.psme-textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.psme-actions { display: flex; gap: 8px; align-items: center; }
.psme-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  color: #0f172a;
  background: #f8fafc;
}
.psme-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}
.psme-primary { background: #c5a059; border-color: #c5a059; color: #fff; }
.psme-danger { background: #fee2e2; border-color: #fecaca; color: #991b1b; }

.pcf-btn { border: 1px solid #e2e8f0; background: #fff; border-radius: 10px; padding: 6px 10px; cursor: pointer; font-weight: 700; font-size: 12px; }
.pcf-repeater-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.pcf-help { font-size: 12px; color: #64748b; }
.pcf-row { border: 1px solid #e2e8f0; border-radius: 14px; padding: 10px; margin-top: 10px; background: #fff; }
.pcf-row-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pcf-row-title { font-weight: 800; font-size: 12px; color: #0f172a; }
.pcf-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .pcf-grid { grid-template-columns: 1fr; } }
.pcf-sub-label { display: block; font-size: 12px; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.pcf-sub-input { width: 100%; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; }
.pcf-sub-input:focus,
.psme-input:focus,
.pcf-icon-search:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(197, 160, 89, .18);
  outline: none;
}
.pcf-iconpick .pcf-sub-input { flex: 1; min-width: 0; }
.pcf-nested { border: 1px dashed #cbd5e1; border-radius: 12px; padding: 10px; background: #f8fafc; }
.pcf-nested-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pcf-repeater-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #e2e8f0; }
.psme-img-preview {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 10px 0;
}
.psme-wysiwyg {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.psme-wysiwyg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 8px;
}
.psme-wysiwyg-toolbar button {
  min-width: 34px;
  height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  font-weight: 800;
}
.psme-color-tool {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 0 8px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
}
.psme-color-tool input {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.psme-wysiwyg-editor {
  min-height: 180px;
  padding: 12px;
  outline: none;
  line-height: 1.6;
  color: #0f172a;
}
.psme-wysiwyg[data-wysiwyg-key="hero_description"] .psme-wysiwyg-editor {
  background: #0f172a;
  color: #fff;
}
.psme-wysiwyg-editor:focus {
  box-shadow: inset 0 0 0 3px rgba(197, 160, 89, .18);
}
.psme-wysiwyg-source {
  display: none;
  min-height: 180px;
  border: 0;
  border-top: 1px solid #e2e8f0;
  border-radius: 0;
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
}
.psme-wysiwyg.is-code .psme-wysiwyg-editor { display: none; }
.psme-wysiwyg.is-code .psme-wysiwyg-source { display: block; }
.psme-wysiwyg-editor[contenteditable="false"],
.psme-wysiwyg:has(.psme-wysiwyg-source:disabled) {
  background: #f8fafc;
}
.pcf-icon-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: min(720px, 94vw);
  max-height: 76vh;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
  z-index: 99999;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.pcf-icon-panel-head { display: flex; gap: 10px; padding: 12px; border-bottom: 1px solid #e2e8f0; align-items: center; }
.pcf-icon-search { flex: 1; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; }
.pcf-icon-grid { padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 10px; overflow: auto; max-height: 62vh; }
.pcf-icon-item { border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; padding: 10px 6px; cursor: pointer; transition: transform .12s ease, background .12s ease; }
.pcf-icon-item:hover { background: #f8fafc; transform: translateY(-1px); }
.pcf-icon-item i { font-size: 20px; }
.pcf-icon-cap { font-size: 10px; color: #64748b; text-align: center; line-height: 1.15; word-break: break-word; }
