/* Фото игр (app/photos.php). Цвета и шрифты берутся из переменных app.css. */
.ph-ic{width:16px;height:16px;flex:none}
.ph-ic.xs{width:12px;height:12px}
.ph-ic.fill{fill:currentColor;stroke:none}
.btn .ph-ic{width:15px;height:15px}
.tl-photos{background:var(--t-review);color:var(--t-review-fg)}

/* Шапка раздела и фильтры */
.ph-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.ph-head .page-t{margin:0}
.ph-head p{margin:4px 0 0}
.ph-game{display:flex;align-items:center;gap:14px;min-width:0}
.ph-game .gl{width:64px;height:64px;border-radius:10px;font-size:28px}
.crumbs-l{font-size:12px;color:var(--muted);margin-bottom:2px}
.crumbs-l a:hover{color:var(--red)}
.pchips{display:flex;gap:6px;flex-wrap:wrap}
.pchip{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 13px;border-radius:99px;background:var(--surface);font-size:13px;font-weight:600;white-space:nowrap}
.pchip small{color:var(--faint);font-weight:500;font-size:12px}
.pchip:hover{color:var(--red)}
.pchip.on{background:var(--ink);color:var(--ink-fg)}
.pchip.on small{color:inherit;opacity:.6}
.pchips.sm .pchip{background:var(--surface-2);height:28px;font-size:12px;padding:0 11px}
.pchips.sm .pchip.on{background:var(--ink)}
.ph-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.ph-bar .seg{background:var(--surface);padding:3px}
.ph-bar .seg a.on{background:var(--surface-2);box-shadow:none}
.ph-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.toggle{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--muted)}
.toggle i{width:32px;height:18px;border-radius:99px;background:var(--line);position:relative;transition:background .15s}
.toggle i::after{content:"";position:absolute;left:2px;top:2px;width:14px;height:14px;border-radius:50%;background:#fff;transition:left .15s}
.toggle.on{color:var(--fg)}
.toggle.on i{background:var(--red)}
.toggle.on i::after{left:16px}

/* Поиск игры с подсказками */
.gfind{position:relative;display:flex;align-items:center;gap:8px;height:36px;padding:0 12px;border-radius:10px;background:var(--surface);color:var(--faint);min-width:220px}
.gfind input{border:0;background:none;outline:none;font:inherit;font-size:13px;color:var(--fg);width:100%;padding:0}
.gfind.wide{background:var(--surface-2);height:42px;min-width:0}
.gfind.wide input{font-size:14px}
.gfind-pop{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:20;background:var(--surface);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.18);padding:4px;max-height:320px;overflow:auto;color:var(--fg)}
.gfind-pop button{display:flex;width:100%;text-align:left;gap:8px;align-items:baseline;padding:8px 10px;border-radius:7px;font-size:13.5px}
.gfind-pop button:hover,.gfind-pop button.on{background:var(--surface-2)}
.gfind-pop small{color:var(--muted);font-size:12px}
.gfind-pop p{margin:0;padding:8px 10px;font-size:13px;color:var(--muted)}

/* Ровная плитка: высота ряда одна, ширина по пропорциям фото */
.jg{display:flex;flex-wrap:wrap;gap:6px;--h:200px}
.jg>a{position:relative;display:block;height:var(--h);width:calc(var(--h) * var(--r));flex-grow:calc(var(--r) * 100);border-radius:10px;overflow:hidden;background:var(--surface-2)}
.jg>a img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s}
.jg>a:hover img{transform:scale(1.03)}
.jg-fill{flex-grow:9999;height:0}
.jg-cat,.jg-st{position:absolute;left:8px;top:8px;font-size:11px;font-weight:700;padding:3px 8px;border-radius:6px;background:rgba(0,0,0,.55);color:#fff}
.jg-st{left:auto;right:8px;background:var(--t-crowd);color:var(--t-crowd-fg)}
.jg-ov{position:absolute;inset:auto 0 0 0;padding:30px 10px 8px;background:linear-gradient(transparent,rgba(0,0,0,.72));color:#fff;display:flex;align-items:flex-end;justify-content:space-between;gap:8px;font-size:12px;pointer-events:none}
.jg-t{min-width:0}
.jg-t b{display:block;font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.jg-t span{opacity:.8;white-space:nowrap}
.jg-lk{display:inline-flex;align-items:center;gap:4px;font-weight:700;white-space:nowrap}
.jg-lk .ph-ic{width:13px;height:13px}
.jg-sm{--h:170px}

/* Страница фото */
.pv{max-width:1180px;margin:0 auto;padding:16px;display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;align-items:start}
.pv-main{min-width:0}
.pv-note{background:var(--t-crowd);color:var(--t-crowd-fg);border-radius:10px;padding:10px 14px;font-size:13.5px;font-weight:600;margin-bottom:10px}
.pv-stage{background:#0d0d0f;border-radius:var(--r);position:relative;display:grid;place-items:center;min-height:420px;overflow:hidden}
.pv-img{display:block;cursor:zoom-in}
.pv-stage img{max-width:100%;max-height:min(78vh,760px);width:auto;height:auto;display:block}
.pv-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.14);display:grid;place-items:center;color:#fff;transition:background .15s}
.pv-nav:hover{background:rgba(255,255,255,.28)}
.pv-nav .ph-ic{width:22px;height:22px}
.pv-nav.l{left:14px}.pv-nav.r{right:14px}
.pv-cnt,.pv-full{position:absolute;top:12px;color:#fff;font-size:12px;background:rgba(0,0,0,.5);padding:5px 9px;border-radius:7px}
.pv-cnt{left:14px}
.pv-full{right:14px;font-weight:600;display:inline-flex;gap:6px;align-items:center}
.pv-full .ph-ic{width:13px;height:13px}
.pv-strip{display:flex;gap:6px;margin-top:10px;overflow-x:auto;align-items:center;scrollbar-width:thin}
.pv-strip a{flex:none}
.pv-strip img{width:76px;height:56px;object-fit:cover;border-radius:7px;opacity:.6;display:block;transition:opacity .15s}
.pv-strip a:hover img{opacity:1}
.pv-strip a.on img{opacity:1;outline:2px solid var(--red);outline-offset:1px}
.pv-strip .pv-all{font-size:13px;font-weight:600;color:var(--red);padding:0 10px;white-space:nowrap}
.pv-side{display:flex;flex-direction:column;gap:12px;min-width:0}
.pv-side .gchip{border:0;background:var(--surface-2)}
.pv-side .gchip b{display:block;font-size:14px}
.pv-side .gchip small{color:var(--muted);font-size:12px}
.pv-side .gchip .gl{width:44px;height:44px}
.pv-cap{font-size:15px;line-height:1.5;margin:12px 0 0;overflow-wrap:anywhere}
.pv-meta{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:12px 0;font-size:12.5px;color:var(--muted)}
.pv-cat{font-size:12px;font-weight:700;padding:4px 9px;border-radius:7px;background:var(--surface-2);color:var(--fg)}
.pv-cat.c-play{background:var(--t-report);color:var(--t-report-fg)}
.pv-cat.c-paint{background:var(--t-rules);color:var(--t-rules-fg)}
.pv-cat.c-box{background:var(--t-review);color:var(--t-review-fg)}
.pv-cat.c-components{background:var(--t-crowd);color:var(--t-crowd-fg)}
.pv-cat.c-loc{background:var(--t-news);color:var(--t-news-fg)}
.pv-acts{display:flex;gap:8px;align-items:center;border-top:1px solid var(--line);padding-top:12px}
.pv-sp{flex:1}
.like{display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 14px;border-radius:10px;background:var(--surface-2);color:var(--muted);font-weight:700;font-size:14px}
.like .ph-ic{width:18px;height:18px}
.like:hover:not(:disabled){color:var(--red)}
.like.on{background:var(--red-soft);color:var(--red-ink)}
.like.on .ph-ic{fill:currentColor}
.like:disabled{cursor:default;opacity:.7}
.ghost-s{display:inline-flex;align-items:center;gap:6px;height:38px;padding:0 12px;border-radius:10px;background:var(--surface-2);color:var(--muted);font-weight:600;font-size:13px;cursor:pointer;list-style:none}
.ghost-s::-webkit-details-marker{display:none}
.ghost-s:hover{color:var(--fg)}
.pv-rep{position:relative}
.pv-rep-pop{position:absolute;right:0;top:calc(100% + 6px);z-index:20;width:270px;background:var(--surface);border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.2);padding:14px}
.pv-rep-pop form{display:flex;flex-direction:column;gap:8px;font-size:13.5px}
.pv-rep-pop label{display:flex;gap:8px;align-items:center}
.pv-rep-pop input[type=text]{height:36px;border-radius:8px;border:1px solid var(--line);background:var(--surface-2);padding:0 10px;font:inherit;font-size:13px;color:var(--fg)}
.likers{display:flex;align-items:center;margin-top:12px;font-size:12px;color:var(--muted)}
.likers .ava{width:24px;height:24px;font-size:10px;border:2px solid var(--surface);margin-right:-6px}
.likers span{margin-left:14px}
.pv-staff{margin-top:12px}
.pv-staff .btn{width:100%}
.pv-who{display:flex;align-items:center;gap:10px}
.pv-who b{display:block;font-size:14px}
.pv-who small{display:block;color:var(--muted);font-size:12px}
.pv-who .btn{margin-left:auto}
.pv-mh{display:flex;justify-content:space-between;align-items:baseline}
.pv-mh a{font-family:var(--body);font-size:12px;text-transform:none;color:var(--red);font-weight:600}
.pv-more{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.pv-more img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px;display:block}
.pv .comments .cm-send{justify-content:flex-end}

/* Блок на странице игры */
.gph-h{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;flex-wrap:wrap}
.card h2.h-disp.gph-h,.gph-h h2.h-disp{margin:0}
.gph .pchips{margin-bottom:12px}
.gph-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.gph-grid a{position:relative;display:block;border-radius:9px;overflow:hidden;aspect-ratio:1;background:var(--surface-2)}
.gph-grid img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s}
.gph-grid a:hover img{transform:scale(1.04)}
.gph-n{position:absolute;inset:0;display:grid;place-items:center;background:rgba(0,0,0,.6);color:#fff;font-family:var(--display);font-size:26px;font-weight:600}
.gph-f{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:12px;font-size:13px;color:var(--muted);flex-wrap:wrap}
.gph-f a{font-weight:700;color:var(--red)}
.gph-old{margin:14px 0 8px}

/* Загрузка и правка */
.up{max-width:880px;margin:0 auto;padding:16px;display:flex;flex-direction:column;gap:12px;width:100%}
.lbl{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--faint);margin-bottom:8px}
.up .gchip{border:0;background:var(--surface-2)}
.up .gchip b{display:block;font-size:14px}
.up .gchip small{color:var(--muted);font-size:12px}
.up .gchip .gl{width:44px;height:44px}
.up-change{margin-left:auto;color:var(--muted);font-size:13px;font-weight:600}
.up-change:hover{color:var(--red)}
.drop{border:2px dashed var(--line);border-radius:12px;padding:24px;text-align:center;color:var(--muted);font-size:14px;display:flex;flex-direction:column;align-items:center;gap:8px;cursor:pointer;transition:border-color .15s,background .15s}
.drop:hover,.drop.over{border-color:var(--red);background:var(--red-soft)}
.drop input{position:absolute;width:1px;height:1px;opacity:0}
.drop-ic{width:34px;height:34px;color:var(--faint)}
.drop b{color:var(--fg)}
.drop small{color:var(--faint)}
.drop.off{opacity:.5;pointer-events:none}
.allcat{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);flex-wrap:wrap;margin-top:12px}
.pill-s{font-size:12px;font-weight:600;padding:5px 10px;border-radius:7px;background:var(--surface-2);color:var(--muted)}
.pill-s:hover{color:var(--fg)}
.upl{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.upr{display:grid;grid-template-columns:120px minmax(0,1fr) 28px;gap:12px;align-items:start;padding:10px;border-radius:12px;background:var(--surface-2)}
.upr-img{position:relative;width:120px;height:90px;border-radius:8px;overflow:hidden;background:var(--line)}
.upr-img img{width:100%;height:100%;object-fit:cover;display:block}
.upr-st{position:absolute;inset:0;display:none;place-items:center;background:rgba(0,0,0,.45);color:#fff;font-size:12px;font-weight:700;text-align:center;padding:4px}
.upr.err .upr-st,.upr.wait .upr-st{display:grid}
.upr-f{display:flex;flex-direction:column;gap:8px;min-width:0}
.upr-cats{display:flex;gap:5px;flex-wrap:wrap}
.upr-cats label{cursor:pointer}
.upr-cats input{position:absolute;opacity:0;width:1px;height:1px}
.upr-cats span{display:inline-block;font-size:12px;font-weight:600;padding:5px 10px;border-radius:7px;background:var(--surface);color:var(--muted)}
.upr-cats input:checked+span{background:var(--ink);color:var(--ink-fg)}
.upr-cats input:focus-visible+span{outline:2px solid var(--red)}
.pe .upr-cats span{background:var(--surface-2)}
.upr-cap{height:36px;border-radius:8px;border:1px solid transparent;background:var(--surface);color:var(--fg);font:inherit;font-size:13.5px;padding:0 10px;width:100%}
.upr-cap:focus{outline:none;border-color:var(--faint)}
.pe .upr-cap{background:var(--surface-2)}
.prog{height:4px;border-radius:9px;background:var(--surface);overflow:hidden}
.prog i{display:block;height:100%;width:0;background:var(--ok);transition:width .2s}
.upr.done .prog{display:none}
.upr-sz{font-size:11.5px;color:var(--faint)}
.upr.err .upr-sz{color:var(--red-ink);font-weight:600}
.upr-x{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;color:var(--faint)}
.upr-x:hover{color:var(--red);background:var(--surface)}
.up-end{display:flex;flex-direction:column;gap:12px}
.chk{display:flex;gap:10px;align-items:flex-start;font-size:14px;cursor:pointer}
.chk input{width:18px;height:18px;accent-color:var(--red);margin:1px 0 0;flex:none}
.up-note{margin:0;font-size:13px;background:var(--t-crowd);color:var(--t-crowd-fg);border-radius:10px;padding:10px 12px}
.up-f{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.pe{max-width:880px;margin:0 auto;width:100%}
.pe-grid{display:grid;grid-template-columns:260px minmax(0,1fr);gap:20px;align-items:start;margin-top:12px}
.pe-grid img{width:100%;border-radius:10px;display:block}
.pe .up{padding:0;gap:6px}
.pe .up .lbl{margin:10px 0 2px}
.pe .up-f{margin-top:14px;justify-content:flex-end}
.pe-del{margin-top:18px;border-top:1px solid var(--line);padding-top:14px}
.errors{background:var(--red-soft);color:var(--red-ink);border-radius:10px;padding:10px 14px;font-size:13.5px}
.errors p{margin:0}

/* Проверка */
.mq{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px;margin-top:12px}
.mq-it{background:var(--surface);border-radius:12px;overflow:hidden;display:flex;flex-direction:column}
.mq-img{position:relative;display:block;cursor:pointer}
.mq-img img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}
.mq-img input{position:absolute;left:10px;top:10px;width:20px;height:20px;accent-color:var(--ok)}
.mq-it:has(input:checked){outline:3px solid var(--ok);outline-offset:-3px}
.mq-b{padding:10px;display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--muted);flex:1}
.mq-b b{color:var(--fg);font-size:13.5px}
.mq-b a:hover{color:var(--red)}
.mq-flag{color:var(--red-ink);font-weight:600}
.mq-bt{display:flex;gap:6px;margin-top:auto;padding-top:6px}
.mq-bt button{flex:1;height:32px;border-radius:8px;font-weight:700;font-size:12px}
.mq-bt .ok{background:var(--ok-soft);color:var(--ok)}
.mq-bt .no{background:var(--surface-2);color:var(--muted)}
.mq-more{display:flex;gap:10px;flex-wrap:wrap}
.mq-more button{font-size:11.5px;color:var(--faint);text-decoration:underline;text-underline-offset:2px}
.mq-more button:hover{color:var(--fg)}

/* Лента */
.pcard{display:flex;flex-direction:column;gap:10px}
.pcard .pc-t{font-size:17px;margin:0}
.pcard .pc-t a{color:var(--red)}
.pc-cat{color:var(--muted);font-weight:500}
.pc-g{display:grid;gap:4px;height:300px;border-radius:10px;overflow:hidden}
.pc-g a{position:relative;display:block;min-height:0}
.pc-g img{width:100%;height:100%;object-fit:cover;display:block}
.pc-g span{position:absolute;inset:0;display:grid;place-items:center;background:rgba(0,0,0,.5);color:#fff;font-family:var(--display);font-size:26px;font-weight:600}
.pc-g.n1{height:auto;max-height:440px}
.pc-g.n1 img{max-height:440px}
.pc-g.n2{grid-template-columns:1fr 1fr}
.pc-g.n3{grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr}
.pc-g.n3 a:first-child{grid-row:span 2}
.pc-g.n4{grid-template-columns:2fr 1fr 1fr;grid-template-rows:1fr 1fr}
.pc-g.n4 a:first-child{grid-row:span 2}
.pc-g.n4 a:last-child{grid-column:span 2}
.pc-g.n5{grid-template-columns:2fr 1fr 1fr;grid-template-rows:1fr 1fr}
.pc-g.n5 a:first-child{grid-row:span 2}
.pcard .ph-ic{width:15px;height:15px}

/* Правая колонка */
.pweek a{position:relative}
.pweek-l{position:absolute;left:10px;top:10px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:4px 8px;border-radius:6px;background:var(--red);color:#fff}
.pweek .gshot-t small{display:block;font-weight:500;font-size:12px;opacity:.85}

@media (max-width:760px){
  .jg{--h:130px;gap:4px}
  .jg>a{border-radius:8px}
  .jg-ov{padding:20px 7px 6px;font-size:11px}
  .jg-t b{font-size:12px}
  .jg-t span,.jg-cat{display:none}
  .pchips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 -12px;padding:0 12px}
  .ph-bar .seg{width:100%;overflow-x:auto}
  .ph-bar .seg a{flex:1;justify-content:center;white-space:nowrap}
  .ph-tools{width:100%}
  .gfind{flex:1;min-width:0}
  .ph-head .btn-lg{width:100%;justify-content:center}
  .pv{grid-template-columns:1fr;padding:0 0 16px}
  .pv-stage{border-radius:0;min-height:0}
  .pv-stage img{max-height:none;width:100%}
  .pv-nav{width:36px;height:36px;background:rgba(0,0,0,.35)}
  .pv-full span{display:none}
  .pv-strip{padding:0 12px}
  .pv-side{padding:0 12px}
  .pv-note{margin:0 12px 10px}
  .gph-grid{grid-template-columns:repeat(3,1fr)}
  .gph-grid a:nth-child(n+7){display:none}
  .gph-grid a:nth-child(6) .gph-n,.gph-grid a:nth-child(6)::after{display:grid}
  .upr{grid-template-columns:84px minmax(0,1fr) 24px;gap:10px}
  .upr-img{width:84px;height:84px}
  .pe-grid{grid-template-columns:1fr}
  .pc-g{height:220px}
  .up{padding:12px}
}
