/* Shared mobile corrections load after page-specific and workspace styles. */
#mobileActionsToggle { display:none; }
.mobile-entry-tools { display:none; }
#narrationDialog #narrationPanel { display:flex; flex-direction:column; align-items:stretch !important; gap:12px !important; padding:0 !important; border:0 !important; background:none !important; }
#narrationDialog #narrationPanel img { display:none; }
#narrationDialog #narrationPanel select { min-width:0 !important; max-width:none; width:100%; font-size:16px !important; padding:12px !important; }
.speech-feedback { flex-shrink:0; padding:0 12px; font-size:13px; color:var(--muted); }
.speech-feedback p { margin:6px 0; }
#speechPreview { color:var(--text); max-height:64px; overflow:auto; }
.play-send-status:empty { display:none; }
.play-log { min-height:0; overflow-wrap:anywhere; }
@media (max-width:1100px) {
  body:has(.play-shell) { height:var(--play-viewport-height,100dvh); overflow:hidden; }
  body:has(.play-shell) .shell { height:calc(var(--play-viewport-height,100dvh) - var(--appbar-height)); }
  .play-topbar { flex-wrap:nowrap; gap:8px; padding:8px 12px; }
  .play-topbar > div:first-child { min-width:0; flex:1; }
  .play-topbar h1 { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:15px; }
  .play-topbar .play-session-meta { display:none; }
  .play-topbar-right { width:auto; margin-left:auto; flex-wrap:nowrap; }
  .play-topbar-right a { display:none; }
  .play-topbar-right button { min-height:44px; }
  .play-view-switch { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; padding:4px 8px; }
  .play-view-switch button { min-height:44px; padding:8px 2px; font-size:14px; }
  .play-shell { grid-template-rows:minmax(0,1fr); }
  .play-main { overflow:hidden; border-right:0; }
  .play-log { padding:12px; gap:14px; overscroll-behavior:contain; }
  .msg { max-width:100%; font-size:16px; line-height:1.65; padding:12px 12px 54px; }
  .msg-actions { gap:6px; bottom:6px; left:10px; opacity:1; }
  .msg-action-btn { width:40px; height:40px; }
  .msg-action-btn img { width:17px; height:17px; }
  .play-companion { padding:7px 10px; max-height:32%; overflow:auto; }
  .play-scene-strip { gap:6px; }
  #sceneLocation { width:100%; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  #sceneMode,#openJourney,#openDice,#journeyQuickStatus { display:none; }
  #mobileActionsToggle { display:block; }
  .play-companion .play-quiet-button { min-height:40px; font-size:14px; }
  .play-companion:not(.actions-expanded) #nextActions,.play-companion:not(.actions-expanded) #pendingCheck { display:none; }
  .play-next-actions { flex-direction:column; overflow:visible; }
  .play-next-actions button { max-width:none; width:100%; min-height:44px; font-size:15px; border-radius:10px; }
  .play-check { font-size:14px; }
  .play-check p { max-height:none; }
  .play-send-status { font-size:12px; min-height:0; }
  .composer { margin-top:0; flex:0 0 auto; display:grid; grid-template-columns:minmax(0,1fr) 76px; gap:8px; padding:8px 10px max(10px,env(safe-area-inset-bottom)); }
  .composer textarea { box-sizing:border-box; width:100%; height:64px; min-height:56px; max-height:120px; font-size:16px; line-height:1.45; padding:10px; }
  .composer-actions { width:auto; min-width:0; gap:6px; }
  .composer-actions button { min-height:44px; padding:8px 6px; font-size:14px; }
  .play-dialog { width:calc(100vw - 16px); max-height:calc(var(--play-viewport-height,100dvh) - 24px); padding:16px; border-radius:14px; }
  .play-dialog-heading { position:sticky; top:-16px; background:#11222d; padding:12px 0; z-index:2; }
  .play-dialog button,.play-dialog select,.play-dialog input { min-height:44px; font-size:16px; }
  .play-dialog .play-dialog-heading button { flex:0 0 44px; }
  .play-dialog h2 { font-size:20px; }
  .play-dialog p { font-size:14px; }
  .play-recent-roll { flex-wrap:wrap; }
  .play-side { overflow-y:auto; overscroll-behavior:contain; }
  .play-side #charTabBody { flex:0 0 auto; overflow:visible; }
  #charTabBar { position:sticky; top:0; z-index:8; background:#10212d; display:flex !important; overflow-x:auto; scrollbar-width:thin; }
  #charTabBar .char-tab { flex:0 0 auto !important; min-width:84px !important; min-height:56px; padding:8px 12px !important; font-size:12px !important; }
  #charTabBody .char-ov-layout { grid-template-columns:minmax(0,1fr) !important; }
  #charTabBody .char-card { min-width:0; }
  #charTabBody button { min-height:40px; }
  #charTabBody input,#charTabBody select,#charTabBody textarea { max-width:100%; font-size:16px; }
  .play-stat-modal,.play-location-modal,.char-modal-card,.entity-create-modal { box-sizing:border-box; width:100%; min-width:0; max-height:calc(var(--play-viewport-height,100dvh) - 24px); overflow:auto; }
  .play-stat-overlay,.char-modal-backdrop,.entity-modal-overlay { padding:12px; }
  .play-location-hero { height:150px; }
  .play-stat-modal button,.char-modal-card button { min-height:44px; }
  .play-keyboard-open .play-topbar,.play-keyboard-open .mobile-appbar { display:none; }
  body.play-keyboard-open:has(.play-shell) .shell { height:var(--play-viewport-height,100dvh); }
  .play-keyboard-open .play-companion { max-height:72px; }
  .play-keyboard-open .play-companion #sceneLocation { display:none; }
}
@media(max-width:900px) {
  .ed-shell,.ed-shell.editing { display:block; height:auto; min-height:0; }
  .ed-main { padding:14px 0; overflow:visible; min-width:0; }
  .ed-sidebar,.editing .ed-sidebar { display:block; padding:16px 0; border-left:0; overflow:visible; }
  .ed-hero,.ed-hero.ed-hero--landscape { display:flex; flex-direction:column; gap:14px; }
  .ed-hero-content { width:100%; min-width:0; }
  .ed-image-card { width:min(240px,100%); align-self:center; }
  .ed-topbar { padding:10px 0; }
  .mobile-entry-tools { display:block; }
  .ed-topbar:not(.tools-open) .ed-topbar-right { display:none; }
  .ed-topbar-left .cat-pill,.ed-topbar-left .status-pill { display:none; }
  .ed-topbar .ed-topbar-right { width:100%; }
  .ed-hero .ed-profile-placeholder { height:80px; min-height:0; aspect-ratio:auto; }
  .ed-profile-frame { max-height:220px; }
  .ed-topbar-right { flex-wrap:wrap; }
  .ed-content,.ed-summary { font-size:16px; overflow-wrap:anywhere; }
  .ed-content table { display:block; overflow:auto; }
  .ed-content img { max-width:100%; }
  .ed-shell input,.ed-shell textarea,.ed-shell select { font-size:16px; max-width:100%; box-sizing:border-box; }
  .ed-shell button,.ed-topbar button,.ed-section-title { min-height:44px; }
  .char-ov-layout { grid-template-columns:minmax(0,1fr) !important; }
  .comp-main { padding:10px 0; overflow:visible; }
  .comp-search-row,.comp-topbar,.comp-top,.bulk-bar { flex-wrap:wrap; }
  .comp-top .comp-search { flex-basis:100%; width:100%; order:-1; }
  .comp-main input,.comp-main select,.comp-sidebar input { font-size:16px; min-height:44px; }
  .comp-main button,.comp-filter-toggle { min-height:44px; }
  .entry-actions .entry-menu-trigger { min-width:40px; }
  .entry-card-summary { font-size:14px !important; }
  .char-action-row { grid-template-columns:minmax(0,1fr) 54px 48px 68px; font-size:12px; }
  .char-action-row > * { min-width:0; overflow-wrap:anywhere; }
  .inv-item-row { grid-template-columns:32px minmax(0,1fr) auto auto auto; }
  .inv-create-grid,.char-sheet-showcase { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:1100px) and (max-height:600px) {
  body:has(.composer textarea:focus) .mobile-appbar,body:has(.composer textarea:focus) .play-topbar { display:none; }
  body:has(.composer textarea:focus) .shell { height:var(--play-viewport-height,100dvh); }
  body:has(.composer textarea:focus) #sceneLocation { display:none; }
}
