/* Timeline Sejarah — Search Page (Add-on) */
#tehs-root{font-family:Montserrat,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
#tehs-root *{box-sizing:border-box}
#tehs-root{--tehs-bg:rgba(12,12,12,.03);--tehs-border:rgba(0,0,0,.10);--tehs-soft:rgba(0,0,0,.06);--tehs-text:#111;--tehs-muted:rgba(17,17,17,.65);--tehs-accent:#111;--tehs-radius:16px;--tehs-maxw:1100px;--tehs-gap:14px;max-width:min(var(--tehs-maxw),calc(100% - 32px));margin:18px auto;padding:16px}
#tehs-root .tehs-header{background:var(--tehs-bg);border:1px solid var(--tehs-border);border-radius:20px;padding:16px}
#tehs-root .tehs-titlebar{display:flex;flex-direction:column;gap:6px}
#tehs-root .tehs-title{font-family:Cinzel,serif;font-weight:700;letter-spacing:.3px;font-size:24px;color:var(--tehs-text)}
#tehs-root .tehs-sub{font-size:13px;color:var(--tehs-muted);line-height:1.4}
#tehs-root .tehs-controls{margin-top:14px;display:flex;flex-direction:column;gap:12px}
#tehs-root .tehs-search{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
#tehs-root .tehs-q{flex:1 1 320px;min-width:220px;border:1px solid var(--tehs-border);border-radius:14px;padding:10px 12px;font-size:14px;outline:none;background:#fff}
#tehs-root .tehs-q:focus{border-color:rgba(0,0,0,.35);box-shadow:0 0 0 4px rgba(0,0,0,.06)}
#tehs-root .tehs-btn{border:1px solid var(--tehs-border);background:#fff;color:var(--tehs-text);border-radius:14px;padding:10px 12px;font-weight:600;font-size:13px;cursor:pointer;transition:.15s transform,.15s background,.15s border-color}
#tehs-root .tehs-btn:active{transform:scale(.98)}
#tehs-root .tehs-btn-primary{background:var(--tehs-primary-bg,#111);color:var(--tehs-primary-text,#fff);border-color:var(--tehs-primary-bg,#111)}
#tehs-root .tehs-btn-primary:hover{background:var(--tehs-primary-bg-hover,#000);border-color:var(--tehs-primary-bg-hover,#000)}
#tehs-root .tehs-btn-ghost{background:transparent}
#tehs-root .tehs-btn-ghost:hover{background:rgba(0,0,0,.04)}
#tehs-root .tehs-toolbar{display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;align-items:center}
#tehs-root .tehs-tabs{display:flex;flex-wrap:wrap;gap:8px}
#tehs-root .tehs-tab{display:flex;align-items:center;gap:7px;border:1px solid var(--tehs-chip-border,#d9d9d9);background:var(--tehs-chip-bg,#fff);color:var(--tehs-chip-text,#111);border-radius:999px;padding:8px 10px;font-weight:800;font-size:12px;cursor:pointer;transition:.15s background,.15s border-color,.15s color}
#tehs-root .tehs-tab:hover{background:var(--tehs-chip-hover-bg,#f4f4f4)}
#tehs-root .tehs-tab.is-active{background:var(--tehs-chip-active-bg,#111);color:var(--tehs-chip-active-text,#fff);border-color:var(--tehs-chip-active-border,#111)}
#tehs-root .tehs-sort{display:flex;gap:8px;align-items:center}
#tehs-root .tehs-ico{display:inline-flex;align-items:center;justify-content:center}
#tehs-root .tehs-ico svg{display:block}
#tehs-root .tehs-btn-chip{border-radius:999px;padding:8px 12px;font-weight:800;font-size:12px;background:var(--tehs-chip-bg,#fff);color:var(--tehs-chip-text,#111);border-color:var(--tehs-chip-border,#d9d9d9)}
#tehs-root .tehs-btn-chip:hover{background:var(--tehs-chip-hover-bg,#f4f4f4)}
#tehs-root .tehs-btn-chip.is-active{background:var(--tehs-chip-active-bg,#111);color:var(--tehs-chip-active-text,#fff);border-color:var(--tehs-chip-active-border,#111)}

#tehs-root .tehs-status{font-size:13px;color:var(--tehs-muted);min-height:18px}

#tehs-root .tehs-list{margin-top:16px;display:flex;flex-direction:column;gap:14px}
#tehs-root .tehs-item{display:grid;grid-template-columns:92px 1fr;gap:14px;align-items:stretch}
#tehs-root .tehs-century{position:relative;display:flex;align-items:flex-start;justify-content:flex-end;padding-right:10px}
#tehs-root .tehs-century::after{content:"";position:absolute;right:2px;top:0;bottom:0;width:2px;background:rgba(0,0,0,.18);border-radius:2px}
#tehs-root .tehs-century-label{font-family:Cinzel,serif;font-weight:700;font-size:12px;letter-spacing:.2px;color:rgba(0,0,0,.75);padding:6px 8px;border:1px solid var(--tehs-border);background:#fff;border-radius:12px;position:sticky;top:16px;margin-top:4px}
#tehs-root .tehs-century-label.is-empty{visibility:hidden}

#tehs-root .tehs-card{border:1px solid var(--tehs-border);background:#fff;border-radius:22px;padding:14px;display:grid;grid-template-columns:clamp(92px,12vw,132px) 1fr;gap:14px;align-items:start}
#tehs-root .tehs-img{width:100%;aspect-ratio:1/1;border-radius:18px;object-fit:cover;background:var(--tehs-soft);display:block;cursor:pointer}
#tehs-root .tehs-meta{display:flex;align-items:center;gap:10px;margin-top:2px}
#tehs-root .tehs-flag{width:18px;height:18px;border-radius:6px;object-fit:cover;display:block;border:1px solid rgba(0,0,0,.12);background:rgba(0,0,0,.05);cursor:pointer}
#tehs-root .tehs-date{font-weight:700;font-size:12px;color:rgba(17,17,17,.75)}
#tehs-root .tehs-year{font-weight:900;font-size:13px;color:#111;letter-spacing:.15px}
#tehs-root .tehs-type{font-size:12px;font-weight:700;color:rgba(17,17,17,.55);margin-left:auto;border:1px solid rgba(0,0,0,.10);border-radius:999px;padding:5px 9px}
#tehs-root .tehs-h3{margin:8px 0 6px 0;font-family:Cinzel,serif;font-size:18px;line-height:1.25;letter-spacing:.2px;color:#111}
#tehs-root .tehs-desc{font-size:13px;line-height:1.55;color:var(--tehs-muted);margin:0 0 10px 0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
#tehs-root .tehs-desc.is-expanded{display:block;-webkit-line-clamp:unset;overflow:visible}
#tehs-root .tehs-source{display:inline-flex;gap:8px;align-items:center;font-size:13px;font-weight:700;color:#111;text-decoration:none}
#tehs-root .tehs-source:hover{text-decoration:underline}
#tehs-root .tehs-tags{margin-top:10px;display:flex;flex-wrap:wrap;gap:8px}
#tehs-root .tehs-tag{font-size:12px;font-weight:700;color:rgba(17,17,17,.75);border:1px solid rgba(0,0,0,.10);background:rgba(0,0,0,.02);border-radius:999px;padding:6px 10px}

#tehs-root .tehs-note{border:1px solid var(--tehs-border);background:#fff;border-radius:18px;padding:12px;font-size:13px;color:var(--tehs-muted)}

#tehs-root .tehs-footer{margin-top:16px;display:flex;justify-content:center}
#tehs-root .tehs-load{min-width:180px}
#tehs-root .tehs-footer.is-hidden{display:none}
#tehs-root .tehs-lb{position:fixed;inset:0;display:none;align-items:center;justify-content:center;padding:16px;z-index:999999}
#tehs-root .tehs-lb.is-open{display:flex}
#tehs-root .tehs-lb-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.75)}
#tehs-root .tehs-lb-panel{position:relative;z-index:1;max-width:min(980px,92vw);max-height:84vh;background:#111;border-radius:18px;padding:12px;border:1px solid rgba(255,255,255,.10);display:flex;flex-direction:column;gap:10px}
#tehs-root .tehs-lb-img{width:100%;height:auto;max-height:72vh;object-fit:contain;border-radius:14px;background:#000}
#tehs-root .tehs-lb-cap{color:rgba(255,255,255,.85);font-size:13px;font-weight:600}
#tehs-root .tehs-lb-close{position:absolute;top:8px;right:10px;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.15);color:#fff;border-radius:12px;width:34px;height:34px;font-size:22px;line-height:28px;cursor:pointer}

@media (max-width:760px){
  #tehs-root{max-width:calc(100% - 22px);padding:12px}
  #tehs-root .tehs-header{padding:14px}
  #tehs-root .tehs-title{font-size:20px}
  #tehs-root .tehs-item{grid-template-columns:74px 1fr}
  #tehs-root .tehs-century{padding-right:8px}
  #tehs-root .tehs-card{grid-template-columns:1fr;gap:12px}
  #tehs-root .tehs-flag{width:18px;height:18px}
  #tehs-root .tehs-h3{font-size:17px}
  #tehs-root .tehs-century-label{font-size:10px;padding:4px 6px;border-radius:10px;max-width:62px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #tehs-root .tehs-tag{font-size:10px;padding:5px 8px}
  #tehs-root .tehs-date{font-size:11px}
  #tehs-root .tehs-desc{cursor:pointer}
}
