/* Phone presentation shares the same DOM, engine and scenario state as desktop. */
.mobile-dock,.contact-jumps{display:none}
@media(max-width:800px), (max-width:1000px) and (max-height:500px){
  .game{height:100dvh;min-height:0;padding:0 max(10px,env(safe-area-inset-right)) 0 max(10px,env(safe-area-inset-left));overflow:hidden}
  .game .topbar{height:auto;min-height:64px;padding-top:env(safe-area-inset-top);gap:8px}
  .game .brand-icon{display:none}
  .game .brand{font-size:16px;white-space:normal;line-height:1.2;min-width:0}
  .game .brand small{font-size:6px;letter-spacing:1px;margin-top:4px}
  .game .top-actions{gap:4px;flex-shrink:0}
  .game .timer{grid-template-columns:auto;margin-right:3px;column-gap:0;text-align:center;min-width:45px}
  .game .timer svg{display:none}
  .game .timer strong{font-size:17px}
  .game .icon-button,.game .help-button{width:48px;height:48px;flex-shrink:0;border-radius:10px}
  .game .shift-strip{min-height:62px;padding:7px 2px;gap:8px;align-items:center}
  .game .shift-strip>div:first-child{min-width:0}
  .game .shift-strip .eyebrow{font-size:9px;letter-spacing:1px;margin:0 0 2px}
  .game .shift-strip strong{font-size:17px;display:block;line-height:1.15;overflow-wrap:anywhere}
  .game .strip-right{flex-shrink:0;gap:0}
  .game .strip-right .pill{font-size:10px;padding:5px 7px}
  .game .strip-right .text-button{font-size:12px;min-height:44px;padding:4px}
  .game .workspace{display:block;flex:1;min-height:0;overflow:hidden}
  .game .monitor{height:100%;min-height:0;width:100%;box-shadow:none;border-radius:9px}
  .game[data-mobile-workspace=contact] .tools-monitor,
  .game[data-mobile-workspace=tools] .contact-monitor{display:none}
  .game .monitor-cap{height:26px;font-size:9px}
  .game .tabs{padding:0 6px;gap:4px}
  .game .tab{min-height:48px;font-size:14px;padding:8px;flex:1;gap:7px}
  .game .tab svg{width:18px;height:18px}
  .game .tools-monitor .tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:4px 6px;gap:4px}
  .game .tools-monitor .tab{flex-direction:row;font-size:13px;padding:6px 4px;min-height:48px;border-radius:5px}
  .game .tools-monitor .tab.selected{background:#dce6d4}
  .game .screen-body{overscroll-behavior-y:contain;scroll-padding:16px;-webkit-overflow-scrolling:touch}
  /* Override the desktop overflow lock: native swipes must scroll this panel. */
  .game .contact-monitor .screen-body{overflow-y:auto;overflow-x:hidden;touch-action:pan-y pinch-zoom}
  .game #contact-body{display:block}
  .game .tool-body{padding:20px 16px}
  .game .tool-heading{margin-bottom:18px}
  .game .tool-heading h2{font-size:25px}
  .game .tool-heading>p:last-child:not(.eyebrow),.game .quiet{font-size:13px}
  .game .call-card{padding:14px 16px 10px;gap:10px}
  .game .call-card h2{font-size:23px}
  .game .call-card p:not(.eyebrow){font-size:12px}
  .game .avatar{width:44px;height:44px}
  .game .call-controls{padding:0 16px 12px;gap:8px}
  .game .call-controls button{min-height:48px;padding:10px 12px;font-size:13px;gap:7px}
  .game .call-controls>.quiet{display:none}
  .game .contact-jumps{display:flex;gap:8px;padding:4px 8px;background:#e9eedf;border-bottom:1px solid var(--line);flex-shrink:0}
  .game .contact-jumps button{flex:1;min-height:44px;font-size:13px;text-decoration:underline;text-underline-offset:3px;border-radius:5px}
  .game .transcript-label{font-size:10px;padding:12px 16px 4px}
  .game .transcript{overflow:visible;min-height:0;padding:10px 16px 4px;background:none}
  .game .bubble{margin-right:10px;padding:12px;margin-bottom:12px;overflow-wrap:anywhere}
  .game .bubble.agent{margin-left:10px}
  .game .bubble p{font-size:16px;line-height:1.55}
  .game .speaker{font-size:12px}
  .game .speaker small{font-size:10px}
  .game .replay{min-height:44px;padding:8px 0;font-size:12px}
  .game .replay svg{width:16px;height:16px}
  .game .reply-area{display:block;flex:none;min-height:0;max-height:none;padding:16px;scroll-margin-top:12px}
  .game .reply-title{align-items:flex-start;flex-direction:column;gap:3px}
  .game .reply-title strong{font-size:16px}
  .game .reply-title>span{font-size:12px}
  .game .choices{flex:none;max-height:none;overflow:visible;padding:2px 0}
  .game .choice{min-height:52px;padding:13px 12px;font-size:16px;gap:10px;margin-bottom:9px}
  .game .choice svg{flex-shrink:0}
  .game .transfer{min-height:52px;font-size:15px;padding:12px;margin-top:12px}
  .game .monitor-footer{display:none}
  .game .desk-footer{min-height:48px;gap:8px;justify-content:flex-end;font-size:12px}
  .game .desk-footer>span{display:none}
  .game .desk-footer>div{width:100%;justify-content:space-between;gap:8px}
  .game .desk-footer>div>span{display:inline;font-size:12px}
  .game .desk-footer button{font-size:12px;min-height:48px;padding:8px}
  .game .desk-footer [data-action=library]{display:none}
  .mobile-dock{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;flex-shrink:0;border-top:1px solid #b8c7af;background:#e7ebdc;padding:6px 0 max(6px,env(safe-area-inset-bottom))}
  .mobile-dock button{min-height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:13px;border:1px solid transparent;border-radius:7px;line-height:1.3}
  .mobile-dock button[aria-pressed=true]{background:var(--green);color:#fffef2;border-color:var(--green);font-weight:700}
  .mobile-dock button small{font-size:10px}
  .mobile-dock button svg{width:20px;height:20px}
  .game .text-button,.game .primary,.game .secondary,.game .mail-chip,.game .channel-notice button{min-height:48px;font-size:14px}
  .game .field-label{font-size:14px;line-height:1.4}
  .game .field-label>span{font-size:11px}
  .game input,.game select,.game textarea{font-size:16px;min-height:48px;padding:12px;scroll-margin:14px}
  .game textarea{max-height:none;min-height:120px}
  .game .form-row{gap:10px}
  .game .inbox-nav{display:flex;flex-wrap:wrap;padding:8px;gap:6px}
  .game .mail-chip{padding:10px;font-size:13px;border:1px solid var(--line)}
  .game .channel-notice{flex-wrap:wrap;font-size:13px;padding:10px 16px;gap:4px}
  .game .document{padding:18px;font-size:16px;overflow:visible}
  .game .message-heading,.game #contact-body>.tool-heading{padding:16px;margin:0}
  .game .message-heading p{font-size:12px}
  .game .record>div,.game .identity-card dl>div{flex-direction:column;gap:4px;font-size:14px;overflow-wrap:anywhere}
  .game dd{text-align:left;max-width:100%}
  .game .case-status{flex-wrap:wrap;font-size:12px}
  .game .case-checks>div,.game .timeline p,.game .note-card p{font-size:14px}
  .game .kb-article summary{min-height:60px;padding:16px}
  .game .kb-article strong{font-size:16px}
  .game .kb-article small{font-size:10px}
  .game .kb-article>p{font-size:16px;line-height:1.6}
  .game .agenda article{gap:12px;flex-wrap:wrap}
  .game .agenda strong{font-size:14px}
  .game .agenda small{font-size:12px;overflow-wrap:anywhere}
  .welcome{padding:max(20px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))}
  .welcome:has(.scenario-library) .welcome-grid{padding:28px 0;gap:24px}
  .welcome:has(.scenario-library) .intro h1{font-size:38px;letter-spacing:-1px}
  .welcome .office-card{display:none}
  .welcome .scenario-card{padding:16px}
  .welcome .scenario-card .primary,.welcome .text-button,.welcome .file-button{min-height:48px;font-size:14px}
  .welcome .channel-picker{gap:7px}
  .welcome .channel-picker label{min-height:48px;padding:10px 8px;font-size:14px;gap:6px}
  .welcome .channel-picker input{width:18px;height:18px;flex-shrink:0}
  .welcome .channel-picker legend{font-size:13px}
  .welcome .brief{gap:12px}
  .welcome .brief strong{font-size:17px}
  .welcome .brief p{font-size:14px}
  .welcome .brief small{font-size:12px}
  .welcome .file-button{display:inline-flex;align-items:center}
  .welcome .library-tools{gap:4px 20px}
  dialog{max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);width:calc(100% - 24px)}
  dialog .primary,dialog .secondary{min-height:48px;font-size:16px}
  dialog .modal-actions{flex-wrap:wrap;gap:12px}
  dialog .modal-actions>button{flex:1;min-width:130px}
  dialog .modal-pad,dialog .assessment-top,dialog .assessment-body{padding:22px}
  dialog .interruption{padding:24px 18px}
  dialog .interruption h2{font-size:27px}
  dialog .assessment-body blockquote,dialog .modal-pad>p:not(.eyebrow){font-size:16px}
  #toast{bottom:calc(130px + env(safe-area-inset-bottom));max-width:calc(100vw - 32px);font-size:14px;pointer-events:none}
}
@media(max-width:380px){
  .game .brand{font-size:14px}.game .brand small{display:none}
  .game .shift-strip strong{font-size:16px}
  .game .tools-monitor .tab{font-size:12px;gap:4px}
  .game .form-row{flex-direction:column;gap:0}
}
@media(max-width:1000px) and (max-height:500px){
  .game .topbar{min-height:48px}.game .shift-strip{min-height:44px;padding:0 2px}
  .game .shift-strip .eyebrow,.game .strip-right .pill,.game .brand small{display:none}
  .game .monitor-cap{display:none}.game .desk-footer{min-height:44px}
  .game .desk-footer button{min-height:44px}.mobile-dock{padding-top:3px}
  .mobile-dock button{min-height:48px;flex-direction:row;gap:7px}.mobile-dock button small{display:none}

}
/* Keep off-screen announcements from adding a document scrollbar below the app. */
.sr-only{top:0;left:0}

@media(min-width:600px) and (max-width:1000px) and (max-height:500px){
  .game .tools-monitor .tabs{grid-template-columns:repeat(6,minmax(0,1fr))}
  .game .tools-monitor .tab{font-size:12px;gap:4px}.game .tools-monitor .tab svg{display:none}
}
