/* The same standalone programs can run inside the photographic Monitor. */
html[data-monitor-embedded="true"],html[data-monitor-embedded="true"] body { width:100%; height:100%; min-height:0; margin:0; overflow:auto; }
html[data-monitor-embedded="true"] body { display:block; background:#c0c0c0; }
html[data-monitor-embedded="true"] .page-header,
html[data-monitor-embedded="true"] .desktop-shortcuts,
html[data-monitor-embedded="true"] .taskbar,
html[data-monitor-embedded="true"] .glass,
html[data-monitor-embedded="true"] .screen-glass { display:none!important; }
html[data-monitor-embedded="true"] .monitor { width:100%; height:100%; min-height:0; margin:0; aspect-ratio:auto; background:none; filter:none; }
html[data-monitor-embedded="true"] .desktop { position:relative; inset:auto; width:100%; height:100%; min-height:0; margin:0; padding:0; overflow:hidden; border-radius:0; box-shadow:none; background:#5b8ecc url('../../assets/bliss.jpg') center/cover; }

/* Keep both AIM windows visible with useful space for the buddy list and chat. */
html[data-monitor-embedded="true"] .workspace { position:absolute; inset:8px; width:auto; height:auto; display:grid; grid-template-columns:minmax(190px,32%) minmax(0,1fr); grid-template-rows:minmax(0,1fr); gap:10px; transform:none; }
html[data-monitor-embedded="true"] .buddy-window,
html[data-monitor-embedded="true"] .message-window { height:100%; min-height:0; }
html[data-monitor-embedded="true"] .signon { left:50%; top:50%; }

html[data-monitor-embedded="true"] .game-window { position:absolute; left:50%; top:50%; width:min(calc(100% - 24px),690px); max-height:calc(100% - 20px); transform:translate(-50%,-50%); }
html[data-monitor-embedded="true"] .game-window[data-level="beginner"] { width:min(calc(100% - 24px),300px); }
html[data-monitor-embedded="true"] .game-window[data-level="intermediate"] { width:min(calc(100% - 24px),440px); }
html[data-monitor-embedded="true"] .game-window[data-level="expert"] { width:min(calc(100% - 24px),690px); }
html[data-monitor-embedded="true"] .game-shell { max-height:calc(100% - 52px); overflow:auto; }
html[data-monitor-embedded="true"] .table { --card-width:clamp(34px,6vw,64px); overflow:auto; }
html[data-monitor-embedded="true"] body:has(#board) .game-window { overflow:auto; }
html[data-monitor-embedded="true"] body:has(#board) .game-window[data-level="beginner"] { width:max-content; max-width:calc(100% - 24px); }
html[data-monitor-embedded="true"] body:has(#board) .titlebar,
html[data-monitor-embedded="true"] body:has(#board) .menubar { height:26px; min-height:26px; }
html[data-monitor-embedded="true"] body:has(#board) .titlebar a { width:22px; height:22px; font-size:16px; }
html[data-monitor-embedded="true"] body:has(#board) .menubar button { min-height:22px; font-size:11px; }
html[data-monitor-embedded="true"] body:has(#board) .scorebar { height:39px; }
html[data-monitor-embedded="true"] body:has(#board) .scorebar > button { width:32px; height:32px; }
html[data-monitor-embedded="true"] body:has(#board) .board { min-width:calc(var(--columns) * 23px + 6px); grid-template-columns:repeat(var(--columns),23px); }
html[data-monitor-embedded="true"] body:has(#board) .cell { width:23px; height:23px; font-size:13px; }
html[data-monitor-embedded="true"] body:has(#table) .tableau-pile .card { top:calc(var(--card-offset) * .58); }

html[data-monitor-embedded="true"] body:has(.topbar) { background:#fff; }
html[data-monitor-embedded="true"] body:has(.topbar) main { width:100%; }
html[data-monitor-embedded="true"] .program { width:100%; height:100%; min-height:0; margin:0; border:0; box-shadow:none; }

@media(max-width:650px) {
  html[data-monitor-embedded="true"] .workspace { position:absolute; inset:6px; width:auto; height:auto; grid-template-columns:minmax(160px,34%) minmax(0,1fr); grid-template-rows:minmax(0,1fr); gap:6px; overflow:hidden; }
  html[data-monitor-embedded="true"] .buddy-window { height:100%; }
  html[data-monitor-embedded="true"] .message-window { height:100%; min-height:0; }
  html[data-monitor-embedded="true"] .buddy-brand { display:none; }
  html[data-monitor-embedded="true"] .buddy-actions { padding:3px; }
  html[data-monitor-embedded="true"] .buddy-actions button { font-size:9px; }
  html[data-monitor-embedded="true"] .buddy-actions button > span { margin:0; font-size:15px; }
  html[data-monitor-embedded="true"] .conversation-grid { grid-template-columns:38px 1fr; grid-template-rows:minmax(60px,1fr) 25px 65px; }
  html[data-monitor-embedded="true"] .avatar.large { width:32px; min-width:32px; height:36px; font-size:24px; }
  html[data-monitor-embedded="true"] .formatbar { gap:8px; }
  html[data-monitor-embedded="true"] .sendbar { padding:2px 5px; }
  html[data-monitor-embedded="true"] .game-window { max-height:100%; }
  html[data-monitor-embedded="true"] .game-window[data-level="beginner"] { width:min(calc(100% - 12px),300px); }
  html[data-monitor-embedded="true"] .game-window[data-level="intermediate"],
  html[data-monitor-embedded="true"] .game-window[data-level="expert"] { width:calc(100% - 12px); }
}
@media(max-width:430px) {
  html[data-monitor-embedded="true"] .workspace { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(220px,44%) minmax(0,1fr); overflow:auto; }
  html[data-monitor-embedded="true"] .buddy-window { overflow:auto; }
}
