  :root{
    --ink:#1a1712;
    --bottle:#1f3b30;
    --bottle-deep:#162a22;
    --brass:#b98b4e;
    --brass-bright:#d9ab6e;
    --parchment:#efe8d8;
    --parchment-dim:#e2d9c4;
    --oxblood:#6e2a34;
    --cream-text:#f3eedf;
    --line:rgba(185,139,78,0.35);
  }
  *{box-sizing:border-box;}
  html{scroll-behavior:smooth;}
  body{
    margin:0;
    background:var(--parchment);
    color:var(--ink);
    font-family:'Inter',sans-serif;
    font-size:16px;
    line-height:1.55;
    -webkit-font-smoothing:antialiased;
  }
  h1,h2,h3,.display{
    font-family:'Fraunces',serif;
    font-weight:600;
    margin:0;
    color:var(--ink);
  }
  a{color:inherit;}
  button{font-family:inherit;cursor:pointer;}
  img,svg{max-width:100%;display:block;}

  /* ---------- HEADER ---------- */
  header.site{
    position:sticky;top:0;z-index:40;
    background:var(--bottle);
    border-bottom:3px solid var(--brass);
  }
  .site-inner{
    max-width:1180px;margin:0 auto;
    display:flex;align-items:center;justify-content:space-between;
    padding:16px 24px;
  }
  .wordmark{
    display:flex;align-items:center;gap:12px;
    color:var(--cream-text);
    text-decoration:none;
  }
  .wordmark .mark{
    width:38px;height:38px;flex:0 0 auto;
  }
  .wordmark span{
    font-family:'Fraunces',serif;
    font-weight:600;
    font-size:1.25rem;
    letter-spacing:0.01em;
  }
  nav.site-nav{display:flex;gap:28px;}
  nav.site-nav a{
    color:var(--parchment-dim);
    text-decoration:none;
    font-size:0.95rem;
    font-weight:500;
    border-bottom:2px solid transparent;
    padding-bottom:2px;
    transition:border-color .15s ease, color .15s ease;
  }
  nav.site-nav a:hover{color:var(--brass-bright);border-color:var(--brass-bright);}

  /* ---------- HERO ---------- */
  .hero{
    background:var(--bottle);
    color:var(--cream-text);
    position:relative;
    overflow:hidden;
    width:calc(100% - 48px);
    max-width:1180px;
    margin:28px auto 0;
    border-radius:26px;
    box-shadow:0 24px 48px rgba(15,32,25,0.28);
  }
  .hero-bg{
    position:absolute;inset:0;
    width:100%;height:100%;
    z-index:0;
  }
  .hero-bg img{width:100%;height:100%;object-fit:cover;display:block;}
  .hero-scrim{
    position:absolute;inset:0;
    background:linear-gradient(100deg, var(--bottle) 0%, rgba(31,59,48,0.94) 28%, rgba(31,59,48,0.55) 55%, rgba(22,42,34,0.35) 100%);
    z-index:1;
  }
  .hero-inner{
    max-width:1180px;margin:0 auto;
    padding:72px 24px 56px;
    display:grid;
    grid-template-columns:1.15fr 0.85fr;
    gap:40px;
    align-items:end;
    position:relative;
    z-index:2;
  }
  .hero h1{
    font-size:clamp(2.6rem,5.5vw,4.2rem);
    line-height:1.03;
    color:var(--cream-text);
    max-width:11ch;
  }
  .hero p.sub{
    margin-top:20px;
    max-width:46ch;
    font-size:1.08rem;
    color:var(--parchment-dim);
  }
  .hero-figures{
    display:flex;
    gap:0;
    border:1px solid var(--line);
    border-radius:14px;
    overflow:hidden;
    background:rgba(22,42,34,0.7);
    backdrop-filter:blur(4px);
    -webkit-backdrop-filter:blur(4px);
    box-shadow:0 8px 20px rgba(15,32,25,0.3);
  }
  .hero-fig{
    flex:1;
    padding:18px 20px;
    border-right:1px solid var(--line);
  }
  .hero-fig:last-child{border-right:none;}
  .hero-fig .num{
    font-family:'Fraunces',serif;
    font-size:2rem;
    color:var(--brass-bright);
    font-weight:600;
  }
  .hero-fig .lbl{
    font-size:0.82rem;
    color:var(--parchment-dim);
    margin-top:4px;
  }
  .hero-spacer{height:8px;}

  /* ---------- FILTER BAR ---------- */
  .filter-bar{
    max-width:1180px;margin:0 auto;
    padding:32px 24px 14px;
    display:flex;
    flex-wrap:wrap;
    gap:16px;
    align-items:center;
    justify-content:space-between;
  }
  .search-wrap{
    position:relative;
    flex:1 1 260px;
    max-width:340px;
  }
  .search-wrap input{
    width:100%;
    padding:11px 14px 11px 38px;
    border:1px solid #c9bd9c;
    background:#fff;
    border-radius:20px;
    font-size:0.95rem;
    font-family:inherit;
    color:var(--ink);
  }
  .search-wrap input:focus{
    outline:2px solid var(--bottle);
    outline-offset:1px;
  }
  .search-wrap svg{
    position:absolute;left:12px;top:50%;transform:translateY(-50%);
    width:16px;height:16px;opacity:0.55;
  }
  .status-toggle{
    display:flex;
    border:1px solid #c9bd9c;
    border-radius:20px;
    overflow:hidden;
    flex:0 0 auto;
  }
  .status-btn{
    padding:9px 16px;
    background:#fff;
    border:none;
    font-size:0.85rem;
    font-weight:600;
    color:var(--ink);
    border-right:1px solid #c9bd9c;
  }
  .status-btn:last-child{border-right:none;}
  .status-btn.active{background:var(--oxblood);color:var(--cream-text);}
  .status-btn[data-status="open"].active{background:var(--bottle);}
  .status-btn[data-status="all"].active{background:var(--ink);}
  .filter-bar-secondary{
    padding-top:0;
    padding-bottom:18px;
    justify-content:space-between;
  }
  .view-toggle{
    display:flex;
    border:1px solid #c9bd9c;
    border-radius:20px;
    overflow:hidden;
    flex:0 0 auto;
  }
  .view-btn{
    padding:8px 15px;
    background:#fff;
    border:none;
    font-size:0.83rem;
    font-weight:600;
    color:var(--ink);
    border-right:1px solid #c9bd9c;
  }
  .view-btn:last-child{border-right:none;}
  .view-btn.active{background:var(--bottle);color:var(--cream-text);}

  .chips{display:flex;flex-wrap:wrap;gap:8px;}
  .chip{
    padding:8px 14px;
    border:1px solid #c9bd9c;
    background:transparent;
    border-radius:20px;
    font-size:0.85rem;
    font-weight:500;
    color:var(--ink);
    transition:background .15s ease, color .15s ease, border-color .15s ease;
  }
  .chip:hover{border-color:var(--bottle);}
  .chip.active{
    background:var(--bottle);
    border-color:var(--bottle);
    color:var(--cream-text);
  }

  /* ---------- GRID ---------- */
  .grid-section{max-width:1180px;margin:0 auto;padding:24px 24px 90px;}

  /* ---------- VIEW PANELS (timeline & map) ---------- */
  .view-panel{display:none;}
  .view-panel.active{display:block;}
  .view-caption{
    font-size:0.88rem;
    color:#6b6252;
    margin:4px 0 22px;
    max-width:160ch;
  }

  /* Timeline */
  .timeline-axis{
    position:relative;
    height:26px;
    margin-left:180px;
    border-bottom:1px solid #cabf9f;
    margin-bottom:6px;
  }
  .timeline-axis .tick{
    position:absolute;
    bottom:0;
    font-size:0.72rem;
    color:#8a7f66;
    transform:translateX(-50%);
    padding-bottom:4px;
    border-left:1px solid #d8cdae;
    padding-left:6px;
    height:100%;
    display:flex;
    align-items:flex-end;
  }
  .timeline-rows{display:flex;flex-direction:column;gap:10px;}
  .timeline-row{
    display:flex;
    align-items:center;
    gap:0;
  }
  .timeline-row .tl-label{
    width:180px;
    flex:0 0 180px;
    font-size:0.85rem;
    padding-right:14px;
    text-align:right;
    color:var(--ink);
    font-weight:500;
    line-height:1.25;
  }
  .timeline-row .tl-label .tl-area{
    display:block;
    font-size:0.72rem;
    font-weight:400;
    color:#8a7f66;
  }
  .timeline-row .tl-track{
    position:relative;
    flex:1;
    height:30px;
    background:repeating-linear-gradient(90deg, #d8cdae 0, #d8cdae 1px, transparent 1px, transparent 12.5%);
    border-radius:4px;
  }
  .tl-bar{
    position:absolute;
    top:7px;height:16px;
    border-radius:8px;
    cursor:pointer;
    border:none;
    padding:0;
  }
  .tl-bar.tl-open{background:var(--bottle);}
  .tl-bar.tl-lost{background:#8a7f66;}
  .tl-bar .tl-dot{
    position:absolute;left:0;top:50%;
    width:14px;height:14px;
    border-radius:50%;
    transform:translate(-50%,-50%);
    background:inherit;
    border:2px solid var(--parchment);
  }
  .tl-bar.tl-open::after{
    content:"";
    position:absolute;right:-14px;top:50%;
    width:14px;height:2px;
    background:var(--bottle);
    opacity:0.4;
    transform:translateY(-50%);
  }

  /* Map */
  .map-wrap{
    border:1px solid #dcd2b8;
    border-radius:18px;
    overflow:hidden;
    background:#eee4c8;
  }
  #leafletMap{
    width:100%;
    height:750px;
  }
  .leaflet-popup-content{
    font-family:'Inter',sans-serif;
    font-size:0.9rem;
    min-width:160px;
  }
  .leaflet-popup-content strong{
    font-family:'Fraunces',serif;
    font-size:1.05rem;
    display:block;
    margin-bottom:2px;
  }
  .leaflet-popup-content .popup-area{
    color:#7c715c;
    font-size:0.78rem;
    display:block;
    margin-bottom:8px;
  }
  .leaflet-popup-content button{
    background:var(--bottle);
    color:var(--cream-text);
    border:none;
    padding:6px 12px;
    border-radius:14px;
    font-size:0.8rem;
    font-weight:600;
  }
  .map-legend{
    display:flex;gap:22px;
    margin-top:14px;
    font-size:0.85rem;
    color:#4a4437;
  }
  .map-legend .dot{
    display:inline-block;width:11px;height:11px;border-radius:50%;
    margin-right:6px;vertical-align:middle;
  }
  .dot-open{background:var(--bottle);}
  .dot-lost{background:#8a7f66;}

  /* List (DataTables) */
  .table-wrap{
    border:1px solid #dcd2b8;
    border-radius:14px;
    overflow-x:auto;
    background:#fff;
    padding:6px 18px 18px;
  }
  #pubTable{font-family:'Inter',sans-serif;font-size:0.9rem;border-collapse:collapse;}
  #pubTable thead th{
    font-family:'Fraunces',serif;
    font-weight:600;
    color:var(--ink);
    border-bottom:2px solid var(--brass);
    padding:10px 12px;
    text-align:left;
  }
  #pubTable tbody td{
    padding:10px 12px;
    border-bottom:1px solid #ece4cc;
    vertical-align:middle;
  }
  #pubTable tbody tr:hover{background:#f7f1de;}
  #pubTable .status-badge{
    display:inline-block;
    padding:3px 8px;
    border-radius:999px;
    font-size:0.76rem;
    font-weight:700;
    line-height:1.2;
  }
  #pubTable .status-badge.open{background:#e5f1e7;color:#285c34;}
  #pubTable .status-badge.lost{background:#eee9df;color:#756b5a;}
  #pubTable .list-view-btn{
    border:1px solid #cfc4ad;
    background:#fff;
    color:#4a3d2d;
    border-radius:5px;
    padding:5px 9px;
    cursor:pointer;
    font:inherit;
    font-size:0.82rem;
  }
  #pubTable .list-view-btn:hover{background:#f3eedf;}
  .list-status{
    font-size:0.74rem;
    padding:3px 9px;
    border-radius:12px;
    font-weight:600;
    display:inline-block;
  }
  .list-status.open{background:#e3ebe4;color:var(--bottle);}
  .list-status.lost{background:#ece7da;color:#6b6252;}
  .list-view-btn{
    background:var(--bottle);
    color:var(--cream-text);
    border:none;
    padding:6px 13px;
    border-radius:14px;
    font-size:0.78rem;
    font-weight:600;
  }
  .dataTables_wrapper .dataTables_filter input{
    border:1px solid #c9bd9c;
    border-radius:2px;
    padding:6px 10px;
    font-family:inherit;
    margin-left:8px;
  }
  .dataTables_wrapper .dataTables_length select{
    border:1px solid #c9bd9c;
    border-radius:2px;
    padding:3px 6px;
    font-family:inherit;
  }
  .dataTables_wrapper .dataTables_paginate .paginate_button{
    font-family:'Inter',sans-serif;
    font-size:0.85rem;
  }
  .dataTables_wrapper .dataTables_paginate .paginate_button.current{
    background:var(--bottle) !important;
    color:var(--cream-text) !important;
    border-color:var(--bottle) !important;
    border-radius:4px;
  }
  .dataTables_wrapper .dataTables_info{color:#7c715c;font-size:0.82rem;}
  .empty-state{
    padding:60px 20px;text-align:center;color:#6b6252;
    display:none;
  }
  .grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:28px;
    margin-top:20px;
  }
  .card{
    background:#fff;
    border:1px solid #dcd2b8;
    border-top:4px solid var(--accent, var(--brass));
    text-align:left;
    padding:0;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    transition:transform .15s ease, box-shadow .15s ease;
  }
  .card:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(26,23,18,0.12);}
  .card .thumb{
    aspect-ratio:4/3;
    background:var(--bottle-deep);
    position:relative;
  }
  .card .thumb svg{width:100%;height:100%;}
  .card .thumb img{width:100%;height:100%;object-fit:cover;display:block;}
  .card .body{padding:18px 20px 22px;flex:1;display:flex;flex-direction:column;}
  .card .place-line{
    display:flex;justify-content:space-between;align-items:baseline;
    font-size:0.78rem;color:#7c715c;margin-bottom:6px;
    text-transform:none;
  }
  .card h3{font-size:1.3rem;margin-bottom:6px;}
  .card .teaser{font-size:0.92rem;color:#4a4437;flex:1;}
  .card .sample-tag{
    margin-top:12px;
    font-size:0.72rem;
    color:var(--oxblood);
    border:1px solid var(--oxblood);
    display:inline-block;
    padding:3px 8px;
    align-self:flex-start;
    border-radius:2px;
  }
  .card.is-lost{border-top-color:#8a7f66;}
  .card.is-lost .thumb{filter:grayscale(1) contrast(0.92) brightness(0.85);}
  .card.is-lost .thumb::after{
    content:"";
    position:absolute;inset:0;
    background:repeating-linear-gradient(45deg, rgba(26,23,18,0.08) 0 10px, transparent 10px 20px);
  }
  .card.is-lost .thumb{position:relative;}
  .closed-badge{
    display:inline-block;
    margin-bottom:6px;
    font-size:0.72rem;
    letter-spacing:0.02em;
    color:#7a2f2f;
    background:#f1e6d8;
    border:1px solid #d8c9a8;
    padding:3px 8px;
    border-radius:2px;
  }
  .card .fate-line{
    font-size:0.85rem;
    color:#6b6252;
    margin-top:8px;
    font-style:italic;
  }

  /* ---------- MODAL ---------- */
  .overlay{
    position:fixed;inset:0;
    background:rgba(20,16,10,0.6);
    display:none;
    align-items:flex-start;
    justify-content:center;
    padding:40px 20px;
    overflow-y:auto;
    z-index:9999;
  }
  .overlay.open{display:flex;}
  .modal{
    background:var(--parchment);
    max-width:880px;width:100%;
    margin:auto;
    border:1px solid #c9bd9c;
    position:relative;
  }
  .modal-close{
    position:absolute;top:14px;right:14px;
    width:34px;height:34px;
    background:var(--ink);
    color:var(--parchment);
    border:none;
    border-radius:50%;
    font-size:1.1rem;
    line-height:1;
    z-index:5;
  }
  .compare{
    position:relative;
    aspect-ratio:16/9;
    overflow:hidden;
    background:var(--bottle-deep);
    user-select:none;
  }
  .compare .layer{position:absolute;inset:0;}
  .compare .layer.then{clip-path:inset(0 50% 0 0);}
  .compare .layer svg{width:100%;height:100%;}
  .compare .layer img{width:100%;height:100%;object-fit:cover;display:block;}
  .compare .era-tag{
    position:absolute;top:60px;
    font-size:0.75rem;
    letter-spacing:0.03em;
    padding:4px 10px;
    background:rgba(26,23,18,0.75);
    color:var(--cream-text);
    border-radius:2px;
  }
  .compare .era-tag.then-tag{left:14px;}
  .compare .era-tag.now-tag{right:14px;}
  .compare .handle-line{
    position:absolute;top:0;bottom:0;
    width:2px;background:var(--brass-bright);
    left:50%;transform:translateX(-1px);
    pointer-events:none;
  }
  .compare .handle-knob{
    position:absolute;top:50%;left:50%;
    width:38px;height:38px;
    background:var(--bottle);
    border:2px solid var(--parchment);
    border-radius:50%;
    transform:translate(-50%,-50%);
    display:flex;align-items:center;justify-content:center;
    pointer-events:none;
  }
  .compare .handle-knob::before{
    content:"<==>";
    color:var(--brass-bright);
    font-size:1rem;
  }
  .compare input[type=range]{
    position:absolute;inset:0;
    width:100%;height:100%;
    margin:0;
    opacity:0;
    cursor:ew-resize;
  }
  .modal-body{padding:28px 32px 34px;}
  .modal-body .place-line{font-size:0.82rem;color:#7c715c;margin-bottom:4px;}
  .modal-body h2{font-size:2rem;margin-bottom:14px;}
  .modal-grid{
    display:grid;
    grid-template-columns:1.5fr 1fr;
    gap:32px;
    margin-top:10px;
  }
  .modal-grid .story p{margin:0 0 14px;font-size:0.98rem;color:#3a3527;}
  .fact-panel{border-left:1px solid var(--line);padding-left:24px;}
  .fact-panel .fact{margin-bottom:16px;}
  .fact-panel .fact .k{
    font-size:0.72rem;color:#8a7f66;margin-bottom:3px;
  }
  .fact-panel .fact .v{font-size:0.95rem;color:var(--ink);font-weight:500;}
  .feature-list{list-style:none;padding:0;margin:0;}
  .feature-list li{
    padding:6px 0;
    border-bottom:1px dashed #cabf9f;
    font-size:0.9rem;
    display:flex;gap:8px;
  }
  .feature-list li:last-child{border-bottom:none;}
  .feature-list li::before{content:"•";color:var(--brass);}
  .sample-note{
    margin-top:18px;
    font-size:0.82rem;
    color:var(--oxblood);
    border-top:1px solid var(--line);
    padding-top:14px;
  }

  /* ---------- PIWIGO PHOTO GALLERY ---------- */
  .gallery-section{
    grid-column:1 / -1;
    border-top:1px solid var(--line);
    margin-top:8px;
    padding-top:20px;
  }
  .gallery-section h4{
    font-family:'Fraunces',serif;
    font-size:1.1rem;
    font-weight:600;
    margin-bottom:12px;
  }
  .gallery-strip{
    display:flex;
    gap:10px;
    overflow-x:auto;
    padding-bottom:6px;
  }
  .gallery-strip img{
    height:96px;
    width:auto;
    flex:0 0 auto;
    border-radius:6px;
    cursor:pointer;
    border:1px solid #dcd2b8;
    transition:transform .15s ease;
  }
  .gallery-strip img:hover{transform:scale(1.04);}
  .gallery-status{
    font-size:0.85rem;
    color:#8a7f66;
  }
  .lightbox{
    position:fixed;inset:0;
    background:rgba(10,8,5,0.9);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:10001;
    padding:40px;
  }
  .lightbox.open{display:flex;}
  .lightbox img{
    max-width:100%;
    max-height:90vh;
    border-radius:4px;
  }
  .lightbox-close{
    position:absolute;top:20px;right:24px;
    width:38px;height:38px;
    background:var(--parchment);
    color:var(--ink);
    border:none;
    border-radius:50%;
    font-size:1.2rem;
  }

  /* ---------- FOOTER ---------- */
  footer{
    background:var(--ink);
    color:var(--parchment-dim);
    padding:44px 24px 36px;
  }
  .footer-inner{max-width:1180px;margin:0 auto;}
  footer h3{color:var(--cream-text);font-size:1.3rem;margin-bottom:10px;}
  footer p{font-size:0.88rem;max-width:60ch;color:#b8ae94;margin:0 0 6px;}
  footer .fine{font-size:0.78rem;color:#8a7f66;margin-top:20px;border-top:1px solid rgba(185,139,78,0.2);padding-top:18px;}

  @media (max-width:860px){
    .hero-inner{grid-template-columns:1fr;}
    .grid{grid-template-columns:repeat(2,1fr);}
    .modal-grid{grid-template-columns:1fr;}
    .fact-panel{border-left:none;border-top:1px solid var(--line);padding-left:0;padding-top:18px;}
  }
  @media (max-width:600px){
    .grid{grid-template-columns:1fr;}
    nav.site-nav{display:none;}
    .modal-body{padding:22px 18px 28px;}
    .hero{width:calc(100% - 24px);margin-top:16px;border-radius:18px;}
    .timeline-axis{margin-left:96px;}
    .timeline-row .tl-label{width:96px;flex:0 0 96px;font-size:0.76rem;}
  }

  @media (prefers-reduced-motion:reduce){
    *{transition:none !important;}
  }
  
  .modal-share{
  position:absolute;top:14px;right:58px;
  height:34px;
  padding:0 14px;
  background:var(--bottle);
  color:var(--brass-bright);
  border:none;
  border-radius:17px;
  font-size:0.82rem;
  font-weight:600;
  line-height:1;
  z-index:5;
  white-space:nowrap;
  cursor:pointer;
}
.modal-share.copied{
  background:var(--bottle);
  color:var(--cream-text);
}

/* width */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;  
}

/* Track */
::-webkit-scrollbar-track {
  background: #f9f9f9; 
     -webkit-box-shadow: inset 0 0 6px     rgba(0,0,0,0.3); 
    border-radius: 7px; 
}
 
/* Handle */
::-webkit-scrollbar-thumb {
  background: #b98b4e; 
     border-radius: 1px;
    -webkit-box-shadow: inset 0 0 6px     rgba(0,0,0,0.5);  
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #1f3b30; 
}

/* Buttons */
::-webkit-scrollbar-button:single-button {
    background-color: rgb(64, 64, 64);

    display: block;
    background-size: 10px;
    background-repeat: no-repeat;
}

/* Up */
::-webkit-scrollbar-button:single-button:vertical:decrement {
    height: 12px;
    width: 16px;
    background-position: center 4px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(96, 96, 96)'><polygon points='50,00 0,50 100,50'/></svg>");
}

::-webkit-scrollbar-button:single-button:vertical:decrement:hover {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(112, 112, 112)'><polygon points='50,00 0,50 100,50'/></svg>");
}

::-webkit-scrollbar-button:single-button:vertical:decrement:active {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(128, 128, 128)'><polygon points='50,00 0,50 100,50'/></svg>");
}

/* Down */
::-webkit-scrollbar-button:single-button:vertical:increment {
    height: 12px;
    width: 16px;
    background-position: center 2px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(96, 96, 96)'><polygon points='0,0 100,0 50,50'/></svg>");
}

::-webkit-scrollbar-button:single-button:vertical:increment:hover {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(112, 112, 112)'><polygon points='0,0 100,0 50,50'/></svg>");
}

::-webkit-scrollbar-button:single-button:vertical:increment:active {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(128, 128, 128)'><polygon points='0,0 100,0 50,50'/></svg>");
}

/* Left */
::-webkit-scrollbar-button:single-button:horizontal:decrement {
    height: 12px;
    width: 12px;
    background-position: 3px 3px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(96, 96, 96)'><polygon points='0,50 50,100 50,0'/></svg>");

}

::-webkit-scrollbar-button:single-button:horizontal:decrement:hover {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(112, 112, 112)'><polygon points='0,50 50,100 50,0'/></svg>");
}

::-webkit-scrollbar-button:single-button:horizontal:decrement:active {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(128, 128, 128)'><polygon points='0,50 50,100 50,0'/></svg>");
}

/* Right */
::-webkit-scrollbar-button:single-button:horizontal:increment {
    height: 12px;
    width: 12px;
    background-position: 3px 3px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(96, 96, 96)'><polygon points='0,0 0,100 50,50'/></svg>");
}

::-webkit-scrollbar-button:single-button:horizontal:increment:hover {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(112, 112, 112)'><polygon points='0,0 0,100 50,50'/></svg>");
}

::-webkit-scrollbar-button:single-button:horizontal:increment:active {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(128, 128, 128)'><polygon points='0,0 0,100 50,50'/></svg>");
}


.wiki-link{
  display:inline-block;
  margin-top:16px;
  font-size:0.88rem;
  font-weight:600;
  color:var(--bottle, #1f3b30);
  text-decoration:none;
  border-bottom:1px solid var(--brass, #b98b4e);
  padding-bottom:1px;
}
.wiki-link:hover{
  color:var(--brass, #b98b4e);
  border-bottom-color:var(--bottle, #1f3b30);
}

.comment{
  border-bottom:1px solid var(--line, rgba(185,139,78,0.35));
  padding:10px 0;
}
.comment:last-child{ border-bottom:none; }
.comment-head{
  display:flex; justify-content:space-between; gap:12px;
  font-size:0.82rem; color:var(--ink, #1a1712); margin-bottom:4px;
}
.comment-head span{ color:#8a7f66; font-weight:400; }
.comment p{ margin:0; font-size:0.92rem; color:#3a3527; white-space:pre-wrap; }
.comment-form{
  margin-top:16px; display:flex; flex-direction:column; gap:8px;
  border-top:1px solid var(--line, rgba(185,139,78,0.35)); padding-top:16px;
}
.comment-form input[type="text"],
.comment-form textarea{
  font-family:inherit; font-size:0.9rem;
  border:1px solid #c9bd9c; border-radius:6px; padding:8px 10px;
  resize:vertical;
}
.comment-form button{
  align-self:flex-start;
  background:var(--bottle, #1f3b30); color:var(--cream-text, #f3eedf);
  border:none; border-radius:16px; padding:8px 18px;
  font-size:0.85rem; font-weight:600; cursor:pointer;
}
.comment-form button:disabled{ opacity:0.6; cursor:default; }
.comment-status{ font-size:0.82rem; color:var(--bottle, #1f3b30); min-height:1.2em; }
.comment-status.is-error{ color:#8a2f2f; }
/* Honeypot field — invisible to real visitors, left open for bots */
.hp-field{
  position:absolute !important;
  left:-9999px !important;
  width:1px; height:1px; overflow:hidden;
}
.map-wrap{
  position:relative;
  isolation:isolate;
}
header.site{
  position:sticky;
  top:0;
  z-index:2000;
}

.renamed-badge{
  display:inline-block;
  margin-top:4px;
  font-size:0.72rem;
  font-weight:600;
  color:var(--brass, #b98b4e);
  border:1px solid var(--brass, #b98b4e);
  border-radius:10px;
  padding:2px 8px;
  cursor:help;
}
.renamed-icon{
  display:inline-block;
  color:var(--brass, #b98b4e);
  font-weight:700;
  cursor:help;
  font-size:0.95em;
}

/* TEMP: styling for the new site-wide footer gallery (e.g. historical
   maps). Move this into sitestyle.css when convenient. The footer has
   a dark background, so this overrides the (light-background-oriented)
   .gallery-status text colour where it appears inside this section. */
.footer-gallery-section{
  margin-top:24px;
  padding-top:20px;
  border-top:1px solid rgba(185,139,78,0.3);
}
.footer-gallery-section h4{
  font-family:'Fraunces','Georgia',serif;
  font-size:1.1rem;
  font-weight:600;
  color:var(--cream-text, #f3eedf);
  margin-bottom:12px;
}
.footer-gallery-strip{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding-bottom:6px;
}
.footer-gallery-strip img{
  height:96px;
  width:auto;
  flex:0 0 auto;
  border-radius:6px;
  cursor:pointer;
  border:1px solid rgba(243,238,223,0.25);
  transition:transform .15s ease;
}
.footer-gallery-strip img:hover{ transform:scale(1.04); }
.footer-gallery-section .gallery-status{
  color:#b8ae94;
  font-size:0.85rem;
}

/* TEMP: styling for the "Same building" linked-pub chips in the modal.
   Move this into sitestyle.css when convenient. */
.linked-pubs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:4px;
}
.linked-pub-chip{
  background:#fff;
  border:1px solid var(--brass, #b98b4e);
  color:var(--bottle, #1f3b30);
  border-radius:16px;
  padding:6px 12px;
  font-size:0.85rem;
  font-weight:600;
  font-family:inherit;
  cursor:pointer;
  text-align:left;
}
.linked-pub-chip:hover{
  background:var(--bottle, #1f3b30);
  color:var(--cream-text, #f3eedf);
  border-color:var(--bottle, #1f3b30);
}
.linked-pub-chip span{
  font-weight:400;
  opacity:0.8;
}
.tl-gap{
  position:absolute;
  top:7px;
  height:16px;
  padding:0;
  border:none;
  background:none;
  cursor:pointer;
}
.tl-gap::before{
  content:"";
  position:absolute;
  left:0; right:0; top:50%;
  border-top:2px dotted #8a7f66;
  transform:translateY(-50%);
}
.tl-gap:hover::before,
.tl-gap:focus-visible::before{
  border-top-color:var(--brass, #b98b4e);
}

/* Only the final stretch of an open pub's bar keeps the faint "still
   pouring" tail; earlier segments end at a break. */
.tl-bar.tl-open.tl-seg-more::after{
  display:none;
}

/* Rows for the same building sit together: a brass stripe beside the
   label, and the following rows tucked up closer. */
.timeline-row.tl-linked .tl-label{
  box-shadow:inset -3px 0 0 var(--brass, #b98b4e);
}
.timeline-row.tl-linked-next{
  margin-top:-6px;
}