/* SPDX-License-Identifier: GPL-3.0-or-later */
#viewport { position:absolute; inset:0 0 56px; overflow:auto; scrollbar-color:#95aa7b #101510; }
#stage { position:relative; min-width:100%; min-height:100%; }
#canvas { position:absolute; max-width:none; max-height:none; image-rendering:auto; }
#viewport[data-pan=true] { touch-action:none; }
#viewport[data-pan=true] canvas { cursor:grab!important; }
#view-actions { position:absolute; bottom:0; left:0; right:0; min-height:56px; box-sizing:border-box; display:flex; align-items:center; justify-content:center; gap:6px; padding:6px; border-top:1px solid #c5d1b9; background:#eef1e6; }
#view-actions button { min-height:44px; min-width:44px; border:1px solid #b0bfa0; border-radius:8px; padding:8px 12px; background:#fbfcf5; color:#29402e; font:500 13px/1.3 system-ui,sans-serif; cursor:pointer; }
#view-actions button:focus-visible { outline:3px solid #52794a; outline-offset:2px; }
#view-actions button:hover { background:#e0e8d6; }
#view-actions button[aria-pressed=true] { background:#30543b; color:#fff; border-color:#30543b; }
#view-actions button:disabled { background:#e4e9de; color:#77806d; border-color:transparent; cursor:default; }
@media(max-width:350px) { #view-actions button { padding:8px; font-size:12px; } }

#view-actions select { height:44px; max-width:96px; border:1px solid #b0bfa0; border-radius:8px; background:#fbfcf5; color:#29402e; font:500 13px/1.3 system-ui,sans-serif; }
#view-actions .language-control { display:flex; align-items:center; gap:6px; margin:0; font-size:13px; }
@media(max-width:500px) { #view-actions .language-control { font-size:0; } #view-actions:has(select) { gap:4px; padding:4px; } #view-actions:has(select) button { padding:8px; font-size:12px; } #view-actions select { max-width:84px; font-size:12px; } }

#text-entry { position:absolute; z-index:5; bottom:calc(100% + 8px); left:50%; transform:translateX(-50%); width:min(440px,calc(100vw - 28px)); padding:14px; box-sizing:border-box; border:1px solid #b0bfa0; border-radius:12px; background:#fbfcf5; color:#29402e; box-shadow:0 8px 32px #0005; }
#text-entry label { margin:0; font-size:14px; } #text-entry input { box-sizing:border-box; width:100%; min-height:44px; margin:6px 0; background:white; color:#29402e; border:1px solid #b0bfa0; border-radius:8px; font:16px/1.3 system-ui,sans-serif; }
#text-entry p { margin:4px 0 10px; font-size:12px; line-height:1.4; } #text-entry div { display:flex; gap:6px; flex-wrap:wrap; } #text-entry output { font-size:13px; }
@media(max-width:500px) {
 #view-actions:has(#type-text) #zoom-out,#view-actions:has(#type-text) #zoom-in,#view-actions:has(select) #zoom-out,#view-actions:has(select) #zoom-in,#view-actions:has(select) #pan-view { font-size:0; min-width:44px; }
 #view-actions:has(#type-text) #zoom-out::after,#view-actions:has(select) #zoom-out::after { content:"−"; font-size:20px; }
 #view-actions:has(#type-text) #zoom-in::after,#view-actions:has(select) #zoom-in::after { content:"+"; font-size:20px; }
 #view-actions:has(select) #pan-view::after { content:"Pan"; font-size:12px; }
 #view-actions:has(#type-text) { gap:4px; padding:4px; }
 #view-actions:has(#type-text) button { padding:8px; font-size:12px; }
 #view-actions #text-entry button { font-size:13px; }
}
