*{box-sizing:border-box}body{margin:0;font-family:system-ui,Arial,sans-serif;background:#0f172a;color:#e2e8f0;line-height:1.5}
a{color:#38bdf8;text-decoration:none}.wrap{max-width:1150px;margin:auto;padding:0 14px}
header{background:#020617;border-bottom:1px solid #1e293b;position:sticky;top:0;z-index:9}
.bar{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:10px 14px}
.logo{font-size:22px;font-weight:700;color:#fff}nav{display:flex;gap:16px;flex:1}nav a{color:#cbd5e1;font-size:14px}
.dd{position:relative}.menu{display:none;position:absolute;top:100%;left:0;background:#0f172a;border:1px solid #1e293b;min-width:180px;padding:6px}
.dd:hover .menu{display:block}.menu a{display:block;padding:6px 10px}
.sf{display:flex;gap:4px}input,textarea,select{background:#1e293b;border:1px solid #334155;color:#fff;padding:9px;border-radius:6px;width:100%;margin-bottom:10px;font:inherit}
.sf input{margin:0;width:170px}button,.btn{background:#0ea5e9;color:#fff;border:0;padding:9px 16px;border-radius:6px;cursor:pointer;display:inline-block;font:inherit}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:16px;margin:20px 0}
.card{background:#1e293b;border-radius:10px;padding:10px}.card img{width:100%;height:140px;object-fit:cover;border-radius:8px}
.card h2{font-size:15px;margin:6px 0}small,.meta{color:#94a3b8}.card .btn{margin-top:8px;font-size:13px}
.pager{text-align:center;margin:20px 0}.pager a{margin:0 8px}
.post,.comments,.form{background:#1e293b;border-radius:10px;padding:18px;margin:20px 0}.hero{max-width:100%;border-radius:8px}
.info{margin:12px 0}.info td{padding:4px 14px 4px 0}.big{font-size:17px;padding:12px 22px}
.cm{border-top:1px solid #334155;padding:8px 0}.ok{background:#14532d;padding:8px;border-radius:6px}
footer{background:#020617;margin-top:30px;padding:20px 0;text-align:center;font-size:14px}.cats a{margin:0 6px}
table.t{width:100%;border-collapse:collapse}table.t td,table.t th{border-bottom:1px solid #334155;padding:6px;text-align:left;vertical-align:top}
.red{background:#dc2626}
@media(max-width:600px){.sf input{width:120px}}

/* Responsive layout: adapts to phone, tablet and desktop screen sizes */
html{ -webkit-text-size-adjust:100%; text-size-adjust:100%; }
body{min-width:320px;overflow-x:hidden}
img,video,iframe{max-width:100%}
.wrap{width:100%}
.bar{min-height:62px}
nav{align-items:center;flex-wrap:wrap}
.grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr))}
.card{min-width:0;overflow:hidden}
.card img{display:block;object-fit:cover}
.post,.comments,.form{min-width:0;overflow-wrap:anywhere}
.desc{overflow-wrap:anywhere;word-break:normal}
.desc img,.desc video,.desc iframe{max-width:100%;height:auto}
.desc img{display:block;border-radius:10px;margin:12px auto}
.desc iframe{width:100%;min-height:280px;border:0}
.download-box{margin:20px 0;padding:16px;border:1px solid #334155;border-radius:12px;background:#0f172a}
.download-box .big{max-width:100%;white-space:normal}
.download-timer{margin-top:14px}
.download-timer p{margin:8px 0}
.timer-track{height:10px;background:#334155;border-radius:20px;overflow:hidden;margin:12px 0}
.timer-track span{display:block;width:0;height:100%;background:#0ea5e9;transition:width .3s linear}
.timer-help,.download-fallback{font-size:14px;color:#94a3b8}
.download-fallback{display:inline-block;margin-top:6px;text-decoration:underline}
button:disabled{opacity:.65;cursor:wait}
[hidden]{display:none!important}
@media(min-width:1000px){
 .wrap{max-width:1200px;padding-left:24px;padding-right:24px}
 .bar{gap:22px;padding:14px 0}
 .logo{font-size:26px}
 nav{gap:22px}
 .grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:22px;margin:26px 0}
 .card{padding:14px}
 .card img{height:180px}
 .post,.comments,.form{padding:26px;margin:26px 0}
 .post h1{font-size:34px}
 .hero{max-height:560px;object-fit:contain}
}
@media(min-width:601px) and (max-width:999px){
 .wrap{max-width:900px;padding-left:20px;padding-right:20px}
 .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .bar{gap:10px}
 nav{gap:12px}
}
@media(max-width:600px){
 .wrap{padding-left:12px;padding-right:12px}
 .bar{align-items:stretch;gap:9px;padding:10px 0}
 .logo{font-size:21px}
 nav{order:2;flex:1 1 100%;gap:14px;overflow-x:auto;white-space:nowrap;padding:4px 0}
 nav a{font-size:13px}
 .sf{order:3;width:100%}
 .sf input{width:auto;min-width:0;flex:1}
 .sf button{flex:0 0 auto}
 .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}
 .card{padding:8px;border-radius:8px}
 .card img{height:118px}
 .card h2{font-size:14px;line-height:1.35}
 .card .btn{padding:8px 10px;font-size:12px}
 .post,.comments,.form{padding:13px;margin:14px 0;border-radius:9px}
 .post h1{font-size:24px;line-height:1.25}
 .hero{width:100%;height:auto}
 .info{width:100%;font-size:14px}
 .info td{padding:5px 8px 5px 0;overflow-wrap:anywhere}
 .big{font-size:15px;padding:11px 14px}
 input,textarea,select,button{font-size:16px}
 .download-box{padding:12px;margin:14px 0}
 .desc iframe{min-height:210px}
 table.t{display:block;overflow-x:auto;white-space:nowrap}
 footer{padding:16px 0}
}
@media(max-width:380px){
 .grid{grid-template-columns:1fr}
 .card img{height:170px}
 nav{gap:10px}
}


/* Smart Rintu high-resolution header logo */
.logo{display:flex;align-items:center;flex:0 0 auto;line-height:0}
.site-logo{display:block;width:clamp(190px,28vw,340px);height:auto;max-width:100%;object-fit:contain}
/* Description media always scales to the available device width */
.desc{max-width:100%;min-width:0;overflow-wrap:anywhere}
.desc img,.desc picture,.desc video{display:block;max-width:100% !important;width:auto !important;height:auto !important;object-fit:contain}
.desc img{margin:12px auto;border-radius:10px}
.desc video{margin:12px auto}
@media(max-width:600px){.site-logo{width:min(76vw,270px)}.logo{max-width:100%}.bar{align-items:center}}
@media(min-width:1000px){.site-logo{width:340px}}


/* Final layout correction: keep post content full-width and media inside the post */
html, body { width:100%; max-width:100%; }
main.wrap { display:block; width:100%; max-width:1200px; margin-left:auto; margin-right:auto; }
.post, .comments, .form { display:block; width:100%; max-width:100%; min-width:0; }
.post { overflow:hidden; }
.desc { display:block; width:100%; max-width:100%; min-width:0; overflow:hidden; overflow-wrap:anywhere; }
.desc, .desc * { box-sizing:border-box; max-width:100% !important; }
.desc img, .desc picture img, .desc video { display:block !important; width:auto !important; height:auto !important; max-width:100% !important; object-fit:contain !important; float:none !important; margin:14px auto !important; }
.desc figure, .desc div, .desc section, .desc article, .desc p { max-width:100% !important; overflow-wrap:anywhere; }
.desc table { width:100% !important; max-width:100% !important; table-layout:fixed; }
.desc iframe { display:block; width:100% !important; max-width:100% !important; }
.desc pre, .desc code { white-space:pre-wrap; overflow-wrap:anywhere; }
.bar { width:100%; max-width:1200px; margin:0 auto; }
.logo { min-width:0; max-width:100%; }
.site-logo { display:block; width:min(100%, 420px); height:auto; object-fit:contain; }
@media(max-width:600px) {
  main.wrap { width:100%; padding-left:12px; padding-right:12px; }
  .bar { width:100%; align-items:center; }
  .logo { width:100%; justify-content:center; }
  .site-logo { width:min(88vw, 340px); max-height:116px; }
  .desc { font-size:16px; line-height:1.65; }
  .desc img, .desc video { max-height:none !important; }
}
@media(min-width:601px) {
  .site-logo { width:min(34vw, 420px); }
}

.footer-links{margin:12px 0}.footer-links a{display:inline-block;padding:3px 5px}.legal-page{max-width:900px;margin:24px auto;padding:22px;background:#1e293b;border:1px solid #334155;border-radius:14px}.legal-page h1{margin-top:0}.legal-page h2{font-size:1.15rem;margin:22px 0 6px;color:#7dd3fc}.legal-page p{overflow-wrap:anywhere}.site-logo{display:block;max-width:min(100%,420px);height:auto}


/* Header category navigation: evenly spaced, touch-friendly and animated */
.header-categories{flex:1 0 100%;display:flex;align-items:center;gap:14px;min-width:0;padding:8px 0 12px;border-top:1px solid rgba(148,163,184,.16);}
.category-label{flex:0 0 auto;color:#e2e8f0;font-weight:700;letter-spacing:.02em;}
.category-list{display:flex;align-items:center;flex-wrap:wrap;gap:9px 12px;min-width:0;}
.category-chip{display:inline-flex;align-items:center;justify-content:center;padding:6px 12px;border:1px solid rgba(56,189,248,.22);border-radius:999px;background:rgba(30,41,59,.72);color:#7dd3fc;font-size:14px;line-height:1.35;white-space:nowrap;transition:transform .22s ease,background .22s ease,border-color .22s ease,box-shadow .22s ease;color .22s ease;animation:category-in .45s both;}
.category-chip:nth-child(2){animation-delay:.04s}.category-chip:nth-child(3){animation-delay:.08s}.category-chip:nth-child(4){animation-delay:.12s}.category-chip:nth-child(5){animation-delay:.16s}.category-chip:nth-child(6){animation-delay:.20s}.category-chip:nth-child(7){animation-delay:.24s}.category-chip:nth-child(8){animation-delay:.28s}
.category-chip:hover,.category-chip:focus-visible{transform:translateY(-3px);background:linear-gradient(110deg,#7c3aed,#0ea5e9);border-color:#38bdf8;color:#fff;box-shadow:0 5px 16px rgba(14,165,233,.25);outline:none;}
.category-chip.active{background:linear-gradient(110deg,#7c3aed,#0ea5e9);border-color:#38bdf8;color:#fff;box-shadow:0 0 0 2px rgba(56,189,248,.12);}
@keyframes category-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){.header-categories{align-items:flex-start;flex-direction:column;gap:8px;padding:10px 0 12px}.category-list{width:100%;gap:8px 9px}.category-chip{padding:6px 10px;font-size:13px;white-space:normal;text-align:center;max-width:100%;}}
@media(prefers-reduced-motion:reduce){.category-chip{animation:none;transition:none}}


/* SmartRintu centered header and compact list-style post feed */
@media(min-width:601px){
  header .bar{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:14px 18px 12px;}
  header .bar>.logo{order:1;width:100%;justify-content:center;flex:0 0 auto;}
  header .bar>nav{order:2;width:100%;flex:0 0 auto;justify-content:center;align-items:center;gap:26px;padding:2px 0;}
  header .bar>.sf{order:3;justify-content:center;width:min(100%,520px);}
  header .bar>.sf input{width:100%;}
  header .bar>.header-categories{order:4;flex:0 0 auto;width:100%;justify-content:center;align-items:center;gap:12px;padding:8px 0 4px;border-top:1px solid rgba(148,163,184,.16);}
  header .bar>.header-categories .category-select-wrap{width:min(100%,300px);}
  header .bar>.header-categories select{width:100%;margin:0;}
}
@media(max-width:600px){
  header .bar{display:flex;flex-direction:column;align-items:center;}
  header .bar>.logo{order:1;width:100%;justify-content:center;}
  header .bar>nav{order:2;width:100%;flex:0 0 auto;justify-content:center;}
  header .bar>.sf{order:3;width:100%;justify-content:center;}
  header .bar>.header-categories{order:4;width:100%;align-items:center;text-align:center;}
  header .bar>.header-categories .category-select-wrap{width:min(100%,300px);}
  header .bar>.header-categories select{width:100%;margin:0;}
}
/* Feed cards use a readable horizontal list instead of a tile grid */
.grid{display:flex;flex-direction:column;gap:14px;margin:20px 0;}
.grid>.card{display:grid;grid-template-columns:minmax(190px,280px) minmax(0,1fr);grid-template-rows:auto auto auto 1fr;column-gap:18px;align-items:start;padding:12px;}
.grid>.card>a:first-child{grid-column:1;grid-row:1 / span 4;display:block;}
.grid>.card>a:first-child img{width:100%;height:160px;object-fit:cover;}
.grid>.card>small,.grid>.card>h2,.grid>.card>.btn{grid-column:2;}
.grid>.card>small:first-of-type{grid-row:1;}
.grid>.card>h2{grid-row:2;font-size:18px;line-height:1.4;margin:6px 0;}
.grid>.card>small:nth-of-type(2){grid-row:3;}
.grid>.card>.btn{grid-row:4;justify-self:start;align-self:end;margin-top:10px;}
@media(max-width:600px){
 .grid{display:flex;flex-direction:column;gap:10px;}
 .grid>.card{grid-template-columns:112px minmax(0,1fr);column-gap:11px;padding:9px;}
 .grid>.card>a:first-child img{height:92px;}
 .grid>.card>h2{font-size:14px;margin:3px 0;}
 .grid>.card>small{font-size:11px;}
 .grid>.card>.btn{font-size:12px;padding:7px 11px;margin-top:5px;}
}
