
  :root {
    --irix-bg: #8c8c8c;      /* Classic SGI grey */
    --irix-border: #b3b3b3;  /* Bevel light side */
    --irix-shadow: #5c5c5c;  /* Bevel shadow side */
    --irix-active: #4e5a6a;  /* Title bar blue/grey */
  }

  body {
   background-image: url(/images/bg.jpg);
   background-size: cover;
   background-position: center;
   background-repeat: no-repeat;
   height: 100vh;
   width: 100vw;
   margin: 0;
   padding: 0;
   overflow: hidden;
   position: relative;
  }

  /* Main Window Container */
  .irix-window {
    background: var(--irix-bg);
    border: 4px solid var(--irix-border);
    border-right-color: var(--irix-shadow);
    border-bottom-color: var(--irix-shadow);
    font-family: "Helvetica", sans-serif;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
  }

  #menu-window {
    position: absolute;
    width: calc(100% - 2rem);
    max-width: 400px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .pic-window, .bbs-window {
    position: absolute;
    z-index: 10;
    width: 90vw;
    max-width: 480px;
    max-height: 90vh;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
  }

  .irix-window.is-maximized {
    left: 0;
    top: 0;
    transform: none;
    max-width: none;
    max-height: none;
  }

  .pic-window .irix-window-container img {
    width: 100%;
    height: auto;
    max-height: calc(90vh - 30px);
    object-fit: contain;
  }

  .irix-window.is-maximized.pic-window .irix-window-container img {
    max-height: none;
    height: 100%;
    width: 100%;
    object-fit: contain;
  }

  @media (min-width: 768px) {
    #selfie-window {
      left: clamp(250px, calc(50% - var(--selfie-ox, 0px)), 50%);
      top: calc(50% - var(--selfie-oy, 0px));
    }
    #mail-window {
      left: clamp(50%, calc(50% + var(--mail-ox, 0px)), calc(100vw - 250px));
      top: calc(50% + var(--mail-oy, 0px));
    }
  }

  .irix-window-container img {
    width: 100%;
    display: block;
  }

  /* Title Bar */
  .irix-titlebar {
    background: var(--irix-active);
    color: white;
    padding: 2px 8px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--irix-shadow);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
  }

  /* Keep window control buttons grouped on the right */
  .irix-titlebar button {
    margin-left: 4px;
  }

  .irix-titlebar button:first-of-type {
    margin-left: auto;
  }

  .irix-titlebar:active {
    cursor: grabbing;
  }

  .irix-open-frame {
    position: absolute;
    border: 2px dotted #d0d0d0;
    pointer-events: none;
    z-index: 9998;
    box-sizing: border-box;
  }

  /* Fullscreen TV-static overlay (does not block clicks) */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9997;

    opacity: 0.12;
    mix-blend-mode: overlay;
    background:
      repeating-linear-gradient(
        0deg,
        rgba(255,255,255,0.39) 0px,
        rgba(255,255,255,0.43) 1px,
        rgba(0,0,0,0.38) 2px,
        rgba(0,0,0,0.42) 3px
      ),
      repeating-linear-gradient(
        90deg,
        rgba(255,255,255,0.41) 0px,
        rgba(255,255,255,0.37) 1px,
        rgba(0,0,0,0.36) 2px,
        rgba(0,0,0,0.39) 3px
      );
    animation: tvStaticShift 120ms steps(2, end) infinite;
  }

  @keyframes tvStaticShift {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-6px, 4px, 0); }
  }

  /* Desktop Icon Styling */
  .irix-window-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
    gap: 20px;
    /* border:inset 1px var(--irix-shadow); */
  }

  .pic-window .irix-window-container {
    padding: 10px;
  }
  .bbs-window .irix-window-container {
    padding: 0px;
    overflow: hidden;
    display: block;
    position: relative;
  }


  .irix-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 64px;
    color: black;
  }

  .irix-icon-link img {
    width: 48px;
    height: 48px;
    /* Simulate 3D perspective if not using original SVG/FTI files */
    filter: drop-shadow(4px 4px 0px rgba(0,0,0,0.2)); 
    margin-bottom: 5px;
  }

  .irix-icon-link > span {
    font-size: 11px;
    background: #ccc;
    padding: 1px 4px;
    border: 1px solid #555;
    text-align: center;
    width: 100%;
    white-space: nowrap;
  }

  .irix-icon-link:hover > span {
    background: yellow; /* Classic IRIX selection color */
  }

  .icon-link-icon {
    font-weight: bolder;
    line-height: 1;
  }

  .close-button {
    width: 16px;
    height: 16px;
    background: #ccc;
    border: 1px outset #eee;
    text-align: center;
    padding: 0;
    vertical-align: middle;
  }

  .irix-window-container iframe {
    width: 480px;
    height: 600px;
    margin: 0;
    display: block;
    border: 2px solid var(--irix-border);
    border-right-color: var(--irix-shadow);
    border-bottom-color: var(--irix-shadow);
    background: #fff;
    transform-origin: 0 0;
    scrollbar-width: auto;
    scrollbar-color: #9c9c9c #c8c8c8;
    scrollbar-gutter: stable both-edges;
    flex: 0 0 auto;
  }

  .bbs-iframe-clickshield {
    position: absolute;
    inset: 0;
    background: transparent;
    cursor: pointer;
  }

  /* Retro scrollbar styling (best-effort; WebKit/Blink + Firefox) */
  #bbs-window iframe::-webkit-scrollbar {
    width: 14px;
    height: 14px;
    background: #c8c8c8;
  }

  #bbs-window iframe::-webkit-scrollbar-track {
    background: #c8c8c8;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #5c5c5c;
  }

  #bbs-window iframe::-webkit-scrollbar-thumb {
    background: #b3b3b3;
    border: 1px solid #5c5c5c;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #7a7a7a;
  }

  #bbs-window iframe::-webkit-scrollbar-corner {
    background: #c8c8c8;
  }

  #bbs-window iframe::-webkit-scrollbar-button {
    width: 14px;
    height: 14px;
    background: #bdbdbd;
    border: 1px solid #5c5c5c;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #7a7a7a;
  }