/* ============================================================
   SAMA inline image manager (admin only)
   ============================================================ */
body.sama-admin [data-img-key]{ position:relative; }
body.sama-admin [data-img-key].sama-img-empty{
  display:flex; align-items:center; justify-content:center;
  background:repeating-linear-gradient(45deg,#f1f3f5,#f1f3f5 10px,#e6eaee 10px,#e6eaee 20px);
  border:2px dashed #c8ced3;
  min-height:240px;
  border-radius:12px;
  color:#5a6065;
  font-size:13px;
}
body.sama-admin [data-img-key].sama-img-empty::before{
  content:"\f03e  이미지 등록 (관리자)";
  font-family:"Font Awesome 6 Free", sans-serif;
  font-weight:900;
}
body.sama-admin .sama-img-edit-btn{
  position:absolute;
  top:10px; right:10px;
  z-index:9990;
  width:36px; height:36px;
  border-radius:50%;
  background:rgba(212,32,32,.95);
  color:#fff;
  border:2px solid #fff;
  box-shadow:0 4px 14px rgba(0,0,0,.25);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  font-size:14px;
  transition:transform .15s ease;
}
body.sama-admin .sama-img-edit-btn:hover{ transform:scale(1.12); background:#b01818; }

/* Modal */
.sama-imgmgr-modal{
  position:fixed; inset:0; z-index:99999;
  background:rgba(0,0,0,.55);
  display:none; align-items:center; justify-content:center;
  padding:24px;
}
.sama-imgmgr-modal.is-open{ display:flex; }
.sama-imgmgr-modal-inner{
  width:100%; max-width:520px;
  max-height:88vh;
  overflow-y:auto;
  background:#fff; border-radius:16px;
  padding:24px;
  box-shadow:0 30px 80px rgba(0,0,0,.4);
}
.sama-imgmgr-modal-inner::-webkit-scrollbar{ width:8px; }
.sama-imgmgr-modal-inner::-webkit-scrollbar-thumb{ background:#cdd2d8; border-radius:4px; }
.sama-imgmgr-modal-inner::-webkit-scrollbar-track{ background:#f7f8fa; }
.sama-imgmgr-modal h3{
  margin:0 0 6px; font-size:20px; font-weight:800; color:#0a0b0c;
}
.sama-imgmgr-modal .key{
  font-size:12px; color:#7c8385; margin-bottom:18px; word-break:break-all;
  font-family:'Inter',monospace;
}
.sama-imgmgr-drop{
  border:2px dashed #c8ced3; border-radius:12px;
  padding:18px 16px; text-align:center;
  color:#5a6065; cursor:pointer;
  transition:all .2s ease;
  background:#fafbfc;
}
.sama-imgmgr-drop:hover, .sama-imgmgr-drop.is-over{
  border-color:#d42020; background:#fff5f5; color:#0a0b0c;
}
.sama-imgmgr-drop i{ font-size:34px; display:block; margin-bottom:10px; color:#d42020; }
.sama-imgmgr-preview{
  margin-top:10px;
  max-height:120px; max-width:100%;
  display:none; border-radius:8px;
  border:2px solid #d42020;
  box-shadow:0 4px 12px rgba(0,0,0,.1);
}
.sama-imgmgr-preview.show{ display:inline-block; }
.sama-imgmgr-preview.show + .sama-imgmgr-current-label{ display:block; }
.sama-imgmgr-current-label{
  display:none;
  font-size:11px; font-weight:700; color:#d42020;
  margin-top:6px; letter-spacing:.04em;
}
.sama-imgmgr-preview.show{ display:block; margin-left:auto; margin-right:auto; }
.sama-imgmgr-actions{
  display:flex; gap:10px; margin-top:20px; justify-content:flex-end;
}
.sama-imgmgr-actions button{
  padding:11px 22px; border-radius:99px;
  border:0; cursor:pointer; font-size:14px; font-weight:700;
}
.sama-imgmgr-actions .btn-cancel{ background:#eef0f2; color:#3a3f44; }
.sama-imgmgr-actions .btn-save{ background:#d42020; color:#fff; }
.sama-imgmgr-actions .btn-save:disabled{ opacity:.5; cursor:wait; }
.sama-imgmgr-msg{ margin-top:12px; font-size:13px; color:#d42020; min-height:18px; }

/* Image manager: fit + position options */
.sama-imgmgr-options{ margin-top:18px; display:flex; flex-direction:column; gap:14px; }
.sama-imgmgr-row{ display:flex; align-items:center; gap:14px; }
.sama-imgmgr-row > label{
  flex:0 0 90px; font-size:12px; color:#5a6065; font-weight:600;
}
.sama-imgmgr-pills{ display:flex; gap:6px; flex-wrap:wrap; }
.sama-imgmgr-pills button{
  padding:7px 14px; border-radius:99px;
  border:1.5px solid #dfe3e6; background:#fff; color:#3a3f44;
  font-size:12px; font-weight:600; cursor:pointer;
  transition:all .15s ease;
}
.sama-imgmgr-pills button:hover{ border-color:#0a0b0c; }
.sama-imgmgr-pills button.is-on{ background:#d42020; color:#fff; border-color:#d42020; }
.sama-imgmgr-grid9{
  display:grid; grid-template-columns:repeat(3, 28px); gap:4px;
}
.sama-imgmgr-grid9 button{
  width:28px; height:28px;
  border:1.5px solid #dfe3e6; background:#fff;
  border-radius:6px; padding:0; cursor:pointer;
  position:relative;
  transition:all .15s ease;
}
.sama-imgmgr-grid9 button::before{
  content:''; position:absolute;
  width:6px; height:6px; border-radius:50%;
  background:#bcc1c6;
  top:50%; left:50%; transform:translate(-50%,-50%);
}
.sama-imgmgr-grid9 button:hover{ border-color:#0a0b0c; }
.sama-imgmgr-grid9 button:hover::before{ background:#0a0b0c; }
.sama-imgmgr-grid9 button.is-on{ border-color:#d42020; background:#fff5f5; }
.sama-imgmgr-grid9 button.is-on::before{ background:#d42020; }

/* ============================================================
   Hero slide editor (admin only)
   ============================================================ */
.sama-slide-toolbar{
  position:absolute; top:24px; right:24px; z-index:50;
  display:flex; align-items:center; gap:8px;
  background:rgba(10,11,12,.75); backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,.12);
  padding:8px 10px; border-radius:99px;
}
.sama-slide-tag{
  color:#fff; font-size:12px; font-weight:600; padding:0 8px;
  font-family:'Pretendard',sans-serif;
  display:inline-flex; align-items:center; gap:6px;
}
.sama-slide-tag i{ color:#d42020; }
.sama-slide-toolbar button{
  display:inline-flex; align-items:center; gap:5px;
  padding:7px 13px; border-radius:99px;
  background:#fff; color:#0a0b0c; border:0;
  font-size:12px; font-weight:600; cursor:pointer;
  transition:transform .15s ease, background .15s ease;
}
.sama-slide-toolbar button:hover{ transform:translateY(-1px); }
.sama-slide-toolbar button[data-act="del"]{ background:rgba(212,32,32,.95); color:#fff; }
.sama-slide-toolbar button[data-act="del"]:hover{ background:#b01818; }

.sama-slide-modal .sama-slide-inner{ max-width:920px; width:96vw; max-height:92vh; overflow:auto; }
.sama-slide-grid{
  display:grid; grid-template-columns:1fr 1.2fr; gap:24px;
  margin-top:14px;
}
.sama-slide-col{ display:flex; flex-direction:column; gap:10px; }
.sama-slide-col label{
  font-size:12px; font-weight:600; color:#3a3f44;
  margin-bottom:-4px;
}
.sama-slide-col label small{ color:#9097a0; font-weight:400; margin-left:6px; }
.sama-slide-col input,
.sama-slide-col textarea{
  width:100%; padding:10px 14px;
  border:1.5px solid #dfe3e6; border-radius:10px;
  font-size:14px; color:#0a0b0c; outline:none;
  font-family:'Pretendard',sans-serif;
  resize:vertical;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.sama-slide-col input:focus,
.sama-slide-col textarea:focus{
  border-color:#d42020;
  box-shadow:0 0 0 3px rgba(212,32,32,.08);
}
.sama-slide-2col{ display:grid; grid-template-columns:1fr 1.4fr; gap:10px; }
.sama-slide-drop{ min-height:200px; }
.sama-slide-fname{ font-size:11px; color:#5a6065; margin-top:6px; }

@media (max-width:760px){
  .sama-slide-grid{ grid-template-columns:1fr; }
  .sama-slide-toolbar{ top:auto; bottom:96px; right:16px; left:16px; justify-content:center; }
}

/* ============================================================
   Inline text editor (admin only)
   ============================================================ */
body.sama-admin .sama-text-editable{
  outline:1px dashed transparent;
  transition:outline-color .15s ease;
}
body.sama-admin .sama-text-editable:hover{
  outline-color:rgba(212,32,32,.4);
  outline-offset:4px;
}
body.sama-admin .sama-text-pencil{
  position:absolute; top:-12px; right:-12px;
  width:28px; height:28px;
  border-radius:50%;
  background:rgba(10,11,12,.85);
  color:#fff; border:2px solid #fff;
  display:none; align-items:center; justify-content:center;
  cursor:pointer; font-size:11px;
  z-index:9990;
  box-shadow:0 4px 12px rgba(0,0,0,.25);
  transition:background .15s ease, transform .15s ease;
}
body.sama-admin .sama-text-pencil:hover{ background:#d42020; transform:scale(1.1); }
body.sama-admin .sama-text-editable:hover > .sama-text-pencil{ display:flex; }

body.sama-admin .sama-editing{
  outline:2px solid #d42020 !important;
  outline-offset:6px;
  background:rgba(255,245,245,.4);
  cursor:text;
}
body.sama-admin .sama-editing > .sama-text-pencil{ display:none; }

.sama-text-tb{
  position:fixed; z-index:99998;
  user-select:none; -webkit-user-select:none;
  display:flex; align-items:center; gap:4px;
  padding:6px 8px;
  background:#0a0b0c; color:#fff;
  border-radius:10px;
  box-shadow:0 12px 30px rgba(0,0,0,.4);
}
.sama-text-tb button{
  width:32px; height:32px;
  background:transparent; color:#fff; border:0;
  border-radius:6px; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  font-size:13px;
  transition:background .12s ease;
}
.sama-text-tb button:hover{ background:rgba(255,255,255,.15); }
.sama-text-tb button.x{ color:#ff8b8b; }
.sama-text-tb button.ok{
  background:#d42020; padding:0 14px; width:auto; gap:6px;
  font-size:12px; font-weight:700;
}
.sama-text-tb button.ok:hover{ background:#b01818; }
.sama-text-tb .sep{ width:1px; height:18px; background:rgba(255,255,255,.2); margin:0 4px; }

.sama-text-msg{
  position:fixed; bottom:24px; right:24px;
  z-index:99999;
  padding:14px 22px; border-radius:99px;
  background:#0a0b0c; color:#fff;
  font-size:13px; font-weight:600;
  opacity:0; transform:translateY(10px);
  transition:all .25s ease;
  pointer-events:none;
  box-shadow:0 12px 30px rgba(0,0,0,.3);
}
.sama-text-msg.show{ opacity:1; transform:translateY(0); }
.sama-text-msg.ok{ background:#157a3c; }
.sama-text-msg.err{ background:#d42020; }

/* Heroes / sub-banners — camera button at bottom-right to avoid fixed header */
body.sama-admin .sama-img-edit-btn{ z-index:10010; }
body.sama-admin .sama-img-edit-btn.is-hero-pos{
  top:auto !important; right:auto !important;
  left:50% !important; bottom:24px !important;
  transform:translateX(-50%);
  width:max-content; min-width:44px; height:44px; font-size:14px;
  padding:0 18px; border-radius:24px;
  background:rgba(212,32,32,.96);
  display:inline-flex; align-items:center; gap:8px;
  white-space:nowrap;
  z-index:10050 !important;
  pointer-events:auto;
  box-shadow:0 8px 22px rgba(0,0,0,.28);
}
body.sama-admin .sama-img-edit-btn.is-hero-pos *{ pointer-events:none; }
body.sama-admin .sama-img-edit-btn.is-hero-pos:hover{
  transform:translateX(-50%) scale(1.06);
}
body.sama-admin .sama-img-edit-btn.is-hero-pos::after{
  content:"이미지 변경";
  font-size:13px; font-weight:600; letter-spacing:.02em;
}
@media (max-width:760px){
  body.sama-admin .sama-img-edit-btn.is-hero-pos{
    bottom:14px !important;
    height:38px; padding:0 12px;
  }
  body.sama-admin .sama-img-edit-btn.is-hero-pos::after{ font-size:12px; }
}


/* Font controls — admin only */
body.sama-admin .sama-fonts-fab{
  position:fixed; right:24px; bottom:84px;
  width:48px; height:48px; border-radius:50%;
  background:#0a0b0c; color:#fff; border:0;
  box-shadow:0 12px 30px rgba(0,0,0,.3);
  cursor:pointer; font-size:16px;
  display:flex; align-items:center; justify-content:center;
  z-index:9989;
  transition:background .15s ease, transform .15s ease;
}
body.sama-admin .sama-fonts-fab:hover{ background:#d42020; transform:scale(1.08); }
.sama-fonts-modal .sama-fonts-row{
  display:flex; flex-direction:column; gap:8px;
  margin:14px 0;
}
.sama-fonts-row label{
  font-size:12px; font-weight:600; color:#3a3f44;
  display:flex; justify-content:space-between; align-items:center;
}
.sama-fonts-row label em{
  font-style:normal; color:#d42020; font-weight:700;
  background:#fff5f5; padding:2px 8px; border-radius:6px; font-size:11px;
}
.sama-fonts-row select,
.sama-fonts-row input[type=range]{
  width:100%; padding:9px 12px;
  border:1.5px solid #dfe3e6; border-radius:10px;
  font-size:13px; outline:none;
}
.sama-fonts-row select:focus{ border-color:#d42020; }
.sama-fonts-row input[type=range]{ padding:8px 0; accent-color:#d42020; }
.sama-fonts-preview{
  margin-top:14px; padding:18px;
  background:#f6f8f7; border-radius:10px;
  border:1px solid #e6eae8;
}
.sama-fonts-preview h2{ margin:0 0 10px; color:#0a0b0c; }
.sama-fonts-preview p{ margin:0; color:#5a6065; line-height:1.65; }

/* Color picker indicator dot inside the color button */
.sama-text-tb button[data-cmd="color"]{ position:relative; }
.sama-text-tb button[data-cmd="color"] .color-dot{
  position:absolute; bottom:5px; left:50%; transform:translateX(-50%);
  width:14px; height:3px; border-radius:2px;
  background:#d42020;
  pointer-events:none;
}
.sama-text-tb svg, .sama-text-pencil svg, .sama-img-edit-btn svg, .sama-fonts-fab svg, .sn-fab-top svg{
  display:block;
}

/* History page admin CRUD */
body.sama-admin .sama-hist-toolbar{
  background:#0a0b0c; color:#fff;
  padding:14px 20px; border-radius:14px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin-bottom:30px; font-size:13px;
}
body.sama-admin .sama-hist-toolbar .lbl{ display:inline-flex; align-items:center; gap:6px; font-weight:700; }
body.sama-admin .sama-hist-toolbar .lbl svg{ color:#d42020; }
body.sama-admin .sama-hist-toolbar button{
  display:inline-flex; align-items:center; gap:5px;
  padding:8px 14px; border-radius:99px;
  background:#fff; color:#0a0b0c; border:0; cursor:pointer;
  font-size:12px; font-weight:600;
  transition:transform .15s ease;
}
body.sama-admin .sama-hist-toolbar button:hover{ transform:translateY(-1px); }
body.sama-admin .sama-hist-toolbar button.ok{ background:#d42020; color:#fff; }
body.sama-admin .sama-hist-toolbar .msg{ margin-left:auto; font-size:12px; opacity:.8; }
body.sama-admin .sama-hist-toolbar .msg.ok{ color:#5fdb86; }
body.sama-admin .sama-hist-toolbar .msg.err{ color:#ff8b8b; }

body.sama-admin .sama-hist-edit{
  position:relative;
  outline:1px dashed rgba(212,32,32,.35);
  outline-offset:4px;
  padding-right:30px !important;
  cursor:text;
}
body.sama-admin .sama-hist-edit:focus{
  outline:2px solid #d42020; background:rgba(255,245,245,.4);
}
body.sama-admin .sama-hist-del-year, body.sama-admin .sama-hist-del-event{
  position:absolute; top:50%; right:-4px; transform:translateY(-50%);
  width:20px; height:20px; border-radius:50%;
  background:#d42020; color:#fff; border:0; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  opacity:0; transition:opacity .15s ease;
}
body.sama-admin .sama-hist-edit:hover > .sama-hist-del-year,
body.sama-admin .sama-hist-edit:hover > .sama-hist-del-event{ opacity:1; }
body.sama-admin .sama-hist-add-event{
  display:inline-flex; align-items:center; gap:5px;
  padding:6px 12px; margin-top:10px;
  border:1.5px dashed #c8ced3; background:#fafbfc; color:#5a6065;
  border-radius:99px; cursor:pointer; font-size:11.5px; font-weight:600;
  transition:all .15s ease;
}
body.sama-admin .sama-hist-add-event:hover{ border-color:#d42020; color:#d42020; }

/* Generic table editor (admin only) */
body.sama-admin .sama-tbl-toolbar{
  background:#0a0b0c; color:#fff;
  padding:12px 18px; border-radius:12px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin-bottom:14px; font-size:12.5px;
}
body.sama-admin .sama-tbl-toolbar .lbl{ display:inline-flex; align-items:center; gap:6px; font-weight:700; }
body.sama-admin .sama-tbl-toolbar .lbl svg{ color:#d42020; }
body.sama-admin .sama-tbl-toolbar button{
  display:inline-flex; align-items:center; gap:5px;
  padding:7px 13px; border-radius:99px;
  background:#fff; color:#0a0b0c; border:0; cursor:pointer;
  font-size:11.5px; font-weight:600;
  transition:transform .15s ease;
}
body.sama-admin .sama-tbl-toolbar button:hover{ transform:translateY(-1px); }
body.sama-admin .sama-tbl-toolbar button.ok{ background:#d42020; color:#fff; }
body.sama-admin .sama-tbl-toolbar .msg{ margin-left:auto; font-size:11.5px; opacity:.85; }
body.sama-admin .sama-tbl-toolbar .msg.ok{ color:#5fdb86; }
body.sama-admin .sama-tbl-toolbar .msg.err{ color:#ff8b8b; }

body.sama-admin .sama-tbl-cell{
  outline:1px dashed transparent;
  transition:outline-color .15s ease;
  cursor:text;
}
body.sama-admin .sama-tbl-cell:hover{ outline-color:rgba(212,32,32,.4); outline-offset:-2px; }
body.sama-admin .sama-tbl-cell:focus{ outline:2px solid #d42020; outline-offset:-2px; background:rgba(255,245,245,.4); }

body.sama-admin .sama-tbl-del-row{
  position:absolute; top:50%; right:6px; transform:translateY(-50%);
  width:20px; height:20px; border-radius:50%;
  background:#d42020; color:#fff; border:0; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  opacity:0; transition:opacity .15s ease;
}
body.sama-admin .sama-tbl-row:hover .sama-tbl-del-row{ opacity:1; }

/* History month tag — clickable but not editable */
body.sama-admin .sama-hist-month-tag{
  cursor:pointer;
  border-bottom:1px dotted #d42020;
  user-select:none;
}
body.sama-admin .sama-hist-month-tag:hover{ background:rgba(212,32,32,.1); }

/* Generic list/cards editor (admin only) */
body.sama-admin .sama-list-toolbar{
  background:#0a0b0c; color:#fff;
  padding:12px 18px; border-radius:12px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin-bottom:14px; font-size:12.5px;
}
body.sama-admin .sama-list-toolbar .lbl{ display:inline-flex; align-items:center; gap:6px; font-weight:700; }
body.sama-admin .sama-list-toolbar .lbl svg{ color:#d42020; }
body.sama-admin .sama-list-toolbar button{
  display:inline-flex; align-items:center; gap:5px;
  padding:7px 13px; border-radius:99px;
  background:#fff; color:#0a0b0c; border:0; cursor:pointer;
  font-size:11.5px; font-weight:600;
  transition:transform .15s ease;
}
body.sama-admin .sama-list-toolbar button:hover{ transform:translateY(-1px); }
body.sama-admin .sama-list-toolbar button.ok{ background:#d42020; color:#fff; }
body.sama-admin .sama-list-toolbar .msg{ margin-left:auto; font-size:11.5px; opacity:.85; }
body.sama-admin .sama-list-toolbar .msg.ok{ color:#5fdb86; }
body.sama-admin .sama-list-toolbar .msg.err{ color:#ff8b8b; }

body.sama-admin .sama-list-field{
  outline:1px dashed transparent;
  transition:outline-color .15s ease;
  cursor:text;
  display:inline-block; min-width:50px;
}
body.sama-admin .sama-list-field:hover{ outline-color:rgba(212,32,32,.4); outline-offset:2px; }
body.sama-admin .sama-list-field:focus{ outline:2px solid #d42020; outline-offset:2px; background:rgba(255,245,245,.4); }
body.sama-admin .sama-list-field:empty::before{
  content:'\2014  ' attr(data-placeholder);
  color:#bcc1c6; font-style:italic;
}

body.sama-admin .sama-list-del{
  position:absolute; top:8px; left:50%;
  transform:translateX(-50%) scale(.85);
  width:28px; height:28px; border-radius:50%;
  background:#d42020; color:#fff; border:2px solid #fff;
  cursor:pointer; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none;
  box-shadow:0 4px 12px rgba(0,0,0,.25);
  transition:opacity .15s ease, transform .15s ease, background .12s ease;
  z-index:20;
}
body.sama-admin .sama-list-item:hover > .sama-list-del,
body.sama-admin .sama-list-del:hover{
  opacity:1; pointer-events:auto;
  transform:translateX(-50%) scale(1);
}
body.sama-admin .sama-list-del:hover{ background:#b01818; transform:translateX(-50%) scale(1.1); }

/* ============================================================
   Section management (admin only)
   ============================================================ */
body.sama-admin section[data-section-key]{ outline:1px dashed transparent; transition:outline-color .15s ease; }
body.sama-admin section[data-section-key]:hover{ outline-color:rgba(212,32,32,.25); outline-offset:-1px; }
body.sama-admin .sama-sec-bar{
  position:absolute; top:14px; right:14px; z-index:9985;
  display:flex; align-items:center; gap:8px;
  background:rgba(10,11,12,.92); backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,.14);
  padding:10px 14px; border-radius:99px;
  opacity:0; transform:translateY(-4px);
  transition:opacity .18s ease, transform .18s ease;
  pointer-events:none;
}
/* Show on section hover OR when the bar itself / its popover is hovered/focused —
   prevents flicker when mouse crosses the gap between buttons. */
body.sama-admin section[data-section-key]:hover > .sama-sec-bar,
body.sama-admin section[data-section-key] > .sama-sec-bar:hover,
body.sama-admin section[data-section-key] > .sama-sec-bar:focus-within,
body.sama-admin section[data-section-key]:has(.sama-sec-bgpop) > .sama-sec-bar{
  opacity:1; transform:translateY(0); pointer-events:auto;
}
/* Invisible hit-area extension around the bar so mouse can't "fall off" between buttons */
body.sama-admin .sama-sec-bar::before{
  content:""; position:absolute;
  inset:-12px -12px -16px -12px;
  pointer-events:auto;
}
body.sama-admin .sama-sec-bar .kid{
  font-family:'Inter',monospace; font-size:11px; color:rgba(255,255,255,.6);
  padding:0 8px; max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  position:relative; z-index:1;
}
body.sama-admin .sama-sec-bar button{
  width:36px; height:36px; border-radius:50%;
  background:#fff; color:#0a0b0c; border:0; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  transition:transform .12s ease, background .12s ease, color .12s ease;
  position:relative; z-index:1;
  font-size:14px;
}
body.sama-admin .sama-sec-bar button svg{ width:14px; height:14px; }
body.sama-admin .sama-sec-bar button:hover{ background:#d42020; color:#fff; transform:scale(1.08); }
body.sama-admin .sama-sec-bar button.is-on{ background:#d42020; color:#fff; }
body.sama-admin .sama-sec-hidden-preview{
  opacity:.35; outline:2px dashed #d42020 !important;
  position:relative;
}
body.sama-admin .sama-sec-hidden-preview::before{
  content:'숨김 (저장 시 일반 사용자에게 보이지 않음)';
  position:absolute; top:8px; left:8px; z-index:9984;
  background:#d42020; color:#fff;
  padding:6px 14px; border-radius:99px;
  font-size:11px; font-weight:700;
}
.sama-sec-savebar{
  position:fixed; top:80px; right:24px; z-index:99996;
  background:#0a0b0c; color:#fff;
  padding:10px 14px; border-radius:99px;
  display:flex; align-items:center; gap:8px;
  box-shadow:0 14px 30px rgba(0,0,0,.3);
  font-size:12px;
}
.sama-sec-savebar .lbl{ font-weight:600; padding:0 8px; }
.sama-sec-savebar button{
  display:inline-flex; align-items:center; gap:5px;
  padding:7px 14px; border-radius:99px;
  background:#fff; color:#0a0b0c; border:0; cursor:pointer;
  font-size:11px; font-weight:700;
}
.sama-sec-savebar button.ok{ background:#d42020; color:#fff; }

/* ============================================================
   Icon picker (admin only)
   ============================================================ */
body.sama-admin i.sama-icon-editable{
  position:relative;
  outline:1px dashed transparent; outline-offset:3px;
  border-radius:4px;
  transition:outline-color .15s ease;
}
body.sama-admin i.sama-icon-editable:hover{ outline-color:#d42020; }
.sama-icon-modal .sama-icon-search{
  display:grid; grid-template-columns:1fr 1fr; gap:10px;
  margin:14px 0 10px;
}
.sama-icon-search input{
  padding:10px 14px; border:1.5px solid #dfe3e6; border-radius:10px;
  font-size:13px; outline:none; font-family:inherit;
}
.sama-icon-search input:focus{ border-color:#d42020; }
.sama-icon-grid{
  max-height:360px; overflow-y:auto;
  padding:10px; background:#fafbfc; border-radius:10px;
}
.sama-icon-group-label{
  font-size:11px; font-weight:700; color:#5a6065;
  letter-spacing:.1em; text-transform:uppercase;
  margin:14px 0 8px;
}
.sama-icon-group-label:first-child{ margin-top:0; }
.sama-icon-row{ display:grid; grid-template-columns:repeat(auto-fill, minmax(48px, 1fr)); gap:6px; }
.sama-icon-btn{
  width:100%; aspect-ratio:1; padding:0;
  background:#fff; border:1.5px solid #eef0f2;
  border-radius:8px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  font-size:18px; color:#5a6065;
  transition:all .12s ease;
}
.sama-icon-btn:hover{ border-color:#0a0b0c; color:#0a0b0c; transform:scale(1.05); }
.sama-icon-btn.is-on{ background:#d42020; border-color:#d42020; color:#fff; }

/* Organization chart admin (admin only) */
body.sama-admin .sama-org-toolbar{
  background:#0a0b0c; color:#fff;
  padding:12px 18px; border-radius:12px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin-bottom:24px; font-size:12.5px;
}
body.sama-admin .sama-org-toolbar .lbl{ display:inline-flex; align-items:center; gap:6px; font-weight:700; }
body.sama-admin .sama-org-toolbar .lbl svg{ color:#d42020; }
body.sama-admin .sama-org-toolbar button{
  display:inline-flex; align-items:center; gap:5px;
  padding:7px 13px; border-radius:99px;
  background:#fff; color:#0a0b0c; border:0; cursor:pointer;
  font-size:11.5px; font-weight:600;
}
body.sama-admin .sama-org-toolbar button.ok{ background:#d42020; color:#fff; }
body.sama-admin .sama-org-toolbar .msg{ margin-left:auto; font-size:11.5px; opacity:.85; }
body.sama-admin .sama-org-toolbar .msg.ok{ color:#5fdb86; }
body.sama-admin .sama-org-toolbar .msg.err{ color:#ff8b8b; }

body.sama-admin .sn-org .row, body.sama-admin .sn-org .top{
  position:relative; padding:6px;
  outline:1px dashed transparent; transition:outline-color .15s ease; border-radius:8px;
}
body.sama-admin .sn-org .row:hover, body.sama-admin .sn-org .top:hover{ outline-color:rgba(212,32,32,.3); outline-offset:4px; }
body.sama-admin .sn-org .sama-org-edit{
  cursor:text;
  outline:1px dashed transparent;
}
body.sama-admin .sn-org .sama-org-edit:hover{ outline-color:rgba(212,32,32,.5); outline-offset:2px; }
body.sama-admin .sn-org .sama-org-edit:focus{ outline:2px solid #d42020; outline-offset:2px; }
body.sama-admin .sn-org .sama-org-del{
  position:absolute; top:-8px; right:-8px;
  width:20px; height:20px; border-radius:50%;
  background:#d42020; color:#fff; border:0; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  opacity:0; transition:opacity .15s ease;
  z-index:10;
}
body.sama-admin .sn-org .sama-org-edit:hover > .sama-org-del{ opacity:1; }
body.sama-admin .sn-org .sama-org-add-box{
  width:36px; height:36px; border-radius:50%;
  background:#fff; border:1.5px dashed #c8ced3; color:#5a6065; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  margin-left:6px; align-self:center;
  opacity:0; transition:opacity .15s ease, all .15s ease;
}
body.sama-admin .sn-org .row:hover .sama-org-add-box,
body.sama-admin .sn-org .top:hover .sama-org-add-box{ opacity:1; }
body.sama-admin .sn-org .sama-org-add-box:hover{ border-color:#d42020; color:#d42020; transform:scale(1.1); }
body.sama-admin .sn-org .sama-org-del-row{
  position:absolute; top:6px; right:6px;
  width:24px; height:24px; border-radius:50%;
  background:#d42020; color:#fff; border:0; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  opacity:0; transition:opacity .15s ease;
  z-index:10;
}
body.sama-admin .sn-org .row:hover > .sama-org-del-row,
body.sama-admin .sn-org .top:hover > .sama-org-del-row{ opacity:1; }

/* Admin shortcuts FAB stack (admin only) */
body.sama-admin .sama-admin-shortcuts{
  position:fixed; right:24px; top:96px; z-index:9988;
  display:flex; flex-direction:column; gap:8px; align-items:flex-end;
}
body.sama-admin .sama-admin-shortcuts .trig{
  width:44px; height:44px; border-radius:50%;
  background:#0a0b0c; color:#fff; border:0; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 12px 30px rgba(0,0,0,.3);
  transition:all .2s ease;
}
body.sama-admin .sama-admin-shortcuts .trig:hover{ background:#d42020; transform:scale(1.1); }
body.sama-admin .sama-admin-shortcuts.is-open .trig{ transform:rotate(45deg); background:#d42020; }
body.sama-admin .sama-admin-shortcuts .ic{
  width:38px; height:38px; border-radius:50%;
  background:#fff; color:#0a0b0c;
  display:flex; align-items:center; justify-content:center;
  text-decoration:none; cursor:pointer; border:1.5px solid #eef0f2;
  box-shadow:0 6px 16px rgba(0,0,0,.12);
  opacity:0; pointer-events:none;
  transform:scale(.5) translateX(20px);
  transition:all .15s ease;
  position:relative;
}
body.sama-admin .sama-admin-shortcuts.is-open .ic{ opacity:1; pointer-events:auto; transform:scale(1) translateX(0); }
body.sama-admin .sama-admin-shortcuts.is-open .ic:nth-of-type(2){ transition-delay:0s; }
body.sama-admin .sama-admin-shortcuts.is-open .ic:nth-of-type(3){ transition-delay:.04s; }
body.sama-admin .sama-admin-shortcuts.is-open .ic:nth-of-type(4){ transition-delay:.08s; }
body.sama-admin .sama-admin-shortcuts.is-open .ic:nth-of-type(5){ transition-delay:.12s; }
body.sama-admin .sama-admin-shortcuts.is-open .ic:nth-of-type(6){ transition-delay:.16s; }
body.sama-admin .sama-admin-shortcuts .ic:hover{ background:#0a0b0c; color:#fff; border-color:#0a0b0c; transform:scale(1.1); }
body.sama-admin .sama-admin-shortcuts .ic.ic-out:hover{ background:#d42020; border-color:#d42020; }
body.sama-admin .sama-admin-shortcuts .ic[data-t]::before{
  content:attr(data-t);
  position:absolute; right:48px; top:50%; transform:translateY(-50%);
  background:#0a0b0c; color:#fff;
  padding:5px 10px; border-radius:6px;
  font-size:11px; font-weight:600; white-space:nowrap;
  opacity:0; pointer-events:none;
  transition:opacity .15s ease;
}
body.sama-admin .sama-admin-shortcuts .ic:hover::before{ opacity:1; }

/* Color customizer */
.sama-color-row{ display:flex; flex-direction:column; gap:8px; margin:14px 0; }
.sama-color-row label{ font-size:12px; font-weight:600; color:#3a3f44; }
.sama-color-row .ipt{ display:flex; gap:8px; align-items:center; }
.sama-color-row input[type="color"]{
  width:48px; height:38px; border:1.5px solid #dfe3e6; border-radius:8px;
  padding:2px; cursor:pointer; background:#fff;
}
.sama-color-row input[type="text"]{
  flex:1; padding:9px 12px; border:1.5px solid #dfe3e6; border-radius:8px;
  font-family:'Inter',monospace; font-size:13px; color:#0a0b0c; outline:none;
}
.sama-color-row input[type="text"]:focus{ border-color:#d42020; }
.sama-color-presets{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  margin-top:18px; padding-top:14px; border-top:1px solid #eef0f2;
}
.sama-color-presets .lbl{ font-size:11px; color:#7c8385; font-weight:600; margin-right:4px; }
.sama-color-presets button{
  width:30px; height:30px; border-radius:50%; border:2px solid #fff;
  outline:1px solid #dfe3e6; cursor:pointer;
  transition:all .15s ease;
}
.sama-color-presets button:hover{ transform:scale(1.15); outline-color:#0a0b0c; }
.sama-color-preview{
  margin-top:18px; padding:18px; border-radius:10px;
  background:#f6f8f7; border:1px solid #e6eae8;
}
.sama-color-preview h2{ margin:0 0 8px; padding-bottom:8px; font-size:18px; }
.sama-color-preview p{ margin:0 0 12px; font-size:13px; }
.sama-color-preview .btn-p{
  padding:8px 18px; border-radius:99px; border:0; font-size:12px; font-weight:700;
  cursor:pointer;
}

/* Section bg-color popover */
body.sama-admin .sama-sec-bgpop{
  position:absolute; top:64px; right:14px; z-index:10020;
  background:#fff; border:1px solid #e5e7eb; border-radius:12px;
  box-shadow:0 12px 32px rgba(0,0,0,.22); padding:12px; width:240px;
}
body.sama-admin .sama-sec-bgpop .row{ display:grid; grid-template-columns:repeat(6,1fr); gap:6px; margin-bottom:8px; }
body.sama-admin .sama-sec-bgpop .row button{ width:100%; aspect-ratio:1/1; border:1px solid #d1d5db; border-radius:6px; cursor:pointer; padding:0; }
body.sama-admin .sama-sec-bgpop .row button:hover{ border-color:#0a0b0c; transform:scale(1.06); }
body.sama-admin .sama-sec-bgpop .row2{ display:flex; align-items:center; justify-content:space-between; gap:6px; font-size:11px; }
body.sama-admin .sama-sec-bgpop .row2 label{ display:flex; align-items:center; gap:4px; }
body.sama-admin .sama-sec-bgpop .row2 input[type=color]{ width:30px; height:24px; border:1px solid #d1d5db; border-radius:4px; padding:0; cursor:pointer; }
body.sama-admin .sama-sec-bgpop .row2 button{ background:#f1f3f5; border:1px solid #d1d5db; border-radius:4px; padding:3px 8px; font-size:10px; cursor:pointer; }
body.sama-admin .sama-sec-bgpop .row2 button:hover{ background:#e5e7eb; }

/* Org chart — drag/drop visual indicators + spacing */
body.sama-admin .sn-org [data-org-box]{
  cursor:grab;
  transition:transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
body.sama-admin .sn-org [data-org-box]:hover{
  box-shadow:0 6px 16px rgba(0,0,0,.12);
}
body.sama-admin .sn-org [data-org-box].is-dragging{
  opacity:.4;
  cursor:grabbing;
}
body.sama-admin .sn-org [data-org-box].is-drop-before{
  box-shadow:-3px 0 0 0 #d42020, 0 6px 16px rgba(0,0,0,.12);
}
body.sama-admin .sn-org [data-org-box].is-drop-after{
  box-shadow:3px 0 0 0 #d42020, 0 6px 16px rgba(0,0,0,.12);
}
body.sama-admin .sn-org .row.is-drop-row,
body.sama-admin .sn-org .top.is-drop-row{
  background:rgba(212,32,32,.05);
  outline:2px dashed rgba(212,32,32,.4);
  outline-offset:4px;
  border-radius:8px;
}
/* Public + admin — boxes never overlap text */
.sn-org .box{ word-break:keep-all; max-width:280px; }
.sn-org .row, .sn-org .top{ row-gap:16px; }

/* ===== Mobility hotspot admin editor ===== */
body.sama-admin .sama-mob-bar{
  position:absolute; top:18px; left:18px; z-index:30;
  display:flex; align-items:center; gap:10px;
  background:rgba(10,11,12,.92); color:#fff;
  border:1px solid rgba(255,255,255,.14);
  padding:8px 12px; border-radius:99px;
  font-size:12px; font-weight:600;
  box-shadow:0 6px 20px rgba(0,0,0,.2);
}
body.sama-admin .sama-mob-bar .lbl{ padding:0 4px; }
body.sama-admin .sama-mob-bar button{
  background:#fff; color:#0a0b0c; border:0; cursor:pointer;
  padding:6px 14px; border-radius:99px; font-size:12px; font-weight:700;
  transition:all .12s ease;
}
body.sama-admin .sama-mob-bar button:hover{ background:#d42020; color:#fff; transform:translateY(-1px); }
body.sama-admin .sama-mob-bar .msg{ font-size:11px; padding:0 6px; opacity:0; transition:opacity .15s ease; }
body.sama-admin .sama-mob-bar .msg.ok{ opacity:1; color:#86efac; }
body.sama-admin .sama-mob-bar .msg.err{ opacity:1; color:#fca5a5; }

/* hotspots in admin mode */
body.sama-admin .mb5 .hot.is-admin{ cursor:grab; }
body.sama-admin .mb5 .hot.is-admin.is-dragging{ cursor:grabbing; opacity:.8; z-index:50; }
body.sama-admin .mb5 .car-stage.is-admin-drag .hot{ pointer-events:none; }
body.sama-admin .mb5 .car-stage.is-admin-drag .hot.is-dragging{ pointer-events:auto; }
body.sama-admin .mb5 .hot.is-admin .mob-del,
body.sama-admin .mb5 .hot.is-admin .mob-edit{
  position:absolute; width:26px; height:26px; border-radius:50%;
  background:#fff; color:#0a0b0c; border:2px solid #fff;
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer; font-size:14px; font-weight:700; line-height:1;
  box-shadow:0 4px 12px rgba(0,0,0,.35);
  z-index:60; padding:0;
  opacity:0; transform:scale(.6); pointer-events:none;
  transition:opacity .15s ease, transform .15s ease, background .12s ease, color .12s ease;
}
body.sama-admin .mb5 .hot.is-admin .mob-del{ top:-13px; right:-13px; color:#d42020; }
body.sama-admin .mb5 .hot.is-admin .mob-edit{ top:-13px; left:-13px; color:#16a34a; }
/* Visible only when JS sets is-hovered (with 250ms hide delay → click reliable) */
body.sama-admin .mb5 .hot.is-admin.is-hovered .mob-del,
body.sama-admin .mb5 .hot.is-admin.is-hovered .mob-edit{
  opacity:1; transform:scale(1); pointer-events:auto;
}
body.sama-admin .mb5 .hot.is-admin .mob-del:hover{ background:#d42020; color:#fff; transform:scale(1.16); }
body.sama-admin .mb5 .hot.is-admin .mob-edit:hover{ background:#16a34a; color:#fff; transform:scale(1.16); }
body.sama-admin .mb5 .hot.is-admin .mob-del:hover{ background:#d42020; color:#fff; }
body.sama-admin .mb5 .hot.is-admin .mob-edit:hover{ background:#16a34a; color:#fff; }

/* edit modal */
body.sama-admin .sama-mob-modal{
  position:fixed; inset:0; z-index:99999;
  background:rgba(0,0,0,.55); backdrop-filter:blur(4px);
  display:none; align-items:center; justify-content:center;
  padding:24px;
}
body.sama-admin .sama-mob-modal.open{ display:flex; }
body.sama-admin .sama-mob-modal .box{
  background:#fff; border-radius:14px;
  width:100%; max-width:480px; max-height:90vh; overflow:auto;
  box-shadow:0 30px 80px rgba(0,0,0,.3);
}
body.sama-admin .sama-mob-modal header{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 22px; border-bottom:1px solid #e5e7eb;
}
body.sama-admin .sama-mob-modal header .t{ font-size:16px; font-weight:800; color:#0a0b0c; }
body.sama-admin .sama-mob-modal header .x{ background:transparent; border:0; font-size:22px; cursor:pointer; color:#6b7280; width:30px; height:30px; border-radius:50%; }
body.sama-admin .sama-mob-modal header .x:hover{ background:#f3f4f6; color:#0a0b0c; }
body.sama-admin .sama-mob-modal .body{ padding:18px 22px; display:grid; gap:14px; }
body.sama-admin .sama-mob-modal label{ display:block; font-size:12px; font-weight:600; color:#374151; }
body.sama-admin .sama-mob-modal input[type=text],
body.sama-admin .sama-mob-modal input[type=number],
body.sama-admin .sama-mob-modal select,
body.sama-admin .sama-mob-modal textarea{
  width:100%; margin-top:6px;
  padding:9px 12px; border:1px solid #d1d5db; border-radius:8px;
  font-size:13px; font-family:inherit;
}
body.sama-admin .sama-mob-modal input:focus,
body.sama-admin .sama-mob-modal select:focus,
body.sama-admin .sama-mob-modal textarea:focus{
  border-color:#d42020; outline:0; box-shadow:0 0 0 3px rgba(212,32,32,.12);
}
body.sama-admin .sama-mob-modal label.coords{ display:flex; gap:10px; align-items:flex-end; }
body.sama-admin .sama-mob-modal label.coords input{ width:80px; }
body.sama-admin .sama-mob-modal footer{
  padding:14px 22px; border-top:1px solid #e5e7eb;
  display:flex; justify-content:flex-end; gap:8px;
}
body.sama-admin .sama-mob-modal footer button{
  padding:8px 18px; border-radius:8px; border:1px solid #d1d5db;
  background:#fff; cursor:pointer; font-size:13px; font-weight:600;
}
body.sama-admin .sama-mob-modal footer button.ok{ background:#d42020; color:#fff; border-color:#d42020; }
body.sama-admin .sama-mob-modal footer button.ok:hover{ background:#b01818; }

/* Mobility editor preview block */
body.sama-admin .sama-mob-modal .preview-row{
  display:flex; gap:14px; align-items:center;
  padding:14px; background:#f9fafb;
  border:1px solid #e5e7eb; border-radius:10px;
}
body.sama-admin .sama-mob-modal .preview-pic{
  width:120px; height:78px; border-radius:8px;
  background:#1a202c center/cover no-repeat;
  flex-shrink:0;
  border:1px solid #e5e7eb;
  background-size:cover;
}
body.sama-admin .sama-mob-modal .preview-meta{ display:flex; flex-direction:column; gap:4px; min-width:0; }
body.sama-admin .sama-mob-modal .preview-cat{
  font-family:"Montserrat", sans-serif; font-size:10px; letter-spacing:.18em;
  color:#d42020; font-weight:700;
}
body.sama-admin .sama-mob-modal .preview-name{
  font-size:14px; font-weight:700; color:#0a0b0c;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

/* Mobility — never clip tooltips (overrides .car-stage{overflow:hidden}) */
body.sama-admin .mb5 .car-stage{ overflow:visible !important; }
body.sama-admin .mb5 .hotspots{ overflow:visible !important; }
/* Prevent overlong tip from running off — allow internal scroll */
.mb5 .hot .tip{ max-height:min(60vh, 320px); overflow:auto; }
.mb5 .hot .tip .pic{ flex-shrink:0; }

/* ===== Organization chart admin chrome ===== */
body.sama-admin .sama-org-toolbar{
  position:sticky; top:80px; z-index:100;
  display:flex; align-items:center; gap:8px;
  background:rgba(10,11,12,.92); color:#fff;
  border:1px solid rgba(255,255,255,.14); border-radius:99px;
  padding:8px 14px; margin:0 auto 24px; width:fit-content;
  font-size:12px; box-shadow:0 6px 20px rgba(0,0,0,.18);
}
body.sama-admin .sama-org-toolbar .lbl{ font-weight:600; padding:0 4px; }
body.sama-admin .sama-org-toolbar button{
  background:#fff; color:#0a0b0c; border:0;
  padding:7px 14px; border-radius:99px; cursor:pointer;
  font-size:12px; font-weight:700;
  display:inline-flex; align-items:center; gap:5px;
  transition:all .12s ease;
}
body.sama-admin .sama-org-toolbar button:hover{ background:#f3f4f6; transform:translateY(-1px); }
body.sama-admin .sama-org-toolbar button.ok{ background:#d42020; color:#fff; }
body.sama-admin .sama-org-toolbar button.ok:hover{ background:#b01818; }
body.sama-admin .sama-org-toolbar .msg{ font-size:11px; opacity:0; transition:opacity .15s ease; padding-left:6px; }
body.sama-admin .sama-org-toolbar .msg.ok{ opacity:1; color:#86efac; }
body.sama-admin .sama-org-toolbar .msg.err{ opacity:1; color:#fca5a5; }

body.sama-admin .org-box.sama-org-edit{ position:relative; }
body.sama-admin .org-box .sama-org-del,
body.sama-admin .org-box .sama-org-edit-btn{
  position:absolute; width:24px; height:24px; border-radius:50%;
  background:#fff; border:2px solid #fff; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer; z-index:10;
  box-shadow:0 3px 8px rgba(0,0,0,.2);
  opacity:0; transform:scale(.85);
  transition:opacity .12s ease, transform .12s ease, background .12s ease;
}
body.sama-admin .org-box .sama-org-del{ top:-10px; right:-10px; color:#d42020; }
body.sama-admin .org-box .sama-org-edit-btn{ top:-10px; left:-10px; color:#16a34a; }
body.sama-admin .org-box:hover .sama-org-del,
body.sama-admin .org-box:hover .sama-org-edit-btn,
body.sama-admin .org-box .sama-org-del:hover,
body.sama-admin .org-box .sama-org-edit-btn:hover{
  opacity:1; transform:scale(1);
}
body.sama-admin .org-box .sama-org-del:hover{ background:#d42020; color:#fff; }
body.sama-admin .org-box .sama-org-edit-btn:hover{ background:#16a34a; color:#fff; }

body.sama-admin .org-row{ position:relative; }
body.sama-admin .sama-org-add-box,
body.sama-admin .sama-org-del-row{
  background:rgba(255,255,255,.9); border:1px dashed #d42020;
  color:#d42020; padding:0; cursor:pointer;
  width:32px; height:32px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  margin:auto 0;
  opacity:0; transition:opacity .15s ease, background .12s ease;
}
body.sama-admin .org-row:hover .sama-org-add-box,
body.sama-admin .org-row:hover .sama-org-del-row{ opacity:.85; }
body.sama-admin .sama-org-add-box:hover,
body.sama-admin .sama-org-del-row:hover{ opacity:1; background:#d42020; color:#fff; }

/* Drag indicators */
body.sama-admin .org-box[draggable="true"]{ cursor:grab; }
body.sama-admin .org-box.is-dragging{ opacity:.4; }
body.sama-admin .org-box.is-drop-before{ box-shadow:-3px 0 0 0 #d42020; }
body.sama-admin .org-box.is-drop-after{ box-shadow:3px 0 0 0 #d42020; }

/* Edit modal */
body.sama-admin .sama-org-modal{
  position:fixed; inset:0; z-index:99999;
  background:rgba(0,0,0,.55); backdrop-filter:blur(4px);
  display:none; align-items:center; justify-content:center; padding:24px;
}
body.sama-admin .sama-org-modal.open{ display:flex; }
body.sama-admin .sama-org-modal .box{
  background:#fff; border-radius:14px;
  width:100%; max-width:460px; max-height:90vh; overflow:auto;
  box-shadow:0 30px 80px rgba(0,0,0,.3);
}
body.sama-admin .sama-org-modal header{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 22px; border-bottom:1px solid #e5e7eb;
}
body.sama-admin .sama-org-modal header .t{ font-size:16px; font-weight:800; }
body.sama-admin .sama-org-modal header .x{
  background:transparent; border:0; font-size:22px; cursor:pointer;
  width:30px; height:30px; border-radius:50%; color:#6b7280;
}
body.sama-admin .sama-org-modal header .x:hover{ background:#f3f4f6; }
body.sama-admin .sama-org-modal .body{ padding:18px 22px; display:grid; gap:12px; }
body.sama-admin .sama-org-modal label{ display:block; font-size:12px; font-weight:600; color:#374151; }
body.sama-admin .sama-org-modal input[type=text],
body.sama-admin .sama-org-modal textarea{
  width:100%; margin-top:5px;
  padding:9px 12px; border:1px solid #d1d5db; border-radius:8px;
  font-size:13px; font-family:inherit;
}
body.sama-admin .sama-org-modal input:focus,
body.sama-admin .sama-org-modal textarea:focus{
  border-color:#d42020; outline:0; box-shadow:0 0 0 3px rgba(212,32,32,.12);
}
body.sama-admin .sama-org-modal .chk{ display:flex; align-items:center; gap:8px; padding:6px 0; }
body.sama-admin .sama-org-modal .chk input{ width:16px; height:16px; }
body.sama-admin .sama-org-modal .preview-wrap{
  display:flex; justify-content:center; padding:14px;
  background:#f9fafb; border:1px solid #e5e7eb; border-radius:10px;
  margin-bottom:6px;
}
body.sama-admin .sama-org-modal .preview{ pointer-events:none; }
body.sama-admin .sama-org-modal footer{
  padding:14px 22px; border-top:1px solid #e5e7eb;
  display:flex; justify-content:flex-end; gap:8px;
}
body.sama-admin .sama-org-modal footer button{
  padding:8px 18px; border-radius:8px; border:1px solid #d1d5db;
  background:#fff; cursor:pointer; font-size:13px; font-weight:600;
}
body.sama-admin .sama-org-modal footer button.ok{ background:#d42020; color:#fff; border-color:#d42020; }
body.sama-admin .sama-org-modal footer button.ok:hover{ background:#b01818; }

/* ===== Org TREE editor admin chrome ===== */
body.sama-admin .org-card{ position:relative; }
body.sama-admin .org-card .sama-org-del,
body.sama-admin .org-card .sama-org-edit-btn,
body.sama-admin .org-card .sama-org-add-child,
body.sama-admin .org-card .sama-org-add-sibling{
  position:absolute; width:22px; height:22px; border-radius:50%;
  background:#fff; border:2px solid #fff;
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer; padding:0; line-height:1;
  font-size:12px; font-weight:700;
  box-shadow:0 3px 8px rgba(0,0,0,.2);
  z-index:30;
  opacity:0; transform:scale(.8);
  transition:opacity .15s ease, transform .15s ease, background .12s ease, color .12s ease;
}
body.sama-admin .org-card .sama-org-del{ top:-10px; right:-10px; }
body.sama-admin .org-card .sama-org-edit-btn{ top:-10px; left:-10px; }
body.sama-admin .org-card .sama-org-add-child{ bottom:-10px; left:50%; transform:translateX(-50%) scale(.8); }
body.sama-admin .org-card .sama-org-add-sibling{ top:50%; right:-12px; transform:translateY(-50%) scale(.8); }
body.sama-admin .org-card:hover .sama-org-del,
body.sama-admin .org-card:hover .sama-org-edit-btn,
body.sama-admin .org-card:hover .sama-org-add-child,
body.sama-admin .org-card:hover .sama-org-add-sibling{
  opacity:1; transform:scale(1);
}
body.sama-admin .org-card:hover .sama-org-add-child{ transform:translateX(-50%) scale(1); }
body.sama-admin .org-card:hover .sama-org-add-sibling{ transform:translateY(-50%) scale(1); }
body.sama-admin .org-card .sama-org-del:hover{ background:#d42020; color:#fff !important; transform:scale(1.18); }
body.sama-admin .org-card .sama-org-edit-btn:hover{ background:#16a34a; color:#fff !important; transform:scale(1.18); }
body.sama-admin .org-card .sama-org-add-child:hover{ background:#2563eb; color:#fff !important; transform:translateX(-50%) scale(1.18); }
body.sama-admin .org-card .sama-org-add-sibling:hover{ background:#9333ea; color:#fff !important; transform:translateY(-50%) scale(1.18); }

/* drag */
body.sama-admin .org-card[draggable="true"]{ cursor:grab; }
body.sama-admin .org-card[draggable="true"]:active{ cursor:grabbing; }
body.sama-admin .org-node.is-dragging{ opacity:.4; }
body.sama-admin .org-node.is-drop-target > .org-card .org-card-inner{
  outline:3px dashed #d42020; outline-offset:4px;
  background:rgba(212,32,32,.08) !important;
}

/* toolbar */
body.sama-admin .sama-org-toolbar{
  position:sticky; top:80px; z-index:100;
  display:flex; align-items:center; gap:8px;
  background:rgba(10,11,12,.92); color:#fff;
  border:1px solid rgba(255,255,255,.14); border-radius:99px;
  padding:8px 14px; margin:0 auto 24px; width:fit-content;
  font-size:12px; box-shadow:0 6px 20px rgba(0,0,0,.18);
  flex-wrap:wrap; max-width:100%;
}
body.sama-admin .sama-org-toolbar .lbl{ font-weight:600; padding:0 4px; }
body.sama-admin .sama-org-toolbar button{
  background:#fff; color:#0a0b0c; border:0;
  padding:7px 14px; border-radius:99px; cursor:pointer;
  font-size:12px; font-weight:700;
  transition:all .12s ease;
}
body.sama-admin .sama-org-toolbar button:hover{ background:#f3f4f6; transform:translateY(-1px); }
body.sama-admin .sama-org-toolbar button.ok{ background:#d42020; color:#fff; }
body.sama-admin .sama-org-toolbar button.ok:hover{ background:#b01818; }
body.sama-admin .sama-org-toolbar .msg{ font-size:11px; opacity:0; transition:opacity .15s ease; padding-left:6px; }
body.sama-admin .sama-org-toolbar .msg.ok{ opacity:1; color:#86efac; }
body.sama-admin .sama-org-toolbar .msg.err{ opacity:1; color:#fca5a5; }

/* edit modal */
body.sama-admin .sama-org-modal{
  position:fixed; inset:0; z-index:99999;
  background:rgba(0,0,0,.55); backdrop-filter:blur(4px);
  display:none; align-items:center; justify-content:center; padding:24px;
}
body.sama-admin .sama-org-modal.open{ display:flex; }
body.sama-admin .sama-org-modal .box{
  background:#fff; border-radius:14px;
  width:100%; max-width:460px; max-height:90vh; overflow:auto;
  box-shadow:0 30px 80px rgba(0,0,0,.3);
}
body.sama-admin .sama-org-modal header{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 22px; border-bottom:1px solid #e5e7eb;
}
body.sama-admin .sama-org-modal header .t{ font-size:16px; font-weight:800; }
body.sama-admin .sama-org-modal header .x{
  background:transparent; border:0; font-size:22px; cursor:pointer;
  width:30px; height:30px; border-radius:50%; color:#6b7280;
}
body.sama-admin .sama-org-modal header .x:hover{ background:#f3f4f6; }
body.sama-admin .sama-org-modal .body{ padding:18px 22px; display:grid; gap:12px; }
body.sama-admin .sama-org-modal label{ display:block; font-size:12px; font-weight:600; color:#374151; }
body.sama-admin .sama-org-modal input[type=text],
body.sama-admin .sama-org-modal select,
body.sama-admin .sama-org-modal textarea{
  width:100%; margin-top:5px;
  padding:9px 12px; border:1px solid #d1d5db; border-radius:8px;
  font-size:13px; font-family:inherit;
}
body.sama-admin .sama-org-modal input:focus,
body.sama-admin .sama-org-modal select:focus,
body.sama-admin .sama-org-modal textarea:focus{
  border-color:#d42020; outline:0; box-shadow:0 0 0 3px rgba(212,32,32,.12);
}
body.sama-admin .sama-org-modal .chk{ display:flex; align-items:center; gap:8px; padding:6px 0; }
body.sama-admin .sama-org-modal .chk input{ width:16px; height:16px; }
body.sama-admin .sama-org-modal footer{
  padding:14px 22px; border-top:1px solid #e5e7eb;
  display:flex; justify-content:flex-end; gap:8px;
}
body.sama-admin .sama-org-modal footer button{
  padding:8px 18px; border-radius:8px; border:1px solid #d1d5db;
  background:#fff; cursor:pointer; font-size:13px; font-weight:600;
}
body.sama-admin .sama-org-modal footer button.ok{ background:#d42020; color:#fff; border-color:#d42020; }
body.sama-admin .sama-org-modal footer button.ok:hover{ background:#b01818; }

/* ===== Icon picker v2 ===== */
.sama-icon-modal .sama-imgmgr-modal-inner{ max-width:780px; }
.sama-icon-preview-bar{
  display:flex; align-items:center; gap:18px;
  background:#f3f4f6; border-radius:12px;
  padding:14px 18px; margin:12px 0 14px;
  border:1px solid #e5e7eb;
}
.sama-icon-preview-bar .preview-tile{
  width:64px; height:64px; border-radius:12px;
  background:#fff; border:1px solid #e5e7eb;
  display:flex; align-items:center; justify-content:center;
  font-size:32px; color:#d42020;
  flex-shrink:0;
}
.sama-icon-preview-bar .preview-tile .empty{ font-size:11px; color:#9ca3af; }
.sama-icon-preview-bar .preview-meta{ display:flex; flex-direction:column; gap:6px; min-width:0; flex:1; }
.sama-icon-preview-bar .preview-meta > div{ font-size:12px; color:#6b7280; }
.sama-icon-preview-bar .preview-meta code{
  background:#fff; padding:2px 8px; border-radius:4px;
  font-family:ui-monospace, monospace; color:#0a0b0c;
  border:1px solid #e5e7eb;
}

.sama-icon-search{ display:flex; gap:8px; margin-bottom:14px; }
.sama-icon-search input{
  width:100%; flex:1;
  padding:10px 14px; border:1px solid #d1d5db; border-radius:8px;
  font-size:13px;
}
.sama-icon-search input:focus{ border-color:#d42020; outline:0; box-shadow:0 0 0 3px rgba(212,32,32,.12); }

.sama-icon-grid{
  max-height:420px; overflow-y:auto;
  border:1px solid #e5e7eb; border-radius:10px;
  padding:14px; background:#fafbfc;
}
.sama-icon-grid::-webkit-scrollbar{ width:8px; }
.sama-icon-grid::-webkit-scrollbar-thumb{ background:#cbd5e1; border-radius:4px; }
.sama-icon-group-label{
  font-size:11px; font-weight:700; letter-spacing:.08em;
  color:#6b7280; text-transform:uppercase;
  margin:14px 0 6px; padding-bottom:4px;
  border-bottom:1px dashed #e5e7eb;
}
.sama-icon-group-label:first-child{ margin-top:0; }
.sama-icon-row{
  display:grid; grid-template-columns:repeat(8, 1fr); gap:6px;
  margin-bottom:6px;
}
.sama-icon-btn{
  background:#fff; border:1px solid #e5e7eb; border-radius:8px;
  padding:10px 4px; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; gap:4px;
  font-size:18px; color:#374151;
  transition:all .12s ease;
}
.sama-icon-btn .name{
  font-size:9px; color:#9ca3af; font-weight:500;
  letter-spacing:.02em; max-width:100%;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.sama-icon-btn:hover{ border-color:#d42020; color:#d42020; transform:translateY(-1px); box-shadow:0 4px 8px rgba(0,0,0,.06); }
.sama-icon-btn.is-on{ background:#d42020; color:#fff; border-color:#d42020; }
.sama-icon-btn.is-on .name{ color:rgba(255,255,255,.9); }

.sama-icon-empty{
  text-align:center; padding:40px 20px;
  color:#9ca3af; font-size:13px;
}

.sama-icon-actions{ display:flex; gap:8px; margin-top:14px; }
.sama-icon-actions .btn-cancel{
  background:#fff; color:#0a0b0c; border:1px solid #d1d5db;
  padding:9px 18px; border-radius:8px; cursor:pointer; font-weight:600;
}
.sama-icon-actions .btn-cancel:hover{ background:#f3f4f6; }
.sama-icon-actions .btn-remove{
  background:#fff5f5; color:#d42020; border:1px solid #fecaca;
  padding:9px 16px; border-radius:8px; cursor:pointer; font-weight:600;
  margin-left:auto;
}
.sama-icon-actions .btn-remove:hover{ background:#fee2e2; }
.sama-icon-actions .btn-save{
  background:#d42020; color:#fff; border:0;
  padding:9px 22px; border-radius:8px; cursor:pointer; font-weight:700;
}
.sama-icon-actions .btn-save:hover:not(:disabled){ background:#b01818; }
.sama-icon-actions .btn-save:disabled{ background:#cbd5e1; cursor:not-allowed; }

/* Removed-icon placeholder (admin-only re-add target) */
body.sama-admin .sama-icon-placeholder{
  display:inline-flex; align-items:center; justify-content:center;
  width:1.4em; height:1.4em; min-width:24px; min-height:24px;
  border:2px dashed #cbd5e1; border-radius:6px;
  background:#fafbfc; color:#9ca3af;
  font-size:14px; font-weight:600; line-height:1;
  cursor:pointer; padding:0;
  vertical-align:middle;
  transition:all .15s ease;
}
body.sama-admin .sama-icon-placeholder:hover{
  border-color:#d42020; color:#d42020; background:#fff5f5;
  transform:scale(1.08);
}
body.sama-admin .sama-icon-placeholder span{ display:inline-block; }

/* Editable icon visual hint */
body.sama-admin .sama-icon-editable{
  outline:1px dashed transparent; outline-offset:2px;
  transition:outline-color .15s ease;
  border-radius:4px;
}
body.sama-admin .sama-icon-editable:hover{ outline-color:rgba(212,32,32,.5); }

/* ===================================================================
   Mobility — Product Gallery (auto from hotspots) + Lightbox modal
   =================================================================== */

/* ----- Gallery section ----- */
.mb5-gallery{
  background:linear-gradient(180deg, #ffffff 0%, #f5f7fa 100%);
  padding:80px 24px 100px;
  border-top:1px solid #e5e7eb;
}
.mb5-gallery-inner{ max-width:1400px; margin:0 auto; }
.mb5-gallery-head{ text-align:center; margin-bottom:36px; }
.mb5-gallery-head .eyebrow{
  display:inline-block; font-family:"Montserrat", sans-serif;
  font-size:11px; font-weight:700; letter-spacing:.32em;
  color:#d42020; margin-bottom:14px;
}
.mb5-gallery-head h2{
  font-size:clamp(28px, 3.4vw, 42px); font-weight:800;
  color:#0a0b0c; letter-spacing:-.025em; line-height:1.2;
  margin:0 0 12px;
}
.mb5-gallery-head .lead{
  font-size:14px; color:#6b7280; max-width:520px;
  margin:0 auto; line-height:1.65;
}
.mb5-gallery-tabs{
  display:flex; justify-content:center; gap:6px;
  margin:0 auto 32px; padding:6px;
  background:#fff; border:1px solid #e5e7eb; border-radius:99px;
  width:fit-content;
}
.mb5-gallery-tabs .gtab{
  background:transparent; border:0; padding:8px 22px;
  font-family:"Montserrat", sans-serif;
  font-size:12px; font-weight:700; letter-spacing:.18em;
  color:#6b7280; cursor:pointer; border-radius:99px;
  transition:all .2s ease;
}
.mb5-gallery-tabs .gtab:hover{ color:#0a0b0c; }
.mb5-gallery-tabs .gtab.is-active{
  background:#d42020; color:#fff;
  box-shadow:0 4px 12px rgba(212,32,32,.32);
}

.mb5-gallery-grid{
  display:grid; gap:18px;
  grid-template-columns:repeat(auto-fill, minmax(240px, 1fr));
}
.mb5-gallery-empty{
  text-align:center; padding:60px 20px;
  color:#9ca3af;
}
.mb5-gallery-empty i{ font-size:48px; color:#cbd5e1; margin-bottom:14px; display:block; }
.mb5-gallery-empty p{ font-size:14px; line-height:1.65; margin:0; }

/* Gallery card */
.mb5-gcard{
  background:#fff; border:1px solid #e5e7eb; border-radius:14px;
  overflow:hidden; cursor:pointer;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display:flex; flex-direction:column;
}
.mb5-gcard:hover{
  transform:translateY(-4px);
  box-shadow:0 16px 36px rgba(0,0,0,.10);
  border-color:#d42020;
}
.mb5-gcard-img{
  width:100%; aspect-ratio:4 / 3;
  background:#f3f4f6 center/cover no-repeat;
  position:relative; overflow:hidden;
}
.mb5-gcard-img.is-svg{ background-size:cover; }
.mb5-gcard-img::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, transparent 60%, rgba(0,0,0,.18));
  opacity:0; transition:opacity .25s ease;
}
.mb5-gcard:hover .mb5-gcard-img::after{ opacity:1; }
.mb5-gcard-zoom{
  position:absolute; top:12px; right:12px;
  width:34px; height:34px; border-radius:50%;
  background:rgba(255,255,255,.95); color:#0a0b0c;
  display:flex; align-items:center; justify-content:center;
  opacity:0; transform:translateY(-4px) scale(.9);
  transition:opacity .25s ease, transform .25s ease;
  font-size:13px;
}
.mb5-gcard:hover .mb5-gcard-zoom{ opacity:1; transform:translateY(0) scale(1); }
.mb5-gcard-meta{ padding:14px 16px 18px; }
.mb5-gcard-cat{
  font-family:"Montserrat", sans-serif;
  font-size:10px; font-weight:700; letter-spacing:.18em;
  color:#d42020; margin-bottom:6px;
}
.mb5-gcard-name{
  font-size:14px; font-weight:700; color:#0a0b0c;
  line-height:1.4; word-break:keep-all;
}
.mb5-gcard-view{
  display:inline-block; margin-top:6px;
  font-size:10px; padding:2px 8px; border-radius:99px;
  background:#f3f4f6; color:#6b7280; font-weight:600;
}

/* ----- Lightbox modal (2-column) ----- */
.mb5-lightbox{
  position:fixed; inset:0; z-index:9999;
  display:none; align-items:center; justify-content:center;
  padding:24px;
}
.mb5-lightbox.is-open{ display:flex; }
.mb5-lb-backdrop{
  position:absolute; inset:0;
  background:rgba(10,11,12,.78); backdrop-filter:blur(6px);
  cursor:pointer;
  animation:mb5LbFadeIn .25s ease;
}
.mb5-lb-box{
  position:relative; z-index:1;
  width:100%; max-width:1080px; max-height:90vh;
  background:#fff; border-radius:18px;
  box-shadow:0 40px 100px rgba(0,0,0,.45);
  overflow:hidden;
  animation:mb5LbZoomIn .3s cubic-bezier(.16,1,.3,1);
}
@keyframes mb5LbFadeIn { from { opacity:0 } to { opacity:1 } }
@keyframes mb5LbZoomIn { from { opacity:0; transform:scale(.94) } to { opacity:1; transform:scale(1) } }

.mb5-lb-grid{
  display:grid; grid-template-columns:1.1fr 1fr;
  min-height:480px; max-height:90vh;
}
.mb5-lb-image{
  background:#fff center/contain no-repeat;
  position:relative;
  display:flex; align-items:center; justify-content:center;
  border-right:1px solid #f3f4f6;
}
.mb5-lb-empty{
  color:#cbd5e1; font-size:80px;
}
.mb5-lb-content{
  padding:48px 44px;
  display:flex; flex-direction:column; gap:14px;
  overflow-y:auto;
}
.mb5-lb-cat{
  font-family:"Montserrat", sans-serif;
  font-size:11px; font-weight:700; letter-spacing:.28em;
  color:#d42020; text-transform:uppercase;
}
.mb5-lb-title{
  font-size:30px; font-weight:800; color:#0a0b0c;
  letter-spacing:-.02em; line-height:1.2;
  margin:0; word-break:keep-all;
}
.mb5-lb-desc{
  font-size:15px; line-height:1.75; color:#374151;
  margin:6px 0 0; word-break:keep-all;
  white-space:pre-line;
}
.mb5-lb-meta{
  margin-top:auto; padding-top:24px;
  border-top:1px solid #e5e7eb;
  display:flex; justify-content:space-between; align-items:center;
  font-size:12px; color:#9ca3af;
}
.mb5-lb-view{ font-weight:700; color:#d42020; }

.mb5-lb-close{
  position:absolute; top:14px; right:14px; z-index:10;
  width:40px; height:40px; border-radius:50%;
  background:rgba(255,255,255,.95); color:#0a0b0c; border:0;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  box-shadow:0 4px 12px rgba(0,0,0,.18);
  transition:all .2s ease;
}
.mb5-lb-close:hover{ background:#d42020; color:#fff; transform:rotate(90deg); }

.mb5-lb-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:48px; height:48px; border-radius:50%;
  background:rgba(255,255,255,.95); color:#0a0b0c; border:0;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  box-shadow:0 4px 16px rgba(0,0,0,.2);
  transition:all .2s ease;
  z-index:10;
}
.mb5-lb-nav.prev{ left:16px; }
.mb5-lb-nav.next{ right:16px; }
.mb5-lb-nav:hover{ background:#d42020; color:#fff; transform:translateY(-50%) scale(1.08); }

@media (max-width:760px){
  .mb5-lightbox{ padding:0; }
  .mb5-lb-box{ max-width:100%; max-height:100vh; border-radius:0; }
  .mb5-lb-grid{
    grid-template-columns:1fr;
    grid-template-rows:46vh 1fr;
    max-height:100vh;
  }
  .mb5-lb-content{ padding:28px 22px; }
  .mb5-lb-title{ font-size:22px; }
  .mb5-lb-desc{ font-size:14px; }
  .mb5-lb-nav{ width:40px; height:40px; }
  .mb5-lb-nav.prev{ left:8px; }
  .mb5-lb-nav.next{ right:8px; }
}

/* Per-slide camera button (admin only) on ix3Hero */
body.sama-admin .sama-slide-cam{
  position:absolute; top:auto; bottom:24px; left:50%;
  transform:translateX(-50%);
  z-index:2147483646;
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 18px; border-radius:99px;
  background:rgba(212,32,32,.96); color:#fff; border:2px solid #fff;
  font-size:13px; font-weight:700; cursor:pointer;
  box-shadow:0 8px 22px rgba(0,0,0,.28);
  transition:transform .15s ease, background .15s ease;
}
/* removed: camera now lives directly under .ix3-hero, always visible */

body.sama-admin .sama-slide-cam:hover{
  background:#b01818; transform:translateX(-50%) scale(1.05);
}
body.sama-admin .sama-slide-cam i{ font-size:14px; }
@media (max-width:760px){
  body.sama-admin .sama-slide-cam{ bottom:14px; padding:8px 14px; font-size:12px; }
}

/* ============================================================
   FIX (2026-05-14): pencil clipping + slide click-through
   + "내 드라이브" picker modal
   ============================================================ */

/* 1) sub-hero text editing — defeat overflow:hidden of .sn-vhero
   so pencil at top:-12px right:-12px isn't clipped */
body.sama-admin .sn-vhero{ overflow:visible !important; }
body.sama-admin .sn-vhero-text,
body.sama-admin .sn-vhero-inner{ overflow:visible !important; }
/* extra-safe: nudge lead pencil INSIDE the box */
body.sama-admin .sn-vhero-lead.sama-text-editable{ padding-right:34px; }
body.sama-admin .sn-vhero-lead .sama-text-pencil{ top:-4px; right:-4px; }

/* 2) main slider: non-active slides intercept clicks above active slide
   making the "이미지 변경" button unclickable. Disable pointer events on
   non-active slides (keep on active so its camera button still fires). */
body.sama-admin .ix3-hero-slide{ pointer-events:none; }
body.sama-admin .ix3-hero-slide.is-on{ pointer-events:auto; }
/* And ensure camera floats above any inner overlays/veils */
body.sama-admin .sama-slide-cam{ z-index:2147483646; pointer-events:auto; }

/* 3) "내 드라이브" — uploaded images library */
body.sama-admin .sama-drive-section{ margin-top:14px; }
body.sama-admin .sama-drive-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:8px; gap:12px;
}
body.sama-admin .sama-drive-head h4{
  margin:0; font-size:13px; font-weight:700; color:#1a1d1f;
  display:flex; align-items:center; gap:8px;
}
body.sama-admin .sama-drive-head h4 i{ color:#d42020; }
body.sama-admin .sama-drive-search{
  flex:1; max-width:200px;
  padding:6px 10px; border:1px solid #e5e7eb; border-radius:6px;
  font-size:12px; outline:none;
}
body.sama-admin .sama-drive-search:focus{ border-color:#d42020; }
body.sama-admin .sama-drive-grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(70px,1fr));
  gap:6px; max-height:170px; overflow-y:auto;
  padding:8px; background:#fafbfc; border:1px solid #eef0f3; border-radius:8px;
}
body.sama-admin .sama-drive-grid::-webkit-scrollbar{ width:6px; }
body.sama-admin .sama-drive-grid::-webkit-scrollbar-thumb{ background:#cdd2d8; border-radius:3px; }
body.sama-admin .sama-drive-item{
  position:relative; cursor:pointer;
  border:2px solid transparent; border-radius:6px; overflow:hidden;
  background:#fff; transition:border-color .15s ease, transform .15s ease;
  aspect-ratio:1/1;
}
body.sama-admin .sama-drive-item:hover{ border-color:#d42020; transform:scale(1.04); }
body.sama-admin .sama-drive-item.is-on{ border-color:#d42020; }
body.sama-admin .sama-drive-item img{
  width:100%; height:100%; object-fit:cover; display:block;
}
body.sama-admin .sama-drive-item .sama-drive-name{
  position:absolute; bottom:0; left:0; right:0;
  padding:3px 4px; font-size:9px; line-height:1.2;
  color:#fff; background:rgba(0,0,0,.55);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
body.sama-admin .sama-drive-empty{
  padding:24px 12px; text-align:center; color:#8a8f95; font-size:12px;
}
body.sama-admin .sama-drive-loading{
  padding:24px 12px; text-align:center; color:#5a6068; font-size:12px;
}

/* 4) page category picker (sub-hero dropdown) */
body.sama-admin .sn-vhero-drops{ position:relative; }
body.sama-admin .sama-cat-edit-btn{
  position:absolute; top:-14px; right:-14px;
  width:32px; height:32px; border-radius:50%;
  background:#d42020; color:#fff; border:2px solid #fff;
  display:none; align-items:center; justify-content:center;
  cursor:pointer; z-index:60;
  box-shadow:0 4px 12px rgba(0,0,0,.25);
  transition:transform .15s ease;
}
body.sama-admin .sama-cat-edit-btn:hover{ transform:scale(1.1); background:#b01818; }
body.sama-admin .sn-vhero-drops:hover > .sama-cat-edit-btn,
body.sama-admin .sama-cat-edit-btn:focus-visible{ display:flex; }

body.sama-admin .sama-cat-modal .sama-imgmgr-modal-inner{ max-width:480px; }
body.sama-admin .sama-cat-row{ margin:14px 0; }
body.sama-admin .sama-cat-row label{
  display:block; font-size:12px; font-weight:700; color:#1a1d1f; margin-bottom:6px;
}
body.sama-admin .sama-cat-row select{
  width:100%; padding:10px 12px; border:1px solid #e5e7eb; border-radius:8px;
  font-size:14px; background:#fff; outline:none; cursor:pointer;
}
body.sama-admin .sama-cat-row select:focus{ border-color:#d42020; }
body.sama-admin .sama-cat-hint{
  margin-top:4px; font-size:11px; color:#8a8f95;
}


/* ============================================================
   사용 가이드 (Help) FAB + Modal
   ============================================================ */
body.sama-admin .sama-help-fab{
  position:fixed; right:20px; top:120px;
  width:46px; height:46px; border-radius:50%;
  background:#1a1d1f; color:#fff; border:2px solid #fff;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; z-index:99996;
  box-shadow:0 6px 18px rgba(0,0,0,.25);
  font-size:18px;
  transition:background .15s ease, transform .15s ease;
}
body.sama-admin .sama-help-fab:hover{
  background:#d42020; transform:scale(1.08);
}
body.sama-admin .sama-help-fab i{ font-weight:900; }

/* Help modal — wider than other modals */
body.sama-admin .sama-help-modal .sama-imgmgr-modal-inner.sama-help-inner{
  max-width:880px; width:92vw;
  padding:0; overflow:hidden;
  position:relative;
}
body.sama-admin .sama-help-close{
  position:absolute; top:14px; right:14px; z-index:5;
  width:32px; height:32px; border-radius:50%;
  background:rgba(0,0,0,.06); border:none; color:#1a1d1f;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:background .15s ease;
}
body.sama-admin .sama-help-close:hover{ background:#d42020; color:#fff; }

body.sama-admin .sama-help-layout{
  display:grid; grid-template-columns:240px 1fr;
  min-height:520px; max-height:80vh;
}
body.sama-admin .sama-help-side{
  background:#fafbfc; border-right:1px solid #eef0f3;
  padding:20px 0 20px 0;
  overflow-y:auto;
}
body.sama-admin .sama-help-side h3{
  margin:0 20px 14px; font-size:14px; font-weight:800; color:#1a1d1f;
  display:flex; align-items:center; gap:8px;
}
body.sama-admin .sama-help-side h3 i{ color:#d42020; }
body.sama-admin .sama-help-tabs{
  list-style:none; margin:0; padding:0;
}
body.sama-admin .sama-help-tab{
  display:flex; align-items:center; gap:10px;
  padding:10px 20px; cursor:pointer; font-size:13px;
  color:#5a6068; border-left:3px solid transparent;
  transition:background .12s ease, color .12s ease;
}
body.sama-admin .sama-help-tab i{ width:18px; text-align:center; color:#9aa0a6; }
body.sama-admin .sama-help-tab:hover{
  background:#fff; color:#1a1d1f;
}
body.sama-admin .sama-help-tab.is-on{
  background:#fff; color:#d42020; font-weight:700;
  border-left-color:#d42020;
}
body.sama-admin .sama-help-tab.is-on i{ color:#d42020; }

body.sama-admin .sama-help-body{
  padding:32px 36px; overflow-y:auto;
  max-height:80vh;
  color:#1a1d1f; line-height:1.65;
}
body.sama-admin .sama-help-body h2{
  margin:0 0 18px; font-size:22px; font-weight:800; color:#1a1d1f;
  padding-bottom:12px; border-bottom:2px solid #f1f3f5;
}
body.sama-admin .sama-help-body h3{
  margin:24px 0 10px; font-size:15px; font-weight:700; color:#d42020;
}
body.sama-admin .sama-help-body p{ margin:0 0 12px; font-size:14px; color:#3a4046; }
body.sama-admin .sama-help-body ul,
body.sama-admin .sama-help-body ol{
  margin:0 0 16px; padding-left:24px; font-size:14px; color:#3a4046;
}
body.sama-admin .sama-help-body li{ margin-bottom:6px; }
body.sama-admin .sama-help-body li ul,
body.sama-admin .sama-help-body li ol{ margin-top:6px; margin-bottom:6px; }
body.sama-admin .sama-help-body strong{ color:#1a1d1f; font-weight:700; }
body.sama-admin .sama-help-body code{
  background:#f1f3f5; padding:2px 6px; border-radius:4px;
  font-family:Menlo, Monaco, Consolas, monospace; font-size:12.5px;
  color:#d42020;
}
body.sama-admin .sama-help-body kbd{
  display:inline-block; padding:2px 7px;
  background:#1a1d1f; color:#fff; border-radius:4px;
  font-family:Menlo, Monaco, Consolas, monospace; font-size:11px;
  vertical-align:middle; box-shadow:0 2px 0 rgba(0,0,0,.2);
}
body.sama-admin .sama-help-body i{
  display:inline-block; width:18px; text-align:center;
  color:#d42020; vertical-align:middle;
}
body.sama-admin .sama-help-tip{
  background:#fff8e6; border-left:3px solid #f5b800;
  padding:10px 14px; margin:14px 0; border-radius:4px;
  font-size:13px !important; color:#5a4500 !important;
}

/* Mobile */
@media (max-width:760px){
  body.sama-admin .sama-help-fab{ right:14px; top:100px; width:42px; height:42px; }
  body.sama-admin .sama-help-layout{
    grid-template-columns:1fr; min-height:auto;
  }
  body.sama-admin .sama-help-side{
    border-right:none; border-bottom:1px solid #eef0f3;
    max-height:160px;
  }
  body.sama-admin .sama-help-tabs{ display:flex; overflow-x:auto; padding:0 12px; gap:4px; }
  body.sama-admin .sama-help-tab{
    flex:0 0 auto; border-left:none; border-bottom:3px solid transparent;
    padding:8px 12px; white-space:nowrap;
  }
  body.sama-admin .sama-help-tab.is-on{ border-bottom-color:#d42020; border-left-color:transparent; }
  body.sama-admin .sama-help-body{ padding:20px 18px; }
}


/* ============================================================
   수정 이력 (History) FAB + Side Panel
   ============================================================ */
body.sama-admin .sama-hist-fab{
  position:fixed; right:20px; top:176px;
  width:46px; height:46px; border-radius:50%;
  background:#1a1d1f; color:#fff; border:2px solid #fff;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; z-index:99996;
  box-shadow:0 6px 18px rgba(0,0,0,.25);
  font-size:18px;
  transition:background .15s ease, transform .15s ease;
}
body.sama-admin .sama-hist-fab:hover{ background:#d42020; transform:scale(1.08); }

body.sama-admin .sama-hist-panel{
  position:fixed; top:0; right:0; bottom:0;
  width:420px; max-width:96vw;
  background:#fff; z-index:99997;
  box-shadow:-6px 0 24px rgba(0,0,0,.18);
  display:flex; flex-direction:column;
  transform:translateX(100%);
  transition:transform .25s ease;
}
body.sama-admin .sama-hist-panel.is-open{ transform:translateX(0); }

body.sama-admin .sama-hist-head{
  display:flex; align-items:center; gap:8px;
  padding:14px 16px; border-bottom:1px solid #eef0f3;
  background:#fafbfc;
}
body.sama-admin .sama-hist-head h3{
  margin:0; flex:1; font-size:15px; font-weight:800; color:#1a1d1f;
  display:flex; align-items:center; gap:8px;
}
body.sama-admin .sama-hist-head h3 i{ color:#d42020; }
body.sama-admin .sama-hist-head button{
  width:32px; height:32px; border-radius:6px;
  background:transparent; color:#5a6068; border:none;
  cursor:pointer; transition:background .15s ease;
  display:flex; align-items:center; justify-content:center;
}
body.sama-admin .sama-hist-head button:hover{ background:#eef0f3; color:#1a1d1f; }

body.sama-admin .sama-hist-search-row{
  display:flex; gap:8px; padding:10px 16px;
  border-bottom:1px solid #eef0f3;
}
body.sama-admin .sama-hist-search-row input{
  flex:1; padding:7px 10px;
  border:1px solid #e5e7eb; border-radius:6px;
  font-size:12px; outline:none;
}
body.sama-admin .sama-hist-search-row input:focus{ border-color:#d42020; }
body.sama-admin .sama-hist-search-row select{
  padding:7px 10px; border:1px solid #e5e7eb; border-radius:6px;
  font-size:12px; background:#fff; cursor:pointer; outline:none;
}

body.sama-admin .sama-hist-list{
  flex:1; overflow-y:auto; padding:10px 12px;
  background:#f7f8fa;
}
body.sama-admin .sama-hist-list::-webkit-scrollbar{ width:7px; }
body.sama-admin .sama-hist-list::-webkit-scrollbar-thumb{
  background:#cdd2d8; border-radius:3px;
}
body.sama-admin .sama-hist-loading,
body.sama-admin .sama-hist-empty{
  padding:32px 16px; text-align:center; color:#8a8f95; font-size:13px;
}

body.sama-admin .sama-hist-item{
  background:#fff; border:1px solid #eef0f3; border-radius:8px;
  padding:12px 14px; margin-bottom:10px;
  transition:border-color .12s ease, box-shadow .12s ease;
}
body.sama-admin .sama-hist-item:hover{
  border-color:#d42020; box-shadow:0 4px 12px rgba(212,32,32,.06);
}
body.sama-admin .sama-hist-item header{
  display:flex; align-items:center; gap:8px; margin-bottom:6px;
}
body.sama-admin .sama-hist-cat{
  display:inline-block; padding:2px 8px; border-radius:99px;
  font-size:10px; font-weight:700; color:#fff; background:#5a6068;
  letter-spacing:.02em;
}
body.sama-admin .sama-hist-cat-texts{ background:#3b82f6; }
body.sama-admin .sama-hist-cat-images{ background:#10b981; }
body.sama-admin .sama-hist-cat-slides{ background:#f59e0b; }
body.sama-admin .sama-hist-cat-lists{ background:#8b5cf6; }
body.sama-admin .sama-hist-cat-tables{ background:#ec4899; }
body.sama-admin .sama-hist-cat-icons{ background:#06b6d4; }
body.sama-admin .sama-hist-cat-colors{ background:#ef4444; }
body.sama-admin .sama-hist-cat-files{ background:#84cc16; }
body.sama-admin .sama-hist-cat-pageCategoryMap{ background:#6366f1; }
body.sama-admin .sama-hist-cat-history_timeline{ background:#a16207; }
body.sama-admin .sama-hist-cat-org{ background:#0ea5e9; }
body.sama-admin .sama-hist-tag.revert{
  background:#fee2e2; color:#dc2626;
  font-size:10px; padding:2px 8px; border-radius:99px; font-weight:700;
}
body.sama-admin .sama-hist-time{
  margin-left:auto; font-size:11px; color:#8a8f95;
}
body.sama-admin .sama-hist-key{
  font-family:Menlo, Monaco, Consolas, monospace;
  font-size:11px; color:#6b7280;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  margin-bottom:4px;
}
body.sama-admin .sama-hist-summary{
  font-size:12.5px; color:#1a1d1f; line-height:1.45;
  word-break:break-word;
}
body.sama-admin .sama-hist-path{
  font-size:10.5px; color:#9aa0a6; margin-top:4px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
body.sama-admin .sama-hist-item footer{
  display:flex; gap:6px; margin-top:10px;
  padding-top:8px; border-top:1px dashed #eef0f3;
}
body.sama-admin .sama-hist-toggle,
body.sama-admin .sama-hist-revert{
  padding:5px 11px; border-radius:6px; border:1px solid #e5e7eb;
  background:#fff; font-size:11.5px; cursor:pointer;
  transition:all .15s ease;
}
body.sama-admin .sama-hist-toggle:hover{
  background:#f3f4f6; border-color:#9aa0a6;
}
body.sama-admin .sama-hist-revert{
  margin-left:auto;
  background:#1a1d1f; color:#fff; border-color:#1a1d1f;
  font-weight:700;
}
body.sama-admin .sama-hist-revert:hover{ background:#d42020; border-color:#d42020; }
body.sama-admin .sama-hist-revert:disabled{ opacity:.6; cursor:wait; }

body.sama-admin .sama-hist-detail{
  margin-top:10px; padding-top:10px; border-top:1px solid #eef0f3;
  display:grid; grid-template-columns:1fr 1fr; gap:10px;
}
body.sama-admin .sama-hist-side strong{
  display:block; font-size:11px; font-weight:700;
  color:#5a6068; margin-bottom:4px; text-transform:uppercase;
}
body.sama-admin .sama-hist-side pre{
  background:#0f1115; color:#9efb9e; padding:8px;
  border-radius:5px; font-size:10.5px;
  max-height:160px; overflow:auto;
  margin:0; white-space:pre-wrap; word-break:break-all;
  font-family:Menlo, Monaco, Consolas, monospace; line-height:1.4;
}

@media (max-width:760px){
  body.sama-admin .sama-hist-fab{ right:14px; top:148px; width:42px; height:42px; }
  body.sama-admin .sama-hist-panel{ width:100vw; }
  body.sama-admin .sama-hist-detail{ grid-template-columns:1fr; }
}

/* FIX (2026-05-14 v2): camera button click reach
   .ix3-hero-content has z-index:3 + height:100% so its empty bottom area
   intercepted clicks. With the camera now at hero level (sibling of content),
   add belt-and-suspenders: empty content area passes through to camera. */
body.sama-admin .ix3-hero-content{ pointer-events:none; }
body.sama-admin .ix3-hero-content > *{ pointer-events:auto; }
body.sama-admin .ix3-hero-slide{ pointer-events:none; }
body.sama-admin .ix3-hero-slide.is-on{ pointer-events:auto; }


/* ============================================================
   슬라이드 편집 모달 — 슬라이드 탭 스트립
   ============================================================ */
body.sama-admin .sama-slide-tabs{
  display:flex; gap:6px;
  margin:10px 0 16px;
  padding:6px 4px;
  border-bottom:1px solid #eef0f3;
  overflow-x:auto;
  scrollbar-width:thin;
}
body.sama-admin .sama-slide-tabs::-webkit-scrollbar{ height:6px; }
body.sama-admin .sama-slide-tabs::-webkit-scrollbar-thumb{ background:#cdd2d8; border-radius:3px; }

body.sama-admin .sama-slide-tab{
  flex:0 0 auto;
  display:flex; align-items:center; gap:8px;
  padding:8px 14px 8px 10px;
  background:#fff; color:#5a6068;
  border:1.5px solid #e5e7eb; border-radius:8px;
  cursor:pointer; font-size:12px;
  transition:all .15s ease;
  min-width:140px; max-width:220px;
  text-align:left;
}
body.sama-admin .sama-slide-tab:hover{
  border-color:#d42020; color:#1a1d1f;
  transform:translateY(-1px);
}
body.sama-admin .sama-slide-tab.is-on{
  background:#d42020; color:#fff;
  border-color:#d42020;
  box-shadow:0 4px 12px rgba(212,32,32,.25);
}
body.sama-admin .sama-slide-tab .n{
  display:inline-flex; align-items:center; justify-content:center;
  width:24px; height:24px; border-radius:50%;
  background:rgba(0,0,0,.06); color:#1a1d1f;
  font-weight:800; font-size:11px;
  flex-shrink:0;
}
body.sama-admin .sama-slide-tab.is-on .n{
  background:rgba(255,255,255,.25); color:#fff;
}
body.sama-admin .sama-slide-tab .l{
  display:flex; flex-direction:column; line-height:1.2;
  overflow:hidden;
}
body.sama-admin .sama-slide-tab .l b{
  font-size:11.5px; font-weight:700;
  white-space:nowrap;
}
body.sama-admin .sama-slide-tab .l small{
  font-size:10px; opacity:.8;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* + 추가 버튼 */
body.sama-admin .sama-slide-tab.is-add{
  min-width:auto;
  padding:8px 14px;
  border-style:dashed;
  color:#9aa0a6;
  justify-content:center;
}
body.sama-admin .sama-slide-tab.is-add:hover{
  color:#d42020; border-color:#d42020;
  background:#fff5f5;
}
body.sama-admin .sama-slide-tab.is-add i{ font-size:13px; }

@media (max-width:760px){
  body.sama-admin .sama-slide-tab{ min-width:120px; padding:7px 11px 7px 8px; }
  body.sama-admin .sama-slide-tab .l small{ display:none; }
}


/* ============================================================
   관리자 FAB 통합 컬럼 (2026-05-14)
   - 우측 단일 세로 컬럼에 모두 정렬
   - "관리자 메뉴" 라벨이 컬럼 상단에 표시됨
   - 모바일에서 크기 축소 + 겹침 방지
   ============================================================ */

/* 컬럼 라벨 (admin only) */
body.sama-admin::before{
  content: "관리자 메뉴";
  position: fixed;
  top: 86px; right: 16px;
  z-index: 99998;
  background: #d42020; color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 4px 10px;
  border-radius: 99px 99px 0 0;
  letter-spacing: .03em;
  pointer-events: none;
  box-shadow: 0 -2px 6px rgba(0,0,0,.12);
}

/* 모든 admin FAB 강제 통합: 우측 16px, 동일 폭 46px */
body.sama-admin .sama-help-fab,
body.sama-admin .sama-hist-fab,
body.sama-admin .sama-fonts-fab,
.sn-topbtn{
  right: 16px !important;
  width: 46px !important;
  height: 46px !important;
}

/* 세로 스택 (위 → 아래): help → hist → fonts → topBtn */
body.sama-admin .sama-help-fab{
  top: 110px !important; bottom: auto !important;
  z-index: 99996;
}
body.sama-admin .sama-hist-fab{
  top: 162px !important; bottom: auto !important;
  z-index: 99996;
}
body.sama-admin .sama-fonts-fab{
  top: 214px !important; bottom: auto !important;
  z-index: 99996;
}
/* 스크롤-탑 버튼은 컬럼 맨 아래 (스크롤 시에만 노출) */
.sn-topbtn{
  top: auto !important; bottom: 18px !important;
  z-index: 99996 !important;
}
body.sama-admin .sn-topbtn{
  /* 어드민 컬럼과 시각적으로 통일 */
  top: 266px !important; bottom: auto !important;
}

/* admin이 아닌 사용자에게는 컬럼 라벨 안 보이고 sn-topbtn은 본래 위치 */
body:not(.sama-admin)::before{ content: none; }

/* 모바일: 라벨 숨기고 FAB는 더 작게 */
@media (max-width: 760px){
  body.sama-admin::before{ display: none; }
  body.sama-admin .sama-help-fab,
  body.sama-admin .sama-hist-fab,
  body.sama-admin .sama-fonts-fab,
  body.sama-admin .sn-topbtn{
    right: 10px !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 14px;
  }
  body.sama-admin .sama-help-fab{ top: 88px !important; }
  body.sama-admin .sama-hist-fab{ top: 134px !important; }
  body.sama-admin .sama-fonts-fab{ top: 180px !important; }
  body.sama-admin .sn-topbtn{ top: 226px !important; }
}


/* ============================================================
   SAMA — Unified FAB Dock
   - Single trigger at bottom-right + expandable menu
   - Hides all legacy FABs
   ============================================================ */

/* HIDE all legacy FABs (we replace them) */
.sn-topbtn,
.sn-fab-top,
.sn-qc,
body.sama-admin .sama-help-fab,
body.sama-admin .sama-hist-fab,
body.sama-admin .sama-fonts-fab{
  display: none !important;
}

/* Remove old "관리자 메뉴" label chip */
body.sama-admin::before{ content: none !important; }

/* ---- Dock container ---- */
.sama-dock{
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 99996;
  display: flex; flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* ---- Trigger button ---- */
.sama-dock-trig{
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #d42020; color: #fff;
  border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 22px;
  box-shadow: 0 6px 22px rgba(0,0,0,.25);
  transition: transform .18s ease, background .18s ease;
  position: relative;
}
.sama-dock-trig:hover{ background:#b01818; transform: scale(1.05); }
.sama-dock.is-open .sama-dock-trig{ background:#1a1d1f; transform: rotate(90deg); }

/* Icon swap (closed → open) */
.sama-dock-icon-closed,
.sama-dock-icon-open{
  position: absolute;
  transition: opacity .15s ease, transform .15s ease;
}
.sama-dock-icon-open{ opacity: 0; transform: rotate(-90deg); }
.sama-dock.is-open .sama-dock-icon-closed{ opacity: 0; transform: rotate(90deg); }
.sama-dock.is-open .sama-dock-icon-open{ opacity: 1; transform: rotate(0); }

/* ---- Menu panel ---- */
.sama-dock-menu{
  display: none;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  padding: 12px;
  border-radius: 14px;
  box-shadow: 0 12px 38px rgba(0,0,0,.18);
  min-width: 240px; max-width: 290px;
}
.sama-dock.is-open .sama-dock-menu{
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  animation: sama-dock-pop .18s ease-out;
  animation-fill-mode: forwards;
}
@keyframes sama-dock-pop {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Menu items ---- */
.sama-dock-item{
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer; text-decoration: none;
  color: #1a1d1f;
  transition: background .12s ease, border-color .12s ease;
  text-align: left;
  font-family: inherit; font-size: 13px;
  width: 100%;
}
.sama-dock-item:hover{
  background: #f7f8fa;
  border-color: #eef0f3;
}
.sama-dock-item .ic{
  flex: 0 0 auto;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px;
}
.sama-dock-item .lbl{
  display: flex; flex-direction: column; line-height: 1.25; min-width: 0;
}
.sama-dock-item .lbl b{
  font-size: 13px; font-weight: 700; color: #1a1d1f;
}
.sama-dock-item .lbl small{
  font-size: 11px; color: #6b7280; font-weight: normal;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- Divider for admin section ---- */
.sama-dock-divider{
  display: flex; align-items: center; gap: 8px;
  margin: 6px 4px 2px;
  font-size: 10px; font-weight: 700; color: #d42020;
  letter-spacing: .04em;
}
.sama-dock-divider::before,
.sama-dock-divider::after{
  content: ""; flex: 1; height: 1px; background: #eef0f3;
}

/* ---- Mobile ---- */
@media (max-width: 760px){
  .sama-dock{ right: 14px; bottom: 14px; gap: 10px; }
  .sama-dock-trig{ width: 50px; height: 50px; font-size: 19px; }
  .sama-dock-menu{ min-width: 220px; max-width: calc(100vw - 28px); }
}


/* ============================================================
   SAMA Unified FAB Bar v2 — always-visible icon column
   - All icons (chat, phone, email, etc.) in a single vertical strip
   - No separate trigger button (the chat icon is now a menu item too)
   - Hover reveals label tooltip
   ============================================================ */

/* HIDE all v1 dock chrome + legacy FABs */
.sn-topbtn,
.sn-fab-top,
.sn-qc,
.sama-dock-trig,
.sama-dock-menu,
.sama-dock-divider,
body.sama-admin .sama-help-fab,
body.sama-admin .sama-hist-fab,
body.sama-admin .sama-fonts-fab{
  display: none !important;
}
body.sama-admin::before{ content: none !important; }

/* ---- Unified bar ---- */
.sama-dock.sama-dock-bar{
  position: fixed;
  right: 16px; bottom: 18px;
  z-index: 99996;
  display: flex; flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
}

/* Each icon */
.sama-dock-icon{
  display: flex; align-items: center; gap: 0;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,.10);
  cursor: pointer;
  text-decoration: none;
  color: #1a1d1f;
  font-family: inherit;
  padding: 0;
  overflow: hidden;
  transition: all .2s ease;
  max-width: 50px;
}
.sama-dock-icon:hover{
  max-width: 240px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  transform: translateX(-2px);
}
.sama-dock-icon .ic{
  flex: 0 0 auto;
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 17px;
}
.sama-dock-icon .lbl{
  flex: 0 0 auto;
  padding: 0 18px 0 12px;
  font-size: 13px; font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .15s ease .05s;
  pointer-events: none;
}
.sama-dock-icon:hover .lbl{ opacity: 1; }

/* ---- Mobile ---- */
@media (max-width: 760px){
  .sama-dock.sama-dock-bar{
    right: 12px; bottom: 12px;
    gap: 6px;
  }
  .sama-dock-icon{ max-width: 44px; }
  .sama-dock-icon:hover{ max-width: 200px; }
  .sama-dock-icon .ic{ width: 44px; height: 44px; font-size: 15px; }
  .sama-dock-icon .lbl{ font-size: 12px; padding: 0 14px 0 10px; }
}


/* ============================================================
   SAMA Speed-Dial FAB v3
   - Single trigger button at bottom-right
   - Items animate in/out vertically when expanded
   ============================================================ */

/* HIDE every legacy / older-version dock element */
.sn-topbtn,
.sn-fab-top,
.sn-qc,
.sama-dock-bar .sama-dock-icon,
.sama-dock-bar,
.sama-dock-trig.sama-dock-icon,
body.sama-admin .sama-help-fab,
body.sama-admin .sama-hist-fab,
body.sama-admin .sama-fonts-fab{
  display: none !important;
}
body.sama-admin::before{ content: none !important; }

/* ---- Speed-dial container ---- */
.sama-dock.sama-dock-sd{
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 99996;
  display: flex; flex-direction: column;
  align-items: flex-end;
  gap: 0;
  pointer-events: none;
}

/* ---- Trigger button ---- */
.sama-dock-sd .sama-sd-trig{
  pointer-events: auto;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #d42020; color: #fff;
  border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 22px;
  box-shadow: 0 8px 24px rgba(212,32,32,.35);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), background .2s ease;
  position: relative;
  margin-top: 14px;
}
.sama-dock-sd .sama-sd-trig:hover{ background:#b01818; transform: scale(1.06); }
.sama-dock-sd.is-open .sama-sd-trig{
  background: #1a1d1f;
  transform: rotate(135deg);
}
/* Icon swap (closed→open) */
.sama-sd-ico-closed,
.sama-sd-ico-open{
  position: absolute;
  transition: opacity .15s ease, transform .15s ease;
}
.sama-sd-ico-open{ opacity: 0; transform: rotate(-45deg); }
.sama-dock-sd.is-open .sama-sd-ico-closed{ opacity: 0; transform: rotate(-45deg); }
.sama-dock-sd.is-open .sama-sd-ico-open{ opacity: 1; transform: rotate(-135deg); }

/* ---- Menu (vertical column above trigger) ---- */
.sama-dock-sd .sama-sd-menu{
  display: flex; flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 0;
  pointer-events: none;
}
.sama-dock-sd.is-open .sama-sd-menu{ pointer-events: auto; }

/* ---- Items (animate in stagger) ---- */
.sama-sd-item{
  display: none;
  align-items: center;
  background: transparent;
  border: none; cursor: pointer; text-decoration: none;
  color: #1a1d1f;
  padding: 0;
  opacity: 1;
}
.sama-dock-sd.is-open .sama-sd-item{
  display: flex !important;
  opacity: 1 !important;
  transform: none !important;
}
/* removed: animation handles open state */
/* Stagger: top items animate slightly later */
.sama-sd-item .ic{
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  border: 2px solid #fff;
}
.sama-sd-item .lbl{
  margin-right: 10px;
  background: rgba(26,29,31,.92);
  color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  order: -1;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}
.sama-sd-item:hover .lbl{
  opacity: 1;
  transform: translateX(0);
}

/* ---- Mobile ---- */
@media (max-width: 760px){
  .sama-dock.sama-dock-sd{ right: 14px; bottom: 14px; }
  .sama-dock-sd .sama-sd-trig{ width: 52px; height: 52px; font-size: 19px; }
  .sama-sd-item .ic{ width: 42px; height: 42px; font-size: 14px; }
  .sama-sd-item .lbl{ display: none; } /* tooltips hidden on mobile */
}


/* ============================================================
   Box-Style editor — palette button + modal
   ============================================================ */
body.sama-admin .sama-box-edit-btn{
  position: absolute;
  top: 10px; right: 10px;
  z-index: 50;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(212,32,32,.95);
  color: #fff; border: 2px solid #fff;
  display: none;
  align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  transition: transform .15s ease;
}
body.sama-admin .hist-stats:hover > .sama-box-edit-btn,
body.sama-admin .hist-rail:hover > .sama-box-edit-btn,
body.sama-admin .esg-philo:hover > .sama-box-edit-btn,
body.sama-admin .esg-foot:hover > .sama-box-edit-btn,
body.sama-admin .sn-vision-hero:hover > .sama-box-edit-btn,
body.sama-admin .sn-card:hover > .sama-box-edit-btn{
  display: flex;
}
body.sama-admin .sama-box-edit-btn:hover{ transform: scale(1.1); background: #b01818; }

/* Modal */
body.sama-admin .sama-box-modal .sama-imgmgr-modal-inner.sama-box-inner{
  max-width: 580px;
}
body.sama-admin .sama-box-grid{
  display: flex; flex-direction: column; gap: 14px;
  margin: 16px 0;
}
body.sama-admin .sama-box-row{
  display: flex; flex-direction: column; gap: 8px;
}
body.sama-admin .sama-box-row > label{
  font-size: 12px; font-weight: 700; color: #1a1d1f;
  display: flex; align-items: center; gap: 8px;
}
body.sama-admin .sama-box-row > label small{
  color: #9aa0a6; font-weight: normal; margin-left: auto;
}
body.sama-admin .sama-box-row select,
body.sama-admin .sama-box-row input[type="range"]{
  padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 6px;
  font-size: 13px; outline: none; background: #fff;
}
body.sama-admin .sama-box-row input[type="color"]{
  width: 50px; height: 36px; padding: 0; border: 1px solid #e5e7eb;
  border-radius: 6px; cursor: pointer;
}
body.sama-admin .sama-box-bg-controls{
  display: flex; gap: 8px; align-items: center;
}
body.sama-admin .sama-box-bg-controls select{ flex: 1; }
body.sama-admin .sama-box-presets{
  display: flex; flex-wrap: wrap; gap: 6px;
}
body.sama-admin .sama-box-presets button{
  padding: 6px 12px; font-size: 11px;
  background: #f7f8fa; border: 1px solid #e5e7eb;
  border-radius: 999px; cursor: pointer;
  transition: all .12s ease;
}
body.sama-admin .sama-box-presets button:hover{
  background: #fff; border-color: #d42020; color: #d42020;
}


/* ============================================================
   슬라이드 텍스트 인라인 편집 — 작은 연필 + 저장 툴바
   ============================================================ */
body.sama-admin .sama-slide-text-pencil{
  position: absolute !important;
  top: -10px; right: -10px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(212,32,32,.95); color: #fff;
  border: 2px solid #fff;
  display: none;
  align-items: center; justify-content: center;
  cursor: pointer; z-index: 10;
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
}
body.sama-admin [data-slide-field]:hover > .sama-slide-text-pencil{
  display: flex;
}
body.sama-admin [data-slide-field].sama-editing{
  outline: 2px dashed #d42020;
  outline-offset: 4px;
  cursor: text;
  background: rgba(0,0,0,.25);
}

/* Save/Cancel toolbar */
body.sama-admin .sama-slide-text-tb{
  background: #1a1d1f;
  border-radius: 8px;
  padding: 6px;
  gap: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  align-items: center;
}
body.sama-admin .sama-slide-text-tb button{
  padding: 6px 12px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; gap: 5px;
}
body.sama-admin .sama-slide-text-tb button[data-act="save"]{
  background: #d42020; border-color: #d42020;
}
body.sama-admin .sama-slide-text-tb button:hover{
  background: rgba(255,255,255,.12);
}
body.sama-admin .sama-slide-text-tb button[data-act="save"]:hover{
  background: #b01818;
}
body.sama-admin .sama-slide-text-tb .msg{
  font-size: 11px; color: #9aa0a6; padding: 0 8px;
}

/* List editor reorder buttons */
body.sama-admin .sama-list-move{
  position:absolute;
  width:24px; height:24px;
  border-radius:50%;
  background:rgba(26,29,31,.85); color:#fff;
  border:2px solid #fff;
  display:none;
  align-items:center; justify-content:center;
  cursor:pointer; z-index:11;
  box-shadow:0 2px 6px rgba(0,0,0,.25);
}
body.sama-admin .sama-list-item:hover > .sama-list-move{ display:flex; }
body.sama-admin .sama-list-move:hover{ background:#d42020; transform:scale(1.1); }
body.sama-admin .sama-list-move-up{ top:8px; left:8px; }
body.sama-admin .sama-list-move-down{ top:38px; left:8px; }

/* ============================================================
   sn-card 균등 높이 (텍스트 양 무관, 행 간에도 동일)
   ============================================================ */
.sn-grid{ grid-auto-rows: 1fr; }
.sn-grid > .sn-card{
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}
/* 본문 desc가 가운데 영역을 채우도록 — 모든 카드 하단 정렬 일치 */
.sn-grid > .sn-card .card-desc,
.sn-grid > .sn-card > p:last-child{
  margin-top: auto;
  margin-bottom: auto;
}
/* 프로세스 카드처럼 number/title/desc 구조에서, 번호와 제목은 위에 두고 desc는 가운데 채움 */
.sn-grid > .sama-process-card{
  justify-content: center;
}

/* Hero-copy editor — restore pointer-events for admin so pencil clickable */
body.sama-admin .mb5 .hero-copy{ pointer-events: auto; }
body.sama-admin .mb5 .hero-copy > *{ pointer-events: auto; }


/* ============================================================
   Simple scroll-to-top button (replaces speed-dial)
   ============================================================ */

/* Hide every previous FAB/dock variant */
.sn-topbtn,
.sn-fab-top,
.sn-qc,
.sama-dock,
.sama-dock-bar,
.sama-dock-sd,
.sama-dock-trig,
.sama-dock-menu,
.sama-dock-item,
.sama-sd-trig,
.sama-sd-menu,
.sama-sd-item,
body.sama-admin .sama-help-fab,
body.sama-admin .sama-hist-fab,
body.sama-admin .sama-fonts-fab{
  display: none !important;
}
body.sama-admin::before{ content: none !important; }

/* The single top button */
.sama-top-only{
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 99996;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: #1a1d1f;
  color: #fff;
  border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s, background .15s ease;
}
.sama-top-only.is-visible{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.sama-top-only:hover{
  background: #d42020;
  transform: translateY(-2px);
}

@media (max-width: 760px){
  .sama-top-only{ right: 14px; bottom: 14px; width: 44px; height: 44px; }
}

/* List items inside <a> — admin needs to edit text without navigating */
body.sama-admin a.ix3-biz[data-list-item]{ pointer-events: auto; }
body.sama-admin a.ix3-biz[data-list-item] [data-field]{ pointer-events: auto; }
/* Admin: hide BOTH image and href URL text; show only a floating icon button */
body.sama-admin .ix3-biz [data-field="image"],
body.sama-admin .ix3-biz [data-field="href"]{
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
  opacity: 0; pointer-events: none;
}
/* Floating LINK edit icon button (top-left of pic) */
body.sama-admin .ix3-biz{ position: relative; }
/* Link edit icon — positioned INSIDE the body section (below image), no overflow break */
body.sama-admin .ix3-biz .sama-link-edit-icon{
  position: absolute !important;
  bottom: 16px !important; left: 16px !important;
  top: auto !important; right: auto !important;
  z-index: 50;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #1a1d1f;
  color: #fff;
  border: 2px solid #fff;
  display: flex !important; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  transition: transform .15s ease, background .15s ease;
}
body.sama-admin .ix3-biz .sama-link-edit-icon:hover{
  background: #d42020;
  transform: scale(1.1);
}
body.sama-admin .ix3-biz .sama-link-edit-icon svg{ display:block; }
/* Ensure .en stays as block-level second line in title — was getting affected by my hidden rules */
body.sama-admin .ix3-biz-body h3 .en[data-field="en"]{
  display: block !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .16em !important;
  color: var(--c-mute) !important;
  margin-top: 4px !important;
}

/* ix3-biz-admin-space: give the body extra bottom padding so the floating link icon
   doesn't overlap the description text. */
body.sama-admin .ix3-biz .ix3-biz-body{
  padding-bottom: 64px !important;
  position: relative;
}



/* ============================================================
   Link Picker modal
   ============================================================ */
body.sama-admin .sama-link-modal .sama-imgmgr-modal-inner.sama-link-inner{
  max-width: 480px;
}
body.sama-admin .sama-link-row{
  margin: 14px 0;
}
body.sama-admin .sama-link-row label{
  display: block;
  font-size: 12px; font-weight: 700; color: #1a1d1f;
  margin-bottom: 6px;
}
body.sama-admin .sama-link-row select,
body.sama-admin .sama-link-row input{
  width: 100%; padding: 10px 12px;
  border: 1px solid #e5e7eb; border-radius: 8px;
  font-size: 13px; outline: none;
  font-family: inherit;
}
body.sama-admin .sama-link-row input{
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}
body.sama-admin .sama-link-row select:focus,
body.sama-admin .sama-link-row input:focus{
  border-color: #d42020;
}
body.sama-admin .sama-link-hint{
  margin-top: 4px;
  font-size: 11px; color: #8a8f95;
}
body.sama-admin .sama-link-presets{
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 10px 0;
}
body.sama-admin .sama-link-presets button{
  padding: 6px 12px;
  background: #f7f8fa; border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-size: 11px; cursor: pointer;
  transition: all .12s ease;
  font-family: Menlo, Monaco, monospace;
}
body.sama-admin .sama-link-presets button:hover{
  background: #fff; border-color: #d42020; color: #d42020;
}
