:root {
--main-bg:#fff;
--bg:#f9fafb;
--bg2:#f2f2f2;
--bg3:#d9d9d9;
--bg4:#bfbfbf;
--header-bg:#f2f2f2; 
--danger:#dc2626; 
--success:#16a34a; 
--border:#999; 
--border2:#666; 
--border3:#000;
--text-primary:#111827; 
--text-secondary:#6b7280;
--link:#06c; 
--link-hover:#00c; 
--radius:8px;
--font-main:sans-serif;
}

[data-theme="dark"] {
--main-bg:#000;
--bg:#111827;
--bg2:#333;
--bg3:#595959;
--bg4:#808080;
--header-bg:#000;
--border:#666;
--border2:#999;
--border3:#ccc;
--link:#9cf;
--link-hover:#3aff;
--link-visited:#bcf;
--text-primary:#e6e6e6;
--text-secondary:#d9d9d9;
}
* {
margin:0;
padding:0;
box-sizing:border-box;
}
body {
margin:0;
font-family:var(--font-main);
background:var(--main-bg);
color:var(--text-primary);
font-size:1.2em;
line-height:1.6;
text-align:center;
}
#container {
display:flex;
min-height:100vh;
}
.header {
background:var(--header-bg);
z-index:10;
padding:0.1rem 0.5rem 0.15rem 0.5rem;
text-align:left;
border-bottom:solid 1px #ccc;
background:linear-gradient(120deg, #bef2ca, #fdfdfd, #8eeaf4);
position:sticky;top:0
} 

button,
.btn {
all: unset;
box-sizing: border-box; 
display: inline-flex;
align-items: center;
justify-content: center; 
padding: 1px 4px;
min-height: 32px; 
border: 1px solid var(--border);
border-radius: var(--radius);
background: #f2f2f2; 
font: inherit;
color: var(--link);
cursor: pointer;
} 

.header .btn{line-height:1em}
.hidden{display:none}
.header a,.header a:hover{background:none}
a.logo {
font-weight:bold;
vertical-align:middle;
margin:2px 10px;
border:0;
padding:0;
}
.logo2{color:#c30}
.logo-text {
font-size:26px;
font-weight:bold;
}
.tagline {
font-size:19px;
color:#666;
}
.bb{background:#05f !important;color:#fff !important}
.flex {
display:flex;
flex-direction:column;
align-items:center;
line-height:1.1;
margin:5px;
}
.locselect {
max-width:10em;
}
.arrow {
flex-shrink:0;
font-size:32px;
}
.selloc {
font-size:18px;
color:#666;
}
[data-theme="dark"] #selloc{color:#999}
[data-theme="dark"] .tagline{color:#999}
.nav {
min-width:6em;
width:75%;
max-width:12em;
text-align:left;
display:none;
position:fixed;
left:0;
top:0;
border-radius:var(--radius);
border:solid 1px #666;
background:#e8e8e8;
z-index:99;
}
#navcontent{max-height:100vh; 
overflow-y:auto; 
overflow-x:hidden;}
#closemenu1 {position:absolute;
top:5px;
right:10px;}
#closemenu1, #closemenu2 {
float:right;
}
#closemenu2 {
margin-top:25px;
}
.nav a,.nav .link {
display:block;
margin:0.3em 0.1em;
color:var(--text-primary);
text-decoration:none;
font-weight:normal;
}
.link{cursor:pointer}
.submenu {
background:#fff;
}
.search-box {
white-space:nowrap;
display:inline-block;
}
#search-q {
padding:0.1em 0.3em;
width:70%;
max-width:8em;
border-radius:var(--radius);
}
.main {
padding:0.5rem 1%;
text-align:left;
}
h1, h2, h3, h4 {
margin:0.3rem 0;display:inline;font-size:inherit;
}
a, .link,.btn, .btn--secondary, button {
color:var(--link);
text-decoration:none;
margin:5px 2px;
font-size:inherit;
vertical-align:middle;
}
a:hover, .link:hover, .btn:hover, button:hover {
color:var(--link-hover);
}
.btn, .btn--secondary, button{
padding:0 4px;
border-radius:var(--radius);
display:inline-block;
background:#f2f2f2;
border:solid 1px var(--border);
text-align:center;
min-height:32px;
}
.form__input, .form__select, .form__textarea {
padding:0.4em;
border:1px solid var(--border);
border-radius:var(--radius);
font-family:var(--font-main);
margin:0.3em 0;
}
textarea {min-height:90px;padding:10px;margin:10px 0;width:95%;}
input, textarea {
width:92%;
max-width:40em;
vertical-align:middle;
border-radius:var(--radius);
}
select {
vertical-align: middle;
width: fit-content;
max-width: 90%;
padding: 1px 3px;
border-radius: var(--radius);
}
input, select, textarea{font-size:inherit}
input[type='checkbox'] {
width:20px; 
height:20px; 
transform:scale(1.4);
-webkit-transform:scale(1.4); 
margin-right:10px;
cursor:pointer;
}
.form__textarea { min-height:100px; }
hr {
border:0;
border-bottom:1px solid var(--border);
margin:10px 0;
}
ul, ol { padding-left:1.2rem; }
li { margin-bottom:0.4rem; }
table {
width:100%;
border-collapse:collapse;
}
th, td {
padding:0.6rem;
border:1px solid var(--border);
}
th {
background:var(--main-bg);
color:var(--text-primary);
}
.topic-list__item, .reply-list__item {
border-bottom:1px solid var(--border);
padding:0.5rem 0;
margin-bottom:0.5rem;
}
.avatar {
width:50px;
height:50px;
border-radius:50%;
float:left;
margin-right:10px;
}
.footertext {
text-align:center;
border-top:1px solid var(--border);
padding-top:0.5rem;
}
.bold { font-weight:bold; }
.big {font-weight:bold;font-size:1.25em !important; }
.notification-item,.message-item {border:solid 1px var(--border);padding:8px;border-radius:var(--radius);margin:5px}
.marginleft10 { margin-left:10px; }
.margin10{ margin:10px 0;}
.margin20{ margin:20px 0;}
.w { white-space:nowrap; }
.valignm { vertical-align:middle; }
.breadcrumbs {border-bottom:solid 1px #ccc; }
.breadcrumbs a{font-size:80%;line-height:80%;}
.form__error{background:orange}
.inline{display:inline}
.item{background:none;border-radius:0;border:0;margin:1px;border-bottom:solid 1px #ccc;padding:1px;clear:both}
.item img{ 
float:left;
width:120px;
height:120px;
object-fit:contain;
margin-bottom:3px;
}
.topicimgdiv{max-height:300px;
max-width:300px;display:inline-block;
border:solid 1px #ccc;
margin:5px;
padding:3px;position:relative;}
.pendingimg{position:absolute;
top:2px;
left:2px;
background:#c00;
color:white;
padding:0 4px;
border-radius:4px;
}
.topicimg{
max-height:300px;
max-width:300px;
object-fit:contain;
margin:5px;
}
/* start dark */
[data-theme="dark"] .breadcrumbs {
border:0;
border-bottom:solid 1px #666;
}
[data-theme="dark"] .btn,
[data-theme="dark"] .btn--secondary,
[data-theme="dark"] button {
background:#222;
}
[data-theme="dark"] .nav a:hover,
[data-theme="dark"] .nav .link:hover {
background:#111;
}
[data-theme="dark"] .header{border-bottom:solid 1px #666;background:linear-gradient(120deg, #0f172a, #072a8a, #046c2b)}
[data-theme="dark"] .item{border:0;border-bottom:solid 1px #666;background:none} 
[data-theme="dark"] .nav {
background:#262626;
}
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
background:#222;
color:#f9fafb;
border:solid 1px #ccc;
}
[data-theme="dark"] .submenu {
background:#1f2937;
}
[data-theme="dark"] .form__error{background:#4d0000
}
[data-theme="dark"] .header a:hover{background:none}
[data-theme="dark"] .logo2{color:#f1b693}
/*end dark */
.footertext a{border:0;background:0}
.modal {
display: none;
position: fixed;
inset: 0;
z-index: 2000;
background: rgba(0,0,0,0.75);
overflow: auto;
padding: 10px;
text-align: center;
}


.modal-content {
background: var(--bg);
color: var(--text-primary);
padding: 5px;
border-radius: var(--radius);
text-align: left;
border: solid 1px var(--border2);
width: 99.5%;
margin: auto;
position: relative;
max-height:99.9%;
overflow-y:scroll;
}

.modal-content > input,
.modal-content > select,
.modal-content > svg {
display: inline-block;
margin-right: 8px;
margin-bottom: 10px;
vertical-align: middle;
} 
.modal-html {
max-height: 95%;
overflow-y: auto;
overflow-x: hidden;
border-top: solid 1px var(--border);
margin-top: 10px;
} 
.modal-close {
cursor: pointer;
color: #900;
padding: 5px;
line-height: 1;
background: var(--bg);
pointer-events: auto;
float:right;
}

/* Modal Drag Handle */
.modal-drag-handle {
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
margin-right: 8px;
padding: 4px;
border-radius: var(--radius);
transition: background-color 0.2s ease;
flex-shrink: 0;
}

.modal-drag-handle:hover {
background-color: var(--bg2);
}

.modal-drag-handle .icon {
width: 24px;
height: 24px;
}

/* Modal Resize Handle */
.modal-resize-handle {
position: absolute;
bottom: 0;
right: 0;
width: 30px;
height: 30px;
cursor: nwse-resize;
display: flex;
align-items: center;
justify-content: center;
user-select: none;
font-size: 20px;
color: var(--border2);
background: linear-gradient(135deg, transparent 50%, var(--bg2) 50%);
border-top-left-radius: var(--radius);
transition: color 0.2s ease, background 0.2s ease;
}

.modal-resize-handle:hover {
color: var(--link);
background: linear-gradient(135deg, transparent 50%, var(--bg3) 50%);
}

.icon {
width:32px;
height:32px;
fill:currentColor;
vertical-align:middle;
}
.googlesign {
display:inline-block;
width:189px;
height:40px;
background-image:url('../images/google-light.png');
background-size:contain;
background-repeat:no-repeat;
vertical-align:middle;
border:0;
}
[data-theme="dark"] .googlesign {
background-image:url('../images/google-dark.png');
}
.fbsign {
display:inline-block;
width:189px;
height:34px;
background-image:url('../images/facebook-light.png');
background-size:contain;
background-repeat:no-repeat;
vertical-align:middle;
border:0;
}
[data-theme="dark"] .fbsign {
background-image:url('../images/facebook-dark.png');
}
.gsign{width:189px;height:40px;vertical-align:middle;display:inline-block;}
.right{float:right}
.left{float:left}
.pagination{margin:15px 0}
.pagination a{display:inline-block;padding:10px 15px;border:solid 1px var(--border);margin:0 2px;border-radius:var(--radius);text-decoration:none;color:var(--link)}
.g-recaptcha{margin:15px 2px}
.clear{clear:both}
.center{text-align:center}
.nowrapdiv a, .nowrapdiv .link{white-space:nowrap;display:inline-block;margin:5px}
.load {
width:30px;
height:30px;
border:5px solid currentColor;
border-top-color:transparent;
border-radius:50%;
animation:spin 0.8s linear infinite;
display: inline-block;
}
@keyframes spin {
to { transform:rotate(360deg); }
}
label{display:inline-block;text-align:center}
.form__field{margin:10px 0}
/*
.loc-row {
justify-content:space-between; 
align-items:center;
white-space:nowrap;
margin:15px 5px 15px 0;
border-bottom:solid 1px var(--border);
}
*/
.loc-row {
display:grid;
grid-template-columns:minmax(0, 1fr) auto; /* important fix */
align-items:center;
padding:6px 0;
border-bottom:solid 1px var(--border);
}
.loctext {
min-width:6em;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis; /* show ... if text is long */
}
.locicon {
margin-left:8px;
}
.loc-row:last-child {
border-bottom:0;
}
.columns {
min-width:17em;
margin-right:15px;
max-width:95%;
width:100%;
overflow-x:hidden;
}
/*photos in new topic*/
.photo-grid {
display:grid;
grid-template-columns:repeat(4,1fr);
gap:8px;
max-width:480px;
}
.photo-slot {
aspect-ratio:1/1;
background:#eee;
border:2px dashed #bbb;
position:relative;
cursor:pointer;
}
.photo-slot img {
position:absolute;
inset:0;
width:100%;
height:100%;
object-fit:contain;
}
.photo-slot.primary {
border:3px solid #2ecc71;
}
.photo-slot .remove {
position:absolute;
top:-5px;
right:-5px;
background:#c00;
color:white;
cursor:pointer;
}
.photo-slot .number {
position:absolute;
bottom:4px;
left:4px;
background:#c00;
color:white;
padding:0 4px;
}
.photo-slot:first-child {
border:4px dashed #2ecc71;
}
.photo-slot:first-child::after {
content:'First';
position:absolute;
bottom:0;
left:0;
background:#050;
color:white;
padding:0 6px;
border-radius:4px;
z-index:2;
pointer-events:none;
line-height:1em;
}
/* camera icon on empty slots */
.photo-slot::before {
content:'';
position:absolute;
inset:0;
background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M149.1 64.8L138.7 96 64 96C28.7 96 0 124.7 0 160L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-74.7 0-10.4-31.2C356.4 45.2 338.1 32 317.4 32L194.6 32c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z'/></svg>") no-repeat center;
background-size:32px 32px;
opacity:.7;
pointer-events:none;
}
/* hide camera when image is present */
.photo-slot img {
display:block;
}
.photo-slot img + *::before,
.photo-slot:has(img)::before {
display:none;
}
/*photos in new-topic end*/
#desc {
max-height:7em; /* shows first few lines */
overflow:hidden;
position:relative;
transition:max-height 0.3s ease;
}
#desc.expanded {
max-height:none;
}
#desc::after {
content:'';
position:absolute;
bottom:0;
left:0;
height:3em;
width:100%;
background:linear-gradient(transparent, #666);
}
#desc.expanded::after {
display:none;
}
.cats.lazy {
background: var(--bg);
min-height: 200px;
}
img.lazy-error {
background: #ffebee;
}
.hbox{border:solid 1px var(--border);border-radius:var(--radius);}
.f130{font-size:130%;font-weight:bold} 
.landscape {
width: 1.8em;
height: 1.1em;
display: inline-flex; /* not inline-block */
justify-content: center; /* center horizontally */
align-items: center; /* center vertically */
box-sizing: border-box;
border: 0.12em solid currentColor;
border-radius: 0.2em;
vertical-align: middle;
line-height: 1; /* prevent weird offsets */
}
.portrait {
width: 1.1em;
height: 1.8em;
display: inline-flex; /* allows perfect centering */
justify-content: center;
align-items: center;
box-sizing: border-box; 
border: 0.12em solid currentColor;
border-radius: 0.2em; 
vertical-align: middle; 
line-height: 1; /* prevents offset issues */
}
.f70{font-size:90%;}
.f80{font-size:90%;}
.f90{font-size:95%;}
.f70,.f80,.f90{line-height:120%}
#gotop{position:fixed;bottom:3px;right:3px;display: none;z-index:4} 
/*dd start*/
.dd {
position: relative;
display: inline-block;
} 
.dd-toggle {
cursor: pointer;
padding: 4px 8px;
user-select: none;
} 
.dd-menu {
position: absolute;
top: 100%;
left: 0;
display: none;
background: var(--bg);
border: 1px solid var(--border3);
border-radius: var(--radius);
white-space: nowrap;
z-index: 1000;
padding:5px;
} 
.dd.open .dd-menu {
display: block;
} 
.dd-item {
display: block;
padding: 4px 10px;
cursor: pointer;
margin:15px 0;
} 
.dd-item:hover {
background: #eee;
} 
/* 🔼 open upward */
.dd.open-up .dd-menu {
top: auto;
bottom: 100%;
} 
/* ◀ open to the left */
.dd.open-left .dd-menu {
left: auto;
right: 0;
}
.dd-close{width:90%}
.dd-close svg {color:#900}
/*dd end */
.y{background:#ff0;color:#000}
[data-theme="dark"] .y{color:#ff0;background:#000} 

/* NETWORK STATUS BAR */
#networkStatusBar{position:fixed;top:0;inset:0 0 auto 0;height:50px;background:#d32f2f;color:#fff;display:none;align-items:center;justify-content:space-between;padding:0 20px;z-index:10001;box-shadow:0 2px 8px rgba(0,0,0,.3);font:500 16px system-ui}
#networkStatusBar.offline{display:flex;animation:slideDown .3s}
#networkStatusBar.online{background:#4caf50}
@keyframes slideDown{from{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}
.network-status-content{display:flex;align-items:center;gap:12px;flex:1}
.network-status-icon{font-size:20px;animation:blink 1s infinite}
@keyframes blink{0%,100%{opacity:1}50%{opacity:.6}}
.network-status-text{display:flex;flex-direction:column;gap:2px;line-height:1.2}
.network-status-text .title{font-weight:600;font-size:15px}
.network-status-text .subtitle{font-size:13px;opacity:.95}
#dismissNetworkBtn{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.4);color:#fff;padding:6px 12px;border-radius:4px;cursor:pointer;font-size:13px;font-weight:500;transition:all .2s;white-space:nowrap}
#dismissNetworkBtn:hover{background:rgba(255,255,255,.3);border-color:rgba(255,255,255,.6)}
#dismissNetworkBtn:active{transform:scale(.98)}
