/* Red Benches Core – form + map */
.rb-formwrap,.rb-mapwrap,.rb-modwrap{--rb-red:#C8102E;--rb-navy:#17458F;--rb-gold:#F7A81B;--rb-line:#ddd6cb;font-family:inherit}
.rb-sr{position:absolute;left:-9999px}
.rb-hp{position:absolute;left:-9999px;height:0;overflow:hidden}
.rb-fs{border:1px solid var(--rb-line);border-radius:14px;padding:1.4rem 1.4rem 1rem;margin:0 0 1.4rem;background:#fff}
.rb-fs legend{font-weight:800;font-size:1.15rem;padding:0 .6rem;color:var(--rb-navy);display:flex;align-items:center;gap:.6rem}
.rb-n{display:inline-grid;place-items:center;width:1.9rem;height:1.9rem;border-radius:50%;background:var(--rb-red);color:#fff;font-size:.95rem}
.rb-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.rb-full{grid-column:1/-1}
.rb-field{display:flex;flex-direction:column;gap:.35rem;margin-bottom:.4rem}
.rb-field label,.rb-check{font-weight:600;font-size:.95rem}
.rb-formwrap input:not([type=checkbox]):not([type=radio]):not([type=file]),.rb-formwrap select,.rb-formwrap textarea{width:100%;box-sizing:border-box;padding:.75rem .85rem;border:1.5px solid #bdb5a8;border-radius:8px;font:inherit;background:#fff;color:#16181d}
.rb-formwrap input:focus,.rb-formwrap select:focus,.rb-formwrap textarea:focus{outline:3px solid rgba(23,69,143,.35);border-color:var(--rb-navy)}
.rb-hint{font-size:.88rem;color:#5b5750;margin:.2rem 0 .8rem}
.rb-check{display:flex;gap:.7rem;align-items:flex-start;line-height:1.45}
.rb-check input{margin-top:.25rem;width:1.2rem;height:1.2rem;flex:none}
.rb-btn{display:inline-block;background:var(--rb-red);color:#fff!important;border:2px solid var(--rb-red);padding:.75rem 1.3rem;border-radius:999px;font-weight:700;font-size:1rem;cursor:pointer;text-decoration:none;line-height:1.2;transition:.15s}
.rb-btn:hover{background:#9d0c23;border-color:#9d0c23}
.rb-btn--ghost{background:transparent;color:var(--rb-red)!important}
.rb-btn--ghost:hover{background:var(--rb-red);color:#fff!important}
.rb-btn--big{font-size:1.15rem;padding:1rem 2rem;width:100%}
.rb-btn[disabled]{opacity:.6;cursor:wait}
.rb-locbtns{display:flex;flex-wrap:wrap;gap:.8rem;align-items:center;margin-bottom:.8rem}
.rb-search{display:flex;gap:.5rem;flex:1 1 280px}
.rb-or{color:#5b5750;font-weight:600}
#rb-pick-map{height:380px;border-radius:12px;border:1.5px solid var(--rb-line);z-index:0}
.rb-coords{margin-top:.8rem}
#rb-preview{max-width:260px;border-radius:10px;margin-top:.5rem;display:block}
#rb-preview[hidden],#rb-thanks[hidden],.rb-formwrap form[hidden]{display:none}
.rb-msg{min-height:1.4rem;margin:0 0 .8rem;font-weight:600}
.rb-msg.rb-bad{color:#b00020}
.rb-msg.rb-ok{color:#1a7f37}
.rb-thanks{text-align:center;padding:2rem;border:2px solid var(--rb-red);border-radius:16px;background:#fff7f8}
@media(max-width:640px){.rb-grid{grid-template-columns:1fr}.rb-fs{padding:1rem}#rb-pick-map{height:320px}}

/* map (styles carried over from the original map.html) */
.rb-mapbar{margin-bottom:.6rem}
.rb-count{font-weight:700;color:var(--rb-red)}
#rb-map{border-radius:14px;border:1.5px solid var(--rb-line);z-index:0}
.rb-note{font-size:.88rem;color:#5b5750}
.red-pin{background:none;border:none}
.red-pin svg{display:block}
.red-pin .ser{position:absolute;top:5px;left:0;width:30px;text-align:center;font:700 12px/20px system-ui,sans-serif;color:#b71c1c}
.logo-control{pointer-events:none;margin:10px 0 0 10px!important}
.logo-box{background:rgba(255,255,255,.93);border-radius:8px;padding:6px 10px;box-shadow:0 1px 6px rgba(0,0,0,.3)}
.logo-box img{display:block;width:min(340px,62vw);height:auto;max-width:none}
.popup-ser{color:#b71c1c;font-weight:700}
.popup-title{font-size:1.05rem;font-weight:700;margin-bottom:4px}
.popup-desc{margin:6px 0 0}
.popup-planned{display:inline-block;background:#f9a825;color:#16181d;font-size:.72rem;font-weight:700;border-radius:999px;padding:.1rem .6rem}
.popup-photo{display:block;width:240px;height:160px;object-fit:cover;border-radius:6px;margin-top:8px;background:#eee;max-width:none}

/* moderation page */
.rb-modwrap{max-width:900px;margin:0 auto}
.rb-login{max-width:420px;margin:1rem auto;padding:1.6rem;border:1px solid var(--rb-line,#ddd6cb);border-radius:14px;background:#fff}
.rb-login input[type=text],.rb-login input[type=password]{width:100%;box-sizing:border-box;padding:.75rem;border:1.5px solid #bdb5a8;border-radius:8px;font:inherit}
.rb-login .login-submit input{background:#C8102E;color:#fff;border:0;border-radius:999px;padding:.8rem 1.6rem;font-weight:700;cursor:pointer;font-size:1rem}
.rb-login p{margin:.8rem 0}
.rb-modbar{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1rem}
.rb-btn--sm{padding:.5rem 1rem;font-size:.9rem}
.rb-btn--navy{background:#17458F;border-color:#17458F}
.rb-btn--navy:hover{background:#0f2f63;border-color:#0f2f63}
.rb-tabs{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1.2rem}
.rb-tab{border:2px solid #C8102E;background:#fff;color:#C8102E;border-radius:999px;padding:.5rem 1rem;font-weight:700;cursor:pointer;font-size:.95rem}
.rb-tab.on{background:#C8102E;color:#fff}
.rb-empty{padding:2rem;text-align:center;background:#faf7f2;border-radius:12px}
.rb-mcard{display:grid;grid-template-columns:220px 1fr;gap:1.2rem;border:1px solid #ddd6cb;border-radius:14px;padding:1rem;margin-bottom:1rem;background:#fff}
.rb-mphoto img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:10px}
.rb-nophoto{aspect-ratio:4/3;display:grid;place-items:center;background:#eee;border-radius:10px;color:#777;font-size:.9rem}
.rb-mbody h3{margin:0 0 .3rem;font-size:1.2rem;text-transform:none;font-family:inherit;color:#16181d}
.rb-mtag{display:inline-block;background:#C8102E;color:#fff;font-size:.72rem;font-weight:700;border-radius:999px;padding:.1rem .7rem;margin-bottom:.4rem}
.rb-mtag.planned{background:#F7A81B;color:#16181d}
.rb-mrow{font-size:.92rem;margin:.1rem 0}
.rb-mdesc{font-style:italic;margin:.5rem 0}
.rb-mpriv{background:#f6f3ee;border-radius:8px;padding:.6rem .8rem;margin:.6rem 0}
.rb-mprivh{font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#5b5750;margin-bottom:.2rem}
.rb-mlinks{display:flex;flex-wrap:wrap;gap:1rem;font-size:.92rem;margin:.4rem 0}
.rb-mbtns{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.6rem}
.rb-medit{display:block}
.rb-mform .rb-field{margin-bottom:.7rem}
.rb-mform input,.rb-mform select,.rb-mform textarea{width:100%;box-sizing:border-box;padding:.6rem;border:1.5px solid #bdb5a8;border-radius:8px;font:inherit}
.rb-toast{position:fixed;left:50%;bottom:1.2rem;transform:translate(-50%,200%);background:#16181d;color:#fff;padding:.8rem 1.2rem;border-radius:10px;transition:.25s;z-index:9999;max-width:90vw}
.rb-toast.show{transform:translate(-50%,0)}
.rb-toast.rb-bad{background:#b00020;color:#fff}
@media(max-width:640px){.rb-mcard{grid-template-columns:1fr}}

.rb-mcur{max-width:240px;border-radius:8px;display:block;margin:.3rem 0 .6rem}
.rb-mcur[hidden]{display:none}

.rb-modbar span{display:flex;gap:.5rem;flex-wrap:wrap}
.rb-formwrap [hidden]{display:none!important}

/* report */
.rb-report{max-width:1100px;margin:0 auto}
.rb-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:.8rem;margin:0 0 1.2rem}
.rb-tile{background:#fff;border:1px solid #ddd6cb;border-top:5px solid #17458F;border-radius:12px;padding:.9rem 1rem}
.rb-tile.main{border-top-color:#C8102E}
.rb-tile.warn{border-top-color:#F7A81B;background:#fffaf0}
.rb-tnum{font-size:2.1rem;font-weight:800;line-height:1.1;color:#16181d}
.rb-tlab{font-size:.85rem;color:#5b5750;margin-top:.2rem}
.rb-alert{background:#fff4e5;border-left:5px solid #F7A81B;padding:.7rem 1rem;border-radius:6px}
.rb-cols{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin:1rem 0}
.rb-card{background:#fff;border:1px solid #ddd6cb;border-radius:12px;padding:1rem 1.2rem;margin-bottom:1rem}
.rb-cols .rb-card{margin-bottom:0}
.rb-card h3{margin:0 0 .7rem;font-size:1.05rem;text-transform:none;font-family:inherit;color:#17458F}
.rb-bar{display:grid;grid-template-columns:minmax(110px,40%) 1fr 2.2rem;gap:.6rem;align-items:center;margin:.3rem 0;font-size:.9rem}
.rb-bl{overflow-wrap:anywhere}
.rb-bt{background:#f1ece4;border-radius:999px;height:.85rem;display:block;overflow:hidden}
.rb-bt i{display:block;height:100%;background:#C8102E;border-radius:999px}
.rb-bar b{text-align:right}
.rb-notyet{columns:2;margin:.6rem 0 0;padding-left:1.1rem;font-size:.9rem}
@media(max-width:760px){.rb-cols{grid-template-columns:1fr}.rb-notyet{columns:1}}
@media print{.site-header,.site-footer,.help,.rb-modbar,.page-hero{display:none!important}.rb-card,.rb-tile{break-inside:avoid}}

/* resources */
.rb-res,.rb-resmgr{--rb-red:#C8102E}
.rb-chips{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0 1.5rem}
.rb-chips a{border:2px solid #C8102E;color:#C8102E;border-radius:999px;padding:.35rem .9rem;font-weight:700;font-size:.9rem;text-decoration:none}
.rb-chips a:hover{background:#C8102E;color:#fff}
.rb-resgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:1.2rem;margin:1rem 0 2.5rem}
.rb-rescard{border:1px solid #ddd6cb;border-radius:14px;background:#fff;overflow:hidden;display:flex;flex-direction:column}
.rb-resprev{aspect-ratio:16/10;background:#f1ece4;display:grid;place-items:center;overflow:hidden}
.rb-resprev img{width:100%;height:100%;object-fit:cover}
.rb-fileicon{display:grid;place-items:center;width:90px;height:110px;background:#fff;border:2px solid #17458F;border-radius:8px;color:#17458F;font-weight:800;font-size:1.1rem}
.rb-resbody{padding:1rem 1.1rem 1.2rem;display:flex;flex-direction:column;gap:.3rem;flex:1}
.rb-resbody h3{margin:0;font-size:1.05rem;text-transform:none;font-family:inherit;color:#16181d}
.rb-resbody p{margin:0;font-size:.92rem}
.rb-resbody .rb-btn{align-self:flex-start;margin-top:auto}
.rb-resform{width:100%}
.rb-mcard .rb-resprev{border-radius:10px;aspect-ratio:4/3}

.rb-editmap{height:300px;border-radius:12px;border:1.5px solid var(--rb-line);z-index:0;margin:.2rem 0 .6rem}
.rb-editmap .red-pin{background:none;border:0}

.rb-danger{color:#a30e1f;border-color:#a30e1f}
.rb-danger:hover{background:#a30e1f;color:#fff}

.popup-scans{display:inline-block;margin:.15rem 0 .35rem;padding:.12rem .55rem;border-radius:999px;background:#fdecee;color:#a30e1f;font-size:.78rem;font-weight:700}

.rb-q{display:block;font-weight:600;font-size:.95rem;margin:0 0 .5rem}
.rb-field[role=radiogroup] .rb-check{font-weight:400;margin:.35rem 0}
.rb-layouts{display:flex;flex-wrap:wrap;gap:1rem}
.rb-layout{position:relative;display:block;width:min(100%,300px);border:2px solid var(--rb-line,#e2ddd4);border-radius:12px;padding:.5rem;cursor:pointer;background:#fff;text-align:center;font-weight:600}
.rb-layout img{display:block;width:100%;height:auto;border-radius:8px;margin-bottom:.4rem}
.rb-layout input{position:absolute;top:.8rem;left:.8rem;width:1.2rem;height:1.2rem}
.rb-layout:has(input:checked){border-color:var(--rb-red,#c8102e);box-shadow:0 0 0 3px rgba(200,16,46,.15)}
.rb-layout:has(input:focus-visible){outline:3px solid var(--rb-red,#c8102e);outline-offset:2px}
.rb-formwrap input[type=radio]{width:1.2rem;height:1.2rem;flex:none;margin:.2rem 0 0;padding:0;accent-color:var(--rb-red,#c8102e)}
.rb-formwrap .rb-layout input[type=radio]{margin:0}
.rb-layouts{margin-bottom:1.1rem}
