/* SAM Yeobseo Ledger v0.1.0 */
.sam-ledger-wrap{max-width:920px;margin:30px auto;padding:0 16px;font-family:system-ui,-apple-system,Segoe UI,Roboto,Apple SD Gothic Neo,Pretendard,Noto Sans KR,Arial,sans-serif;}
.sam-ledger-card{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:16px;box-shadow:0 10px 30px rgba(0,0,0,.06);padding:18px;}
.sam-ledger-card h2{margin:0 0 12px;font-size:22px;letter-spacing:-.2px;}
.sam-ledger-muted{opacity:.65;font-size:13px;}
.sam-ledger-preview{display:flex;gap:14px;align-items:flex-start;border:1px solid rgba(0,0,0,.06);border-radius:14px;padding:12px;margin:10px 0 14px;background:rgba(0,0,0,.02);}
.sam-ledger-thumb{width:110px;height:165px;object-fit:cover;border-radius:12px;border:1px solid rgba(0,0,0,.08);background:#f3f3f3;flex:0 0 auto;aspect-ratio:2/3;}
.sam-ledger-meta{flex:1;min-width:0;}
.sam-ledger-title{font-weight:700;font-size:16px;line-height:1.25;margin-bottom:6px;word-break:break-word;}
.sam-ledger-from{font-size:14px;margin-bottom:8px;}
.sam-ledger-link{font-size:13px;text-decoration:none;border-bottom:1px dashed rgba(0,0,0,.25);}
.sam-ledger-row{display:flex;gap:10px;align-items:center;margin:10px 0;flex-wrap:wrap;}
.sam-ledger-row label{min-width:60px;font-size:13px;opacity:.75;}
.sam-ledger-row input{flex:1;min-width:220px;padding:10px 12px;border-radius:12px;border:1px solid rgba(0,0,0,.14);outline:none;}
.sam-ledger-actions{margin-top:14px;}
.sam-ledger-btn{appearance:none;border:1px solid rgba(0,0,0,.14);background:#fff;border-radius:12px;padding:10px 12px;font-size:13px;cursor:pointer;text-decoration:none;color:inherit;display:inline-flex;align-items:center;gap:8px;}
.sam-ledger-btn:hover{border-color:rgba(0,0,0,.28);}
.sam-ledger-btn:disabled{opacity:.45;cursor:not-allowed;}
.sam-ledger-primary{background:#111;color:#fff;border-color:#111;}
.sam-ledger-primary:hover{filter:brightness(1.1);}
.sam-ledger-ghost{background:transparent;}
.sam-ledger-danger{border-color:rgba(220,38,38,.35);color:#b91c1c;}
.sam-ledger-danger:hover{border-color:rgba(220,38,38,.65);}
.sam-ledger-msg{margin-top:12px;font-size:13px;padding:10px 12px;border-radius:12px;border:1px solid transparent;}
.sam-ledger-msg.is-ok{background:rgba(16,185,129,.08);border-color:rgba(16,185,129,.25);}
.sam-ledger-msg.is-err{background:rgba(239,68,68,.06);border-color:rgba(239,68,68,.22);}
.sam-ledger-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px;}
.sam-ledger-head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.sam-ledger-list{margin-top:12px;display:flex;flex-direction:column;gap:10px;}
.sam-ledger-item{display:flex;gap:12px;align-items:center;border:1px solid rgba(0,0,0,.06);border-radius:14px;padding:12px;background:rgba(0,0,0,.02);}
.sam-ledger-item .sam-ledger-thumb{width:76px;height:114px;}
.sam-ledger-item .sam-ledger-meta{flex:1;}
.sam-ledger-sub{display:flex;gap:12px;align-items:center;flex-wrap:wrap;}
.sam-ledger-item-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.sam-ledger-view{min-width:82px;justify-content:center;}
.sam-ledger-session-email{display:inline-block;font-size:.8em;color:#2a9d8f;margin-left:8px;font-weight:700;}
.sam-ledger-empty{opacity:.7;padding:16px;border:1px dashed rgba(0,0,0,.18);border-radius:14px;text-align:center;}
@media (max-width:520px){
  .sam-ledger-thumb{width:88px;height:132px;}
  .sam-ledger-row label{min-width:auto;width:100%;}
  .sam-ledger-row input{min-width:0;width:100%;}
}


.sam-ledger-entry{display:flex;flex-direction:column;gap:10px;}
.sam-ledger-item{align-items:flex-start;}
.sam-ledger-linkbtn{appearance:none;border:0;background:transparent;padding:0;font:inherit;font-size:13px;cursor:pointer;border-bottom:1px dashed rgba(0,0,0,.25);color:inherit;font-weight:600;}
.sam-ledger-linkbtn:hover{opacity:.75;}
.sam-ledger-preview-panel{margin:-2px 0 2px 88px;border:1px solid rgba(0,0,0,.06);border-radius:18px;background:#fff;padding:12px;box-shadow:0 10px 24px rgba(0,0,0,.05);}
.sam-ledger-preview-shell{display:flex;flex-direction:column;gap:10px;}
.sam-ledger-preview-frame{display:block;width:100%;min-height:720px;border:0;border-radius:16px;background:#f6f6f6;}
.sam-ledger-preview-help{font-size:12px;opacity:.68;}
@media (max-width:860px){
  .sam-ledger-preview-panel{margin-left:0;}
}


/* v0.1.58 mailbox button update + modal + Elementor hard reset */
.sam-ledger-wrap .sam-ledger-link,
.sam-ledger-wrap button.sam-ledger-linkbtn,
.elementor .sam-ledger-wrap .sam-ledger-link,
.elementor .sam-ledger-wrap button.sam-ledger-linkbtn,
[class*="elementor-kit-"] .sam-ledger-wrap .sam-ledger-link,
[class*="elementor-kit-"] .sam-ledger-wrap button.sam-ledger-linkbtn{
  -webkit-appearance:none !important; appearance:none !important;
  display:inline !important; padding:0 !important; margin:0 !important;
  background:transparent !important; border:0 !important; border-radius:0 !important;
  box-shadow:none !important; min-height:0 !important; min-width:0 !important;
  color:inherit !important; font:inherit !important; font-size:13px !important; font-weight:500 !important;
  line-height:1.3 !important; text-decoration:none !important; border-bottom:1px dashed rgba(0,0,0,.35) !important;
  cursor:pointer !important; vertical-align:baseline !important;
}
.sam-ledger-wrap .sam-ledger-link:hover,
.sam-ledger-wrap button.sam-ledger-linkbtn:hover{opacity:.75;}

.sam-ledger-wrap .sam-ledger-btn,
.elementor .sam-ledger-wrap .sam-ledger-btn,
[class*="elementor-kit-"] .sam-ledger-wrap .sam-ledger-btn,
[class*="elementor-kit-"] .sam-ledger-wrap button.sam-ledger-btn,
.elementor .sam-ledger-wrap button.sam-ledger-btn{
  -webkit-appearance:none !important; appearance:none !important;
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
  gap:8px !important; min-height:42px !important;
  padding:10px 18px !important; border-radius:999px !important;
  border:1px solid rgba(0,0,0,.12) !important; background:#fff !important; color:#222 !important;
  box-shadow:0 1px 2px rgba(0,0,0,.04) !important; text-decoration:none !important;
  font-size:14px !important; font-weight:500 !important; line-height:1.2 !important;
}
.sam-ledger-wrap .sam-ledger-btn:hover{border-color:rgba(0,0,0,.2) !important;background:#fafafa !important;}
.sam-ledger-wrap .sam-ledger-btn:disabled{opacity:.45 !important;cursor:not-allowed !important;}
.sam-ledger-wrap .sam-ledger-view,
.sam-ledger-wrap .sam-ledger-danger,
.sam-ledger-wrap .sam-ledger-head-actions .sam-ledger-btn,
.sam-ledger-wrap [data-auth="logout"].sam-ledger-btn{color:#222 !important;border-color:rgba(0,0,0,.12) !important;background:#fff !important;}
.sam-ledger-wrap .sam-ledger-primary{background:#fff !important;color:#222 !important;border-color:rgba(0,0,0,.12) !important;}
.sam-ledger-wrap .sam-ledger-head-actions{gap:12px;}
.sam-ledger-wrap .sam-ledger-item-actions{gap:12px;}
.sam-ledger-wrap .sam-ledger-item-actions .sam-ledger-btn{min-width:110px;}
.sam-ledger-wrap .sam-ledger-modal[hidden]{display:none !important;}
.sam-ledger-wrap .sam-ledger-modal{position:fixed; inset:0; z-index:99999; display:flex; align-items:center; justify-content:center; padding:20px;}
.sam-ledger-wrap .sam-ledger-modal-backdrop{position:absolute; inset:0; background:rgba(0,0,0,.35);}
.sam-ledger-wrap .sam-ledger-modal-card{position:relative; width:min(520px, 100%); background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:22px; box-shadow:0 20px 60px rgba(0,0,0,.18); padding:20px;}
.sam-ledger-wrap .sam-ledger-modal-title{margin:0 0 8px; font-size:20px; line-height:1.2;}
.sam-ledger-wrap .sam-ledger-modal-text{margin:0; font-size:14px; line-height:1.6; color:#444;}
.sam-ledger-wrap .sam-ledger-modal-actions{display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; margin-top:18px;}
.sam-ledger-wrap .sam-ledger-import-input{display:none;}


.sam-ledger-wrap .sam-ledger-modal-preview[hidden]{display:none !important;}
.sam-ledger-wrap .sam-ledger-modal-preview{margin-top:14px; padding:14px 14px 10px; border:1px solid rgba(0,0,0,.08); border-radius:16px; background:#fafafa;}
.sam-ledger-wrap .sam-ledger-modal-summary{display:grid; gap:6px; margin-bottom:10px; font-size:14px; color:#222;}
.sam-ledger-wrap .sam-ledger-modal-warning{color:#a04b00;}
.sam-ledger-wrap .sam-ledger-modal-list{margin:0; padding-left:20px; display:grid; gap:8px;}
.sam-ledger-wrap .sam-ledger-modal-list li{margin:0; color:#222; line-height:1.45;}
.sam-ledger-wrap .sam-ledger-modal-item-num{opacity:.7;}
.sam-ledger-wrap .sam-ledger-modal-item-title{font-weight:600;}
.sam-ledger-wrap .sam-ledger-modal-item-site{color:#666; font-size:13px;}
.sam-ledger-wrap .sam-ledger-modal-more{margin-top:10px; font-size:13px; color:#666;}
.sam-ledger-wrap .sam-ledger-modal-empty{font-size:13px; color:#666;}


/* v0.1.63 mailbox preview inline expansion */
.sam-ledger-list{gap:12px;}
.sam-ledger-entry{
  display:flex;
  flex-direction:column;
  gap:0;
  border:1px solid rgba(0,0,0,.08);
  border-radius:16px;
  background:rgba(0,0,0,.02);
  overflow:hidden;
}
.sam-ledger-item{
  align-items:flex-start;
  border:0;
  border-radius:0;
  background:transparent;
  padding:12px;
}
.sam-ledger-preview-panel{
  margin:0;
  border:0;
  border-top:1px solid rgba(0,0,0,.12);
  border-radius:0;
  background:transparent;
  padding:16px 16px 14px;
  box-shadow:none;
}
.sam-ledger-preview-shell{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}
.sam-ledger-preview-frame{
  display:block;
  width:min(100%, 640px);
  min-height:800px;
  border:0;
  border-radius:16px;
  background:#f6f6f6;
  margin:0 auto;
}
.sam-ledger-preview-help{
  width:100%;
  text-align:center;
  font-size:12px;
  opacity:.68;
}
.sam-ledger-preview-actions{
  display:flex;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  width:100%;
}
.sam-ledger-preview-actions .sam-ledger-btn{min-width:110px;}
.sam-ledger-entry.is-preview-open{
  background:rgba(0,0,0,.02);
}
@media (max-width:860px){
  .sam-ledger-preview-panel{padding:14px 12px 12px;}
  .sam-ledger-preview-frame{width:100%; min-height:740px;}
}

/* v0.1.67 responsive mailbox layout */
@media (max-width:600px){
  .sam-ledger-wrap{
    width:100%;
    max-width:100%;
    margin:12px auto;
    padding:0 10px;
    box-sizing:border-box;
  }
  .sam-ledger-card{padding:16px 12px;border-radius:16px;}
  .sam-ledger-head{display:block;margin-bottom:14px;}
  .sam-ledger-card .sam-ledger-head h2{
    margin:0 0 14px;
    font-size:clamp(26px, 8vw, 34px);
    line-height:1.12;
    overflow-wrap:anywhere;
  }
  .sam-ledger-session-email{
    display:block;
    margin:8px 0 0;
    font-size:.72em;
    line-height:1.25;
  }
  .sam-ledger-head-actions{width:100%;gap:8px !important;}
  .sam-ledger-head-actions .sam-ledger-btn{
    min-width:0 !important;
    max-width:100%;
  }
  .sam-ledger-item{
    display:grid;
    grid-template-columns:76px minmax(0, 1fr);
    gap:10px 12px;
    align-items:start;
    padding:12px;
  }
  .sam-ledger-item .sam-ledger-thumb{
    grid-column:1;
    grid-row:1;
    width:76px;
    height:114px;
  }
  .sam-ledger-item .sam-ledger-meta{
    grid-column:2;
    grid-row:1;
    width:100%;
    min-width:0;
  }
  .sam-ledger-title{
    font-size:15px;
    line-height:1.35;
    word-break:normal;
    overflow-wrap:anywhere;
  }
  .sam-ledger-from{overflow-wrap:anywhere;}
  .sam-ledger-sub{gap:6px 10px;}
  .sam-ledger-item-actions{
    grid-column:1 / -1;
    grid-row:2;
    width:100%;
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:8px !important;
  }
  .sam-ledger-item-actions .sam-ledger-btn{
    width:100%;
    min-width:0 !important;
  }
  .sam-ledger-preview-panel{padding:10px 8px 12px;}
  .sam-ledger-preview-frame{min-height:700px;border-radius:12px;}
  .sam-ledger-preview-actions{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:8px;}
  .sam-ledger-preview-actions .sam-ledger-btn{width:100%;min-width:0 !important;}
}

@media (max-width:360px){
  .sam-ledger-item{grid-template-columns:64px minmax(0, 1fr);gap:10px;}
  .sam-ledger-item .sam-ledger-thumb{width:64px;height:96px;}
  .sam-ledger-head-actions{display:grid;grid-template-columns:1fr;}
  .sam-ledger-head-actions .sam-ledger-btn{width:100%;}
}
