/* Only mobile viewports use the supplied portrait PNGs. */
@media(max-width:640px),(max-width:950px) and (max-height:500px){
  .modal.illustrated-modal.mobile-art-modal{width:min(98vw,480px);max-height:94dvh;overflow:visible}
  .modal.mobile-art-modal .modal-shell{max-height:92dvh;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;touch-action:pan-y;-webkit-overflow-scrolling:touch}
  .modal.mobile-art-modal .modal-shell::-webkit-scrollbar{display:none}
  .mobile-image-panel{position:relative;isolation:isolate;width:100%;aspect-ratio:941/1672;color:#e9f5ff}
  .mobile-panel-art{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;user-select:none;z-index:-1}
  .modal.mobile-art-modal #modal-close{position:absolute;float:none;left:auto;right:auto;bottom:auto;width:11.5cqw;height:11.5cqw;min-width:44px;min-height:44px;top:0;margin:0;padding:0;transform:translate(-50%,-50%);background:transparent;border:0;box-shadow:none;z-index:30}
  .modal[data-mobile-panel=profile] #modal-close{left:86.8%;top:15.1cqw}
  .modal[data-mobile-panel=author] #modal-close{left:78.1%;top:11.9cqw}
  .modal.mobile-art-modal #modal-close svg{opacity:0}
  .modal.mobile-art-modal.mobile-panel-scrolled #modal-close{position:fixed;left:auto;right:10px;top:8px;transform:none;width:44px;height:44px;border:1px solid #b9ddf2;background:#071c2ef5;box-shadow:0 2px 12px #0008}
  .modal.mobile-art-modal.mobile-panel-scrolled #modal-close svg{opacity:1}
  .mobile-profile-name{position:absolute;left:53.1%;top:13.5%;width:25.8%;height:2.6%;display:flex;align-items:center;justify-content:center;margin:0;padding:0 2px;background:#030e19;color:#edf7ff;font:400 clamp(11px,3.55cqw,19px)/1.1 Georgia,serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-profile-edit{position:absolute;left:81.4%;top:13.1%;width:9.1%;height:4.6%;min-width:0;min-height:32px;padding:0;background:none;border:0;border-radius:50%}
  .mobile-profile-edit:hover{background:#a4caff16}
  .mobile-user-photo{position:absolute;left:11.45%;top:6.9%;width:36.75%;height:20.68%;overflow:hidden;border-radius:50%;border:1px solid #b4ddf2}
  .mobile-user-photo img,.mobile-author-photo img{display:block;width:100%;height:100%;object-fit:cover;background:#061725}
  .mobile-profile-filter{position:absolute;left:51.1%;top:8.5%;width:27.7%;height:3.0%;min-height:25px;display:block}
  .mobile-profile-filter select{display:block;width:100%;height:100%;padding:2px 4px;font:400 clamp(10px,2.8cqw,14px)/1.2 system-ui;background:#061a2ae8;color:#dceefb;border:1px solid #9ac7e564;border-radius:5px;text-overflow:ellipsis}
  .mobile-profile-counts{display:contents}
  .mobile-profile-counts button{position:absolute;top:19.2%;width:12.7%;height:5.3%;min-width:0;min-height:0;padding:0;border:0;background:none;border-radius:4px;color:#eff8ff;transform:none}
  .mobile-profile-counts button:nth-child(1){left:49.6%}.mobile-profile-counts button:nth-child(2){left:63.2%}.mobile-profile-counts button:nth-child(3){left:76.9%}
  .mobile-profile-counts b{position:absolute;left:45%;right:7%;top:29%;height:43%;display:flex;align-items:center;justify-content:center;font:400 clamp(10px,3.2cqw,17px)/1 Georgia,serif;background:#03111d;font-weight:400}
  .mobile-profile-pages{position:absolute;left:14%;top:26.5%;width:73.4%;height:3.3%;display:flex;justify-content:flex-end;align-items:center}
  .mobile-panel-pager{display:flex;gap:5px;align-items:center;justify-content:center;color:#e1f2ff;background:#081d2be8;border-radius:8px;padding:1px 4px;font-size:11px;white-space:nowrap}
  .mobile-panel-pager button{width:27px;height:27px;min-height:0;padding:0;border:1px solid #9dc7e16b;border-radius:50%;background:#0a2338;color:#edf7ff;font:400 24px/1 Georgia,serif}
  .mobile-panel-pager span{min-width:30px;text-align:center}.mobile-panel-pager button:disabled{opacity:.35}
  .mobile-profile-albums,.mobile-author-albums{display:contents}
  .mobile-profile-slot,.mobile-author-slot{position:absolute;min-width:0;min-height:0;padding:0;border:0;border-radius:3px;background:none;transform:none;overflow:hidden;color:#edf7ff}
  button.mobile-profile-slot:hover,button.mobile-author-slot:hover,button.mobile-profile-slot:active,button.mobile-author-slot:active{background:none;border:0;transform:none;filter:brightness(1.1)}
  .mobile-filled-slot{display:flex;align-items:center;justify-content:center;gap:3%;padding:4.4% 3%;background:#25445d}
  .mobile-user-panel button.mobile-filled-slot:hover,.mobile-user-panel button.mobile-filled-slot:active{background:#25445d}
  .mobile-filled-slot>img{width:40%;height:100%;min-width:0;object-fit:contain;filter:drop-shadow(2px 3px 2px #0007)}
  .mobile-filled-slot>span{display:flex;flex:1;min-width:0;max-width:57%;flex-direction:column;text-align:left;gap:5px}
  .mobile-filled-slot strong{font:400 clamp(10px,3.25cqw,17px)/1.15 Georgia,serif;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .mobile-filled-slot small{font-size:clamp(9px,2.45cqw,12px);line-height:1.3;color:#c3dbee}
  .mobile-empty-note{position:absolute;inset:18% 5%;display:grid;place-items:center;text-align:center;background:#15334be8;border-radius:4px;font-size:clamp(10px,3cqw,14px);line-height:1.4}
  .mobile-profile-settings{position:absolute;left:14%;top:31.4%;width:72.6%;height:62.2%;padding:14px 12px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;background:#0b2236fa;border:1px solid #9ac9e9;border-radius:7px;color:#deeffc}
  .mobile-profile-settings h3{font:400 20px/1.25 Georgia,serif;margin:0 0 14px}
  .mobile-profile-form{display:grid;gap:14px}.mobile-profile-settings label{display:grid;gap:6px;font-size:12px;color:#c4dcec}
  .mobile-profile-settings input{font-size:13px;padding:9px;width:100%;background:#061725;border-color:#8bb9d65e;color:#e4f2fb}
  .mobile-profile-settings input[type=file]{font-size:10px}
  .mobile-form-actions{display:flex;flex-wrap:wrap;gap:8px}.mobile-profile-settings button{font-size:11px;min-height:34px;padding:8px 10px}
  .mobile-profile-settings p{font-size:11px;line-height:1.6;margin:16px 0}.mobile-profile-settings>button{margin:0 0 14px;width:100%}
  .mobile-author-photo{position:absolute;left:30.7%;top:9%;width:38.2%;height:21.5%;overflow:hidden;border:1px solid #b6d8ed;border-radius:50%}
  .mobile-author-name{position:absolute;left:29.3%;top:31%;width:41.4%;height:2.6%;display:flex;align-items:center;justify-content:center;margin:0;padding:0 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#04111cfb;color:#f0f7fc;font:400 clamp(14px,4.4cqw,24px)/1.05 Georgia,serif}
  .mobile-author-role{position:absolute;left:31.1%;top:34.3%;width:38.4%;height:1.8%;margin:0;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#04111cfb;color:#aacfe8;font-size:clamp(10px,2.85cqw,14px);line-height:1.15}
  .mobile-author-bio{position:absolute;left:24.6%;top:41.6%;width:51%;height:7.6%;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#7ca1bd transparent;padding:2px 3px;background:#102536d9;color:#e2eff9}
  .mobile-author-bio p{font-size:clamp(11px,3.15cqw,14px);line-height:1.6;white-space:pre-line;margin:0 0 9px}.mobile-author-bio .mobile-author-journey{font-size:clamp(10px,2.85cqw,13px);color:#bed7e9}
  .mobile-author-pages{position:absolute;left:25.5%;top:51.2%;width:48.5%;height:3.4%;display:flex;align-items:center;justify-content:center}
  .mobile-author-pages>.mobile-panel-pager{width:100%;padding:3px}
  .mobile-author-cover{position:absolute;left:4%;top:2%;width:92%;height:82%;display:block}
  .mobile-author-cover img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(2px 3px 2px #0007)}
  .mobile-author-label{position:absolute;left:4%;bottom:1.6%;width:92%;height:8.8%;padding:0 2px;display:flex;align-items:center;justify-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:500 clamp(9px,2.7cqw,14px)/1 Georgia,serif;color:#0a2030}
  .mobile-art-modal .download-panel{position:absolute;left:15%;top:31%;width:70%;max-width:none;z-index:35;padding:12px;font-size:12px;background:#0c2539}
  .mobile-art-modal .download-panel a{font-size:11px;overflow-wrap:anywhere}
}
