/* Shared Windows UI typography, including document and numeric displays. */
body,.desktop-apps .desktop-icon,.menubar button,.start-brand,.image-window>.statusbar,.error-content p { font-family:var(--system-font); }
.system-window { font:12px var(--system-font); }
.system-window .menubar { min-height:24px; height:24px; }
.system-window .aux-content { display:flex; flex-direction:column; padding:0; overflow:hidden; }
.display-properties { width:410px; height:470px; left:32%; top:14%; resize:none; min-height:0; }
.display-properties .window-controls button:not([data-win=close]) { display:none; }
.display-properties .aux-content { padding:10px 6px 4px; overflow:auto; }
.property-tabs { display:flex; padding-left:3px; flex-shrink:0; }
.property-tabs span { padding:5px 8px; border:1px solid; border-color:white #808080 #c0c0c0 white; position:relative; z-index:1; bottom:-1px; background:#c0c0c0; }
.property-sheet { padding:12px; border:2px solid; border-color:white #808080 #808080 white; }
.monitor { width:218px; margin:auto; padding:10px 10px 6px; border:2px solid; border-color:white #333 #333 white; background:#c0c0c0; }
.monitor-screen { height:120px; width:194px; overflow:hidden; border:2px inset #eee; background:#008080; }
.preview-desktop { position:relative; transform-origin:top left; }
.preview-desktop>img { position:absolute; left:15px; top:15px; width:48px; }
.preview-taskbar { position:absolute; bottom:0; width:100%; height:32px; background:#c0c0c0; border-top:3px solid white; }
.monitor-light { height:3px; width:6px; margin:5px 0 0 auto; background:#0f0; border:1px inset #eee; }
.monitor-foot { width:92px; height:14px; margin:0 auto 12px; border:2px outset white; background:#aaa; }
.property-sheet fieldset { margin:0; min-width:0; border:2px groove white; padding:10px; }
.wallpaper-choices { display:flex; align-items:flex-start; gap:10px; }
.wallpaper-choices select { flex:1; min-width:0; height:80px; border:2px inset white; background:white; }
.wallpaper-choices option { padding:2px 3px; }
.wallpaper-position { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:10px; }
.wallpaper-position select { background:white; }
.wallpaper-note { font-size:11px; }
.property-actions { display:flex; justify-content:flex-end; gap:6px; padding-top:10px; }
.property-actions button { min-width:75px; }
.tour-window { width:650px; height:560px; }
.tour-toolbar { display:flex; gap:5px; align-items:center; padding:5px 2px; flex-shrink:0; }
.tour-month { flex:1; text-align:center; }
.tour-toolbar .bevel { padding:3px 8px; }
.tour-calendar { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:1px; background:#808080; padding:1px; flex-shrink:0; }
.calendar-heading { text-align:center; background:#c0c0c0; padding:3px; }
.calendar-day,.calendar-empty { min-height:40px; background:white; }
.calendar-day { display:flex; flex-direction:column; text-align:left; align-items:flex-start; padding:3px 5px; gap:3px; min-width:0; }
.calendar-day b { font-weight:normal; }
.calendar-day span { font-size:10px; white-space:nowrap; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.calendar-day.has-show { color:navy; font-weight:bold; }
.calendar-day.has-show b { font-weight:bold; }
.calendar-day.today b { outline:1px dotted #000; outline-offset:1px; }
.calendar-day[aria-pressed=true] { color:white; background:navy; }
.tour-events { flex:1; min-height:100px; overflow:auto; background:white; margin-top:5px; }
.tour-events table { border-collapse:collapse; width:100%; text-align:left; font-size:12px; }
.tour-events th { position:sticky; top:0; background:#c0c0c0; border:1px outset white; font-weight:normal; padding:4px; }
.tour-events td { padding:6px 5px; border-bottom:1px solid #ddd; vertical-align:top; }
.tour-events td:first-child { white-space:nowrap; }
.tour-events small { color:#555; font-size:11px; }
.tour-events a { color:navy; }
.tour-events p { margin:12px; }
@media(max-width:680px),(max-width:1000px) and (max-height:500px){
  .system-window .menubar { min-height:32px; height:32px; }
  .display-properties .aux-content { padding:8px 4px; }
  .property-sheet { padding:10px; }
  .property-actions button { flex:1; min-width:0; }
  .wallpaper-choices { gap:5px; }
  .wallpaper-choices .bevel { padding:3px 6px; }
  .wallpaper-position select { min-height:32px; }
  .tour-toolbar { flex-wrap:wrap; }
  .tour-toolbar .bevel { min-height:32px; }
  .calendar-day { padding:3px; }
  .calendar-day span { font-size:9px; }
}

/* Utility windows open at their content height, bounded by the work area. */
.window.mines-window:not(.maximized) { width:360px; height:auto; min-height:0; resize:none; }
.window.display-properties:not(.maximized),
.window.player-window:not(.maximized),
.window#files-window:not(.maximized) { height:auto; min-height:0; }
.mines-window .aux-content { display:flex; flex-direction:column; gap:10px; flex:0 1 auto; overflow:auto; padding:12px; align-items:stretch; }
.mines-window .mine-header { position:static; flex-direction:row; gap:8px; flex-shrink:0; margin:0; }
.mines-window #mine-grid { width:min(100%,400px,max(180px,calc(var(--viewport-height) - var(--taskbar-height) - var(--mobile-top,0px) - 180px))); max-height:none; flex-shrink:0; margin:0 auto; grid-template-rows:repeat(9,minmax(0,1fr)); }
.mines-window .mine-actions { position:static; width:auto; flex-direction:row; flex-wrap:wrap; flex-shrink:0; margin:0; gap:8px; }
.mines-window .mine-actions span { flex:1; min-width:140px; line-height:1.4; }
.display-properties .aux-content,.player-window .aux-content,#files-window .aux-content { flex:0 1 auto; }
.property-sheet,.property-actions { flex-shrink:0; }
.notepad-window .aux-content { display:flex; flex-direction:column; overflow:hidden; }
.notepad-window textarea { flex:1; min-height:0; }
.notepad-window .note-actions { flex-shrink:0; }
.tour-window .aux-content { overflow:auto; }
#control-window,#recycle-window,#recovered-window { height:320px; min-height:230px; }
@media(max-width:680px),(max-width:1000px) and (max-height:500px){
  .window.mines-window:not(.maximized),.window.display-properties:not(.maximized),
  .window.player-window:not(.maximized),.window#files-window:not(.maximized) {
    height:auto!important;
    max-height:calc(var(--viewport-height) - var(--mobile-top) - var(--taskbar-height) - 6px);
  }
  .mines-window .aux-content { padding:10px; }
}
@media(max-height:500px) and (max-width:1000px){
  .mines-window .aux-content { display:grid; grid-template-columns:minmax(70px,1fr) minmax(0,200px) minmax(100px,1fr); align-items:center; }
  .mines-window .mine-header { flex-direction:column; }
  .mines-window #mine-grid { width:min(100%,max(135px,calc(var(--viewport-height) - var(--taskbar-height) - var(--mobile-top) - 68px))); }
  .mines-window .mine-actions { flex-direction:column; text-align:center; }
  .mines-window .mine-actions span { min-width:0; }
}
