/* Physical workstation chrome and unframed game controls. Room geometry,
   notebook paper and portrait scales remain owned by their existing styles. */
.pc-screen .pc-title{height:44px;gap:6px;padding:0 4px 0 8px;font-size:12px}
.pc-screen .pc-window-control{width:44px;height:44px;min-width:44px;min-height:44px;flex-shrink:0;display:grid;place-items:center;border:0!important;background:transparent;padding:0!important}
.pc-close-mark{position:relative;display:block;width:18px;height:18px;pointer-events:none}
.pc-close-mark::before,.pc-close-mark::after{content:"";position:absolute;left:8px;top:0;width:2px;height:18px;background:#f4f3e8;transform:rotate(45deg)}
.pc-close-mark::after{transform:rotate(-45deg)}
.pc-screen .pc-window-control:hover{background:#a55648;color:#fff}
.pc-screen .pc-window-control:active{background:#713d36}
.pc-screen button{touch-action:manipulation}
.pc-screen button:focus-visible,.pc-screen input:focus-visible{outline:2px solid #284a65;outline-offset:-3px}
.pc-screen .pc-title button:focus-visible,.pc-screen .pc-shortcut:focus-visible,.pc-screen .pc-hint-button:focus-visible{outline-color:#f5deb2}
.pc-screen .pc-status{font-size:10px}
.pc-screen .pc-taskbar{font-size:10px}
.pc-screen .pc-brand{color:#32495b;flex-shrink:0}
.pc-screen .pc-content{overscroll-behavior:contain;scroll-padding:8px;scrollbar-color:#768887 #e1e4dc}
.pc-screen .pc-file-row:disabled{opacity:1;color:#766c60}
.pc-screen .pc-file-tools>span{min-width:0;overflow-wrap:anywhere}
.pc-screen .pc-tree button{line-height:1.5}
.pc-screen .pc-login-error{line-height:1.6;overflow-wrap:anywhere}
.pc-screen .pc-shortcut{line-height:1.45}

#gameMenuButton{width:44px;height:44px;min-width:44px;min-height:44px;border:0;border-radius:50%;background:radial-gradient(circle,#101722ad,transparent 72%)}
#gameMenuButton:focus-visible{outline:2px solid #e5cfa7;outline-offset:0}
.game-header nav{min-width:176px;max-width:calc(100vw - 32px);padding-left:16px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a39374 transparent}
.game-header nav button{min-height:44px;font-size:15px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;touch-action:manipulation}
.game-header nav button:focus-visible{outline:0;color:#f0d4a0;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:5px}
.choices .choice{min-width:44px;min-height:44px;line-height:1.6;white-space:normal;overflow-wrap:anywhere;touch-action:manipulation;scroll-margin-block:8px}
.choices .choice:focus-visible{outline:0;color:#ffe3b6;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px;background:linear-gradient(90deg,#4b4d52dc,transparent)}
.dialogue-shade .dialogue-next{min-width:44px;min-height:44px;touch-action:manipulation}

@media(max-width:600px), (max-height:500px) and (orientation:landscape){
  /* The approved monitor is still 81:48. One real close action replaces the
     old two tiny equivalent controls; the file/document area alone scrolls. */
  .pc-screen{font-size:12px}
  .pc-screen .pc-content{overflow:auto}
  .pc-screen .pc-address{font-size:11px;line-height:1.5;min-height:44px;height:auto;gap:4px;flex-shrink:0}
  .pc-screen .pc-address>span{min-width:0;overflow-wrap:anywhere}
  .pc-screen .pc-address button{min-width:44px;min-height:44px;flex-shrink:0}
  .pc-screen .pc-explorer{flex-direction:column;min-height:154px;flex-shrink:0}
  .pc-screen .pc-tree{width:100%;min-width:0;flex-direction:row;flex-wrap:wrap;gap:0;padding:4px;border-right:0;border-bottom:1px solid #a8b1aa;overflow:visible}
  .pc-screen .pc-tree button{min-width:44px;min-height:44px;flex:1 1 88px;font-size:12px!important;white-space:normal;padding:6px!important}
  .pc-screen .pc-file-list{flex:none;overflow:visible}
  .pc-screen .pc-file-head{height:28px;font-size:11px;grid-template-columns:minmax(0,1fr) 88px 30px}
  .pc-screen .pc-file-row{min-height:48px!important;font-size:12px;line-height:1.6;grid-template-columns:minmax(0,1fr) 88px 30px;padding:8px 6px!important}
  .pc-screen .pc-file-row>.pc-file-name{align-items:flex-start;white-space:normal;overflow:visible}
  .pc-screen .pc-file-name>span:last-child{min-width:0;white-space:normal;overflow-wrap:anywhere}
  .pc-screen .pc-file-name .pc-symbol{margin-top:4px}
  .pc-screen .pc-file-date,.pc-screen .pc-file-type{font-size:11px}
  .pc-screen .pc-file-tools{font-size:12px;min-height:44px;gap:8px}
  .pc-screen .pc-file-tools button{min-width:44px;min-height:44px;flex-shrink:0}
  .pc-screen .pc-document{flex:none;font-size:13px;line-height:1.75;padding:10px;white-space:pre-wrap;overflow-wrap:anywhere}
  .pc-screen .pc-document-back{min-width:44px;min-height:44px;font-size:12px!important;flex-shrink:0}
  .pc-screen .pc-linked-file,.pc-screen .pc-record-source button{min-width:44px;min-height:44px;font-size:12px;white-space:normal}
  .pc-screen .pc-record-info{font-size:12px;line-height:1.65;padding:8px;grid-template-columns:1fr;gap:4px}
  .pc-screen .pc-record-info strong{font-size:12px;overflow-wrap:anywhere}
  .pc-screen .pc-trace{min-height:95px;flex-shrink:0}
  .pc-screen .pc-trace span{font-size:10px}
  .pc-screen .pc-record-source{font-size:11px;line-height:1.6;flex-wrap:wrap}
  .pc-screen .pc-login{padding:12px;overflow:auto}
  .pc-screen .pc-login h3{font-size:15px}
  .pc-screen .pc-account{font-size:11px;line-height:1.5}
  .pc-screen .pc-login-form{font-size:12px;max-width:100%;grid-template-columns:auto minmax(72px,110px) 44px}
  .pc-screen .pc-login-error{font-size:12px}
  .pc-screen .pc-hint-button{font-size:12px!important;min-height:44px}
  .pc-screen .pc-password-hint{font-size:12px;line-height:1.6}
  .pc-screen .pc-shortcut{min-width:80px;min-height:44px;font-size:12px}
  .pc-screen .pc-desktop{gap:6px;overflow-y:auto}
  .pc-screen .pc-workstation{font-size:10px}
  .game-header{top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));left:max(8px,env(safe-area-inset-left))}
  .game-header nav{top:52px;max-height:max(44px,calc(100svh - 76px - env(safe-area-inset-top) - env(safe-area-inset-top) - env(safe-area-inset-bottom)));overflow-y:auto}
}

@media(max-width:640px) and (orientation:portrait), (max-height:500px) and (orientation:landscape){
  /* Existing compact dialogue rows keep portraits, choices and spoken words
     separate. A flex column bounds the text after speaker and next target. */
  .dialogue-shade{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
  .dialogue-shade .choices{max-width:100%;overflow-x:hidden;overflow-y:auto;scroll-padding-block:6px;gap:4px}
  .dialogue-shade .choice{min-height:44px;text-align:left;font-size:15px}
  .dialogue-shade .dialogue-box{display:flex;flex-direction:column;overflow:hidden}
  .dialogue-shade .speaker{flex-shrink:0;overflow-wrap:anywhere}
  .dialogue-shade .dialogue-text{flex:0 1 auto;min-height:0;overflow-y:auto;overflow-wrap:anywhere;scroll-padding-block:4px;-webkit-overflow-scrolling:touch}
}
@media(max-height:500px) and (orientation:landscape){
  .dialogue-shade .choice{font-size:14px}
  .dialogue-shade .dialogue-box{padding-bottom:max(48px,calc(env(safe-area-inset-bottom) + 44px))}
}
@media(max-height:280px) and (orientation:landscape){
  .pc-screen .pc-status{display:none}
}
@media(prefers-reduced-motion:reduce){
  .pc-screen *,.game-header nav button,.choices .choice,.dialogue-shade .dialogue-next{scroll-behavior:auto;transition:none!important;animation:none!important}
}
.direction-reduced-motion .pc-screen *,.direction-reduced-motion .game-header nav button,.direction-reduced-motion .choices .choice,.direction-reduced-motion .dialogue-shade .dialogue-next{scroll-behavior:auto;transition:none!important;animation:none!important}

.loading.scene-loading{z-index:90;background:#111820;gap:18px;touch-action:manipulation}
.loading.scene-loading div{color:#c7c9c4;font-size:14px;line-height:1.6}
.scene-retry{color:#ede7d9;font:inherit;min-height:44px;min-width:128px;padding:10px 18px;justify-self:center;background:none;border:0;text-decoration:underline;text-underline-offset:5px;cursor:pointer}
.scene-retry:focus-visible{outline:2px solid #c5b68e;outline-offset:4px}
