/* Desktop and wide-tablet layout. Mobile portrait keeps its established UI.
   The whole game, not just its END photographs, becomes a wide canvas. */
@media (min-width: 1024px) and (orientation: landscape) and (min-height: 560px) {
  html,body { width:100%;height:100%;overflow:hidden; }
  body::before,body::after { content:none!important;display:none!important; }
  .app {
    width: min(calc(100vw - 28px), 1900px);
    max-width:none;
    height:calc(100dvh - 28px);
    max-height:none;
    margin:14px auto;
    display:flex;
    flex-direction:column;
    border:1px solid #4c8bad;
    box-shadow:0 0 0 1px #061c2d,0 18px 70px #000d;
  }
  .topbar {
    display:grid;
    grid-template-columns:minmax(290px, 32%) minmax(0, 1fr);
    align-items:stretch;
    gap:12px;
    width:100%;
    min-height:136px;
    padding:10px 13px;
  }
  .agency-row {
    display:flex;
    align-items:center;
    align-self:stretch;
    height:auto;
    min-height:105px;
    gap:9px;
    margin:0;
    padding:7px 9px;
    border:1px solid #5c9dc1;
    background:linear-gradient(150deg,#123b59,#0a2941);
  }
  .agency-mark {width:44px;height:44px;min-width:44px;}
  .agency-title {font-size:clamp(15px,1.55vw,22px);line-height:1.2;}
  .agency-sub {font-size:clamp(9px,.85vw,12px);}
  .agency-row .icon-btn{width:43px;height:43px;min-width:43px;}
  .wanted-strip {
    min-width:0;
    min-height:105px;
    align-self:stretch;
    grid-template-columns:clamp(84px,8vw,114px) minmax(0,1fr) clamp(104px,11vw,140px);
  }
  .wanted-photo {min-height:0;}
  .wanted-photo canvas {max-height:none;}
  .wanted-info {gap:5px;padding:9px 14px;}
  .wanted-name {font-size:clamp(23px,2.2vw,31px);line-height:1.13;}
  .wanted-label {font-size:clamp(11px,1vw,14px);}
  .wanted-label-prefix,.wanted-label-case {font-size:inherit;}
  .wanted-hint {font-size:clamp(12px,1.13vw,16px);}
  .wanted-crime {font-size:clamp(11px,1.07vw,15px);}
  .wanted-hint-tap {font-size:clamp(9px,.9vw,12px);}
  .time-block {padding:9px 8px;justify-content:center;gap:12px;}
  .time-block span {font-size:clamp(12px,1.2vw,16px);}
  .time-block strong {font-size:clamp(25px,2.3vw,35px);padding:9px 1px;}
  .playfield {width:100%;flex:1 1 auto;min-height:0;}
  .camera-top {font-size:clamp(12px,1vw,16px);top:17px;left:20px;padding:7px 11px;}
  .camera-bottom {left:20px;right:20px;bottom:16px;font-size:clamp(12px,1vw,15px);padding:7px 13px;}
  .hint-float {font-size:clamp(12px,1vw,15px);bottom:54px;padding:9px 14px;}
  .playfield .riot-banner {top:70px!important;left:22px;right:22px;max-height:none;font-size:clamp(16px,1.2vw,21px);padding:9px 13px;}
  .statusbar {
    width:100%;min-height:69px;
    padding:8px 20px;
    justify-content:center;
    gap:clamp(16px,3.7vw,70px);
  }
  .status-item {flex:0 1 205px;}
  .status-item span {font-size:clamp(12px,.9vw,15px);}
  .status-item b {font-size:clamp(25px,1.7vw,33px);}
  .status-small {flex:0 1 200px;font-size:clamp(13px,1.05vw,18px);}
  .status-divider {height:38px;}
  .dialog-overlay:not(.is-end-still):not(.is-intro-command) {inset:0 0 69px;padding:0 24px 14px;}
  .dialog-overlay:not(.is-end-still):not(.is-intro-command) .dialog-card {
    width:min(900px,90%);
    margin:0 auto;
    min-height:158px;
    height:clamp(158px,23dvh,210px);
    max-height:33dvh;
    padding:16px 24px;
  }
  .dialog-overlay:not(.is-end-still):not(.is-intro-command) .dialog-text {font-size:clamp(22px,1.9vw,29px);line-height:1.45;}
  .dialog-overlay:not(.is-end-still):not(.is-intro-command) .dialog-meta {font-size:14px;}
  .dialog-overlay.bystander-mode .bubble-tap-hint{bottom:24px;}
  .panel-overlay .modal-card{width:min(92vw,820px);max-width:820px;}
  #inspectPanel .compare-card {max-width:720px;}
  #evidencePanel .evidence-card {max-width:780px;}
  #choicePanel .choice-card,#sparePanel .spare-card {max-width:700px;}
  #redactionPanel .redaction-card {max-width:880px;}
  #endingPanel .ending-card {max-width:850px;}
  #gameoverPanel .gameover-card {max-width:650px;}
  .end-scene:not(.is-ending-still) .end-scene-content {max-width:min(850px,86vw);}
  .end-scene:not(.is-ending-still) .end-scene-title {max-width:min(1100px,90vw);}
  #dialogOverlay.is-intro-command .dialog-card{max-width:1000px;}
  /* PC-only polish: use the width for gameplay, never stretch the native pixels. */
  .topbar{grid-template-columns:minmax(278px,25%) minmax(0,1fr);gap:10px;}
  .agency-row{min-width:0;min-height:0;gap:7px;padding:6px 8px;}
  .agency-title{min-width:0;font-size:clamp(15px,1.32vw,20px);white-space:normal;}
  .agency-sub{display:block;white-space:nowrap;margin-top:4px;font-size:clamp(10px,.86vw,13px);}
  .wanted-strip{grid-template-columns:clamp(98px,8.8vw,138px) minmax(0,1fr) clamp(108px,10.7vw,146px);}
  .wanted-info{min-width:0;padding:8px clamp(10px,1.1vw,18px);gap:5px;}
  .wanted-name{font-size:clamp(25px,2.4vw,34px);}
  .wanted-label{font-size:clamp(12px,.97vw,16px);font-variant-numeric:tabular-nums;}
  .wanted-hint{font-size:clamp(13px,1.07vw,17px);}
  .wanted-crime{font-size:clamp(12px,1vw,16px);}
  .time-block{font-variant-numeric:tabular-nums;}
  .time-block strong{font-size:clamp(27px,2.65vw,38px);font-variant-numeric:tabular-nums;}
  .statusbar{gap:clamp(13px,2vw,32px);padding-inline:clamp(14px,2.4vw,35px);}
  .status-item{flex:0 1 172px;}
  .status-small{flex:0 1 170px;}
  .dialog-overlay:not(.is-end-still):not(.is-intro-command) .dialog-card{
    width:min(790px,76vw);min-height:0;height:clamp(146px,calc(19dvh + 10px),198px);padding:14px 23px;
  }
  .dialog-overlay:not(.is-end-still):not(.is-intro-command) .dialog-text{
    font-size:clamp(21px,1.8vw,27px);
  }
  #inspectPanel .compare-card{max-width:min(850px,88vw);gap:10px;}
  #inspectPanel .compare-grid{max-height:min(46dvh,390px);gap:14px;}
  #inspectPanel .compare-box{min-height:0;padding:9px 12px 6px;}
  #inspectPanel .compare-box canvas{height:min(31dvh,280px);max-height:min(31dvh,280px);max-width:100%;}
  #inspectPanel .inspect-selection{margin-block:1px;}
  #redactionPanel .redaction-card{width:min(94vw,1050px);max-width:1050px;}
  #redactionPanel .redaction-scroll{min-height:0;}
  #endingPanel .ending-card{max-width:min(92vw,1040px);}
  #endingPanel .end-image-btn{max-height:min(49dvh,475px);}
  #endingPanel .ending-quote{line-height:1.4;}
  .panel-overlay .primary-btn:hover:not(:disabled),.panel-overlay .secondary-btn:hover:not(:disabled),
  .full-overlay .primary-btn:hover:not(:disabled),.full-overlay .secondary-btn:hover:not(:disabled),
  .close-btn:hover,.icon-btn:hover,.wanted-photo:hover,#recordBtn:hover{
    filter:brightness(1.08);border-color:#f1d7a2;
  }
  .panel-overlay .primary-btn:focus-visible,.panel-overlay .secondary-btn:focus-visible,
  .full-overlay button:focus-visible{outline:3px solid #f6d581;outline-offset:3px;}
  /* Keep the original vertical poster intact: only its frame may shrink.
     Crucially, the search button lives OUTSIDE its artwork area. */
  .wanted-detail-body.poster-art-active{
    display:flex!important;flex-direction:column!important;align-items:center!important;
    overflow:hidden!important;gap:8px!important;
    padding:9px 12px 12px!important;
  }
  .wanted-detail-body.poster-art-active .wanted-poster-art{
    flex:1 1 0!important;height:0;min-height:0;max-height:none;
    width:100%;overflow:hidden;align-items:center;justify-content:center;
  }
  .wanted-detail-body.poster-art-active .wanted-poster-art img{
    display:block;width:auto!important;height:100%!important;max-height:100%!important;
    max-width:100%!important;object-fit:contain!important;image-rendering:auto;
  }
  .wanted-detail-body.poster-art-active > .primary-btn{
    flex:0 0 auto!important;position:relative;z-index:1;min-height:46px;
    width:min(100%,430px);margin:0!important;
  }
  /* Short notebook windows must prioritize the city rather than thick chrome. */
  @media(max-height:720px){
    .app{height:calc(100dvh - 16px);margin:8px auto;}
    .topbar{min-height:91px;gap:8px;padding:5px 10px;grid-template-columns:minmax(278px,25%) minmax(0,1fr);}
    .agency-row{min-height:0;height:100%;padding:4px 6px;}
    .agency-mark{width:36px;height:36px;min-width:36px;}
    .agency-title{font-size:15px;}
    .agency-sub{font-size:10px;}
    .agency-row .icon-btn{height:40px;width:40px;min-width:40px;}
    .wanted-strip{min-height:79px;grid-template-columns:76px minmax(0,1fr) 100px;}
    .wanted-info{gap:2px;padding:4px 10px;}
    .wanted-name{font-size:25px;line-height:1.05;}
    .wanted-label{font-size:11px;}
    .wanted-hint,.wanted-crime{font-size:12px;line-height:1.2;}
    .wanted-hint-tap{font-size:10px;}
    .time-block{gap:4px;padding:3px 5px;}
    .time-block strong{font-size:27px;padding:5px 0;}
    .time-block span{font-size:11px;}
    .statusbar{min-height:52px;padding-block:4px;}
    .status-divider{height:27px;}
    .status-item b{font-size:23px;}
    .dialog-overlay:not(.is-end-still):not(.is-intro-command){inset:0 0 52px;padding-bottom:7px;}
    .dialog-overlay:not(.is-end-still):not(.is-intro-command) .dialog-card{
      width:min(720px,72vw);height:134px;max-height:30dvh;padding:9px 15px;
    }
    .dialog-overlay:not(.is-end-still):not(.is-intro-command) .dialog-text{font-size:20px;line-height:1.32;}
    .playfield .riot-banner{top:42px!important;font-size:15px;}
    .camera-top{top:10px;}
    .camera-bottom{bottom:9px;}
    .hint-float{bottom:41px;}
    #inspectPanel .compare-grid{max-height:41dvh;}
    #inspectPanel .compare-box canvas{height:min(28dvh,195px);max-height:min(28dvh,195px);}
    #endingPanel .ending-card{gap:6px;padding:10px;}
    #endingPanel .end-image-btn{max-height:38dvh;min-height:105px;}
  }

}
/* Keep modest landscape sizes in the existing responsive layout, including phones. */
