/* Read the actual app at phone width, with native swipe and vertical scrolling. */
#tend-screen-dialog{width:min(680px,calc(100% - 24px));height:calc(100dvh - 32px);max-height:none;padding:0;border:1px solid #c5d3b7;border-radius:20px;overflow:hidden;background:#f8f9f1;color:#294735;box-shadow:0 24px 90px #17382d50}
#tend-screen-dialog[open]{display:grid;grid-template-rows:auto auto auto minmax(0,1fr)}
#tend-screen-dialog .tend-viewer-bar{position:relative;padding:14px 18px;gap:12px;background:#f8f9f1;border-bottom:1px solid #d3ddc6;z-index:2}
#tend-screen-dialog .tend-viewer-bar h2{font:600 19px/1.25 var(--sans);letter-spacing:-.3px;margin:0}
#tend-screen-dialog .tend-viewer-bar p{font:400 11px/1.5 var(--sans);color:#718065;margin:4px 0 0}
#tend-screen-dialog .tend-viewer-bar .tend-viewer-back{display:flex;gap:8px;align-items:center;justify-content:center;width:auto;height:auto;min-height:44px;flex:none;padding:10px 13px;border-radius:24px;border:1px solid #c6d4b9;background:#edf3e5;color:#3d5e35;font:500 13px/1.3 var(--sans);white-space:nowrap}
.tend-viewer-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin:14px 18px 0;padding:4px;border-radius:28px;border:1px solid #d0dbc3;background:#e8edde}
.tend-viewer-tabs button{min-height:44px;background:none;border:1px solid transparent;border-radius:24px;padding:10px;font:500 15px/1.3 var(--sans);color:#607553;cursor:pointer}
.tend-viewer-tabs button[aria-pressed='true']{background:#fffef8;border-color:#d2dcc6;color:#2e513d;box-shadow:0 2px 6px #2947350a}
.tend-viewer-hint{font:400 12px/1.4 var(--sans);color:#738367;margin:10px 18px 12px}
.tend-viewer-rail{position:relative;display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;min-height:0;-webkit-overflow-scrolling:touch;background:#e9eedf}
.tend-viewer-rail::-webkit-scrollbar{display:none}
.tend-viewer-slide{position:relative;flex:0 0 100%;width:100%;min-width:0;height:100%;overflow-y:auto;overflow-x:hidden;scroll-snap-align:start;scroll-snap-stop:always;box-sizing:border-box;padding:14px 18px 24px;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
#tend-screen-dialog .tend-viewer-slide img{display:block;width:100%;height:auto;max-width:480px;max-height:none;margin:0 auto;object-fit:contain;border-radius:18px;border:1px solid #d3ddc7;box-shadow:0 4px 18px #263f3310;box-sizing:border-box;user-select:none;-webkit-user-drag:none}
.tend-viewer-caption{max-width:480px;margin:18px auto 0;padding:0 4px}
.tend-viewer-caption h3{font:600 20px/1.3 var(--sans);letter-spacing:-.4px;margin:0 0 8px}
.tend-viewer-caption p{font:400 15px/1.6 var(--sans);margin:0;color:#607454}
#tend-screen-dialog button:focus-visible,.tend-viewer-rail:focus-visible,.tend-viewer-slide:focus-visible{outline:3px solid #648853;outline-offset:-3px}
@media(max-width:760px),(max-width:1000px) and (max-height:480px){
 #tend-screen-dialog{inset:0;margin:0;width:100%;max-width:none;height:100dvh;max-height:100dvh;border:0;border-radius:0;box-shadow:none;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);box-sizing:border-box}
 #tend-screen-dialog .tend-viewer-bar{padding:12px 14px;gap:8px}
 #tend-screen-dialog .tend-viewer-bar h2{font-size:17px}
 #tend-screen-dialog .tend-viewer-bar p{font-size:10px;max-width:20ch}
 #tend-screen-dialog .tend-viewer-bar .tend-viewer-back{font-size:12px;padding:10px 12px}
 .tend-viewer-tabs{margin:10px 12px 0}
 .tend-viewer-hint{margin:9px 16px 10px;font-size:11px}
 .tend-viewer-slide{padding:12px 12px 24px}
 #tend-screen-dialog .tend-viewer-slide img{max-width:480px;border-radius:14px}
}
@media(prefers-reduced-motion:reduce){.tend-viewer-rail{scroll-behavior:auto}}
