/* A toy Indigo Magic Desktop (4Dwm / Motif look) */
.irix {
  --g: #b4b4b4; --g-hi: #e9e9e9; --g-lo: #5e5e5e; --g-mid: #9c9c9c; --g-dk: #7d7d7d;
  --ix-font: Helvetica, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", Menlo, Monaco, "Courier New", monospace;
  position: absolute; overflow: hidden; background: #4d6f99; color: #000;
  font: italic 700 13px/1.2 var(--ix-font); user-select: none; -webkit-user-select: none; cursor: default;
  touch-action: manipulation;
}
.irix * { box-sizing: border-box; }
.ix-bg { position: absolute; inset: 0; background: #4d6f99 center / cover no-repeat; will-change: transform; transform: translateZ(0); }
.ix-bg::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), radial-gradient(rgba(0,0,0,0.06) 1px, transparent 1px); background-size: 4px 4px; background-position: 0 0, 2px 2px; }
.ix-boot { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 9000; display: none; background: #000; }
.irix.booting .ix-boot { display: block; }

.ix-raise { background: var(--g); box-shadow: inset 1px 1px 0 var(--g-hi), inset -1px -1px 0 var(--g-lo); }
.ix-sink { box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi); }

/* ---------- Toolchest ---------- */
.ix-toolchest { position: absolute; left: 14px; top: 12px; width: 196px; background: var(--g); border: 1px solid #000; z-index: 5; box-shadow: 2px 3px 0 rgba(0,0,0,0.25); }
.ix-tc-title { height: 24px; padding: 4px 10px; background: var(--g-mid); box-shadow: inset 1px 1px 0 #cfcfcf, inset -1px -1px 0 var(--g-lo); font-size: 14px; }
.ix-tc-row { height: 27px; padding: 5px 10px; display: flex; justify-content: space-between; align-items: center; box-shadow: inset 1px 1px 0 var(--g-hi), inset -1px -1px 0 var(--g-lo); font-size: 14px; cursor: pointer; }
.ix-tc-row::after { content: ""; width: 11px; height: 13px; border: 1px solid #000; background: linear-gradient(#fff 0 3px, #000 3px 4px, var(--g) 4px); box-shadow: 1px 1px 0 var(--g-lo); }
.ix-tc-row:hover, .ix-tc-row.open { background: #c6c6c6; }
.ix-tc-row.open { box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi); }

/* ---------- menus ---------- */
.ix-menus { position: absolute; inset: 0; z-index: 8000; pointer-events: none; }
.ix-menu { position: absolute; min-width: 190px; background: var(--g); border: 1px solid #000; padding: 2px; pointer-events: auto; box-shadow: inset 1px 1px 0 var(--g-hi), inset -1px -1px 0 var(--g-lo), 3px 4px 0 rgba(0,0,0,0.3); }
.ix-mi { padding: 5px 12px 5px 10px; font-size: 13.5px; white-space: nowrap; cursor: pointer; display: flex; justify-content: space-between; gap: 18px; }
.ix-mi:hover { box-shadow: inset 1px 1px 0 var(--g-hi), inset -1px -1px 0 var(--g-lo); background: #bfbfbf; }
.ix-mi.off { color: #777; pointer-events: none; }
.ix-mi small { font: inherit; opacity: 0.6; }
.ix-sep { height: 2px; margin: 3px 2px; box-shadow: inset 0 1px 0 var(--g-lo), inset 0 -1px 0 var(--g-hi); }

/* ---------- desktop icons ---------- */
.ix-icons { position: absolute; inset: 0; z-index: 1; }
.ix-icon { position: absolute; width: 92px; text-align: center; cursor: pointer; padding: 2px 0 3px; }
.ix-icon img { width: 52px; height: 52px; display: block; margin: 0 auto 2px; pointer-events: none; filter: drop-shadow(2px 3px 0 rgba(0,0,0,0.28)); }
.ix-icon span { display: inline-block; color: #fff; font-size: 13px; padding: 0 3px; text-shadow: 1px 1px 0 #000, 0 0 3px rgba(0,0,0,0.6); }
.ix-icon.sel span { background: #f5e04a; color: #000; text-shadow: none; }
.ix-icon.sel img { filter: drop-shadow(2px 3px 0 rgba(0,0,0,0.28)) brightness(1.1) sepia(0.5) saturate(2.4) hue-rotate(5deg); }
.ix-icon:active img { transform: translate(1px, 1px); }
.ix-icon.ix-mini { width: 72px; padding: 0; }
.ix-icon.ix-mini img { width: 72px; height: 90px; margin: 0; filter: drop-shadow(2px 3px 0 rgba(0,0,0,0.25)); }
.irix.compact .ix-icon.ix-mini { width: 92px; }
.irix.compact .ix-icon.ix-mini img { width: 58px; height: 72px; margin: 0 auto; }

/* ---------- windows ---------- */
.ix-windows { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.ix-win { position: absolute; display: flex; flex-direction: column; pointer-events: auto; background: var(--g); border: 1px solid #000; padding: 5px;
  box-shadow: inset 1px 1px 0 var(--g-hi), inset -1px -1px 0 var(--g-lo), inset 5px 5px 0 var(--g), inset -5px -5px 0 var(--g), 4px 6px 0 rgba(0,0,0,0.28); }
.ix-win.opening { animation: ix-open 0.16s steps(4) both; }
@keyframes ix-open { from { transform: scale(0.2); opacity: 0.2; } to { transform: scale(1); opacity: 1; } }
.ix-win.active { --g: #bdbcb4; }
.ix-title { height: 23px; flex: none; display: flex; align-items: stretch; border: 1px solid #000; background: var(--g-mid); cursor: grab; touch-action: none; }
.ix-win.active .ix-title { background: #c9c5b3; }
.ix-title:active { cursor: grabbing; }
.ix-tb { width: 22px; flex: none; position: relative; box-shadow: inset 1px 1px 0 var(--g-hi), inset -1px -1px 0 var(--g-lo); cursor: pointer; }
.ix-tb:active { box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi); }
.ix-tb::before { content: ""; position: absolute; box-shadow: inset 1px 1px 0 var(--g-hi), inset -1px -1px 0 var(--g-lo); background: var(--g); }
.ix-tb.close::before { left: 4px; right: 4px; top: 9px; height: 4px; }
.ix-tb.min::before { left: 8px; top: 8px; width: 5px; height: 5px; }
.ix-tb.max::before { left: 4px; top: 4px; right: 4px; bottom: 4px; }
.ix-tname { flex: 1; min-width: 0; padding: 3px 9px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 1px 1px 0 #dedede, inset -1px -1px 0 var(--g-lo); color: #444; }
.ix-win.active .ix-tname { color: #000; }
.ix-body { flex: 1; min-height: 0; position: relative; border: 1px solid #000; border-top: 0; background: var(--g); display: flex; flex-direction: column; overflow: hidden; }
.ix-grip { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; z-index: 3; touch-action: none; }
.ix-menubar { flex: none; display: flex; gap: 2px; padding: 2px 4px; box-shadow: inset 1px 1px 0 var(--g-hi), inset -1px -1px 0 var(--g-lo); font-size: 13.5px; }
.ix-menubar span { padding: 3px 8px; cursor: pointer; }
.ix-menubar span:hover { box-shadow: inset 1px 1px 0 var(--g-hi), inset -1px -1px 0 var(--g-lo); }
.ix-menubar span::first-letter { text-decoration: underline; }
.ix-menubar .right { margin-left: auto; }
.ix-status { flex: none; padding: 4px 8px; font-size: 12px; box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi); margin: 3px; background: #a9a9a9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ix-btn { appearance: none; border: 0; font: italic 700 13.5px var(--ix-font); color: #000; padding: 7px 14px; background: var(--g); cursor: pointer;
  box-shadow: inset 1px 1px 0 var(--g-hi), inset -1px -1px 0 var(--g-lo), inset 2px 2px 0 #d2d2d2, inset -2px -2px 0 #8a8a8a; text-decoration: none; display: inline-block; white-space: nowrap; }
.ix-btn:hover { background: #c4c4c4; }
.ix-btn:active { box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi), inset 2px 2px 0 #8a8a8a; padding: 8px 13px 6px 15px; }
.ix-btn.primary { background: #2d5fa3; color: #fff; box-shadow: inset 1px 1px 0 #8fb2e0, inset -1px -1px 0 #14315c, 0 0 0 1px #000; }
.ix-btn.primary:hover { background: #366cb6; }
.ix-btn.store { background: #000; color: #fff; border-radius: 7px; font-style: normal; font-weight: 600; box-shadow: 0 0 0 1px #777; padding: 8px 16px; }
.ix-btn.store:hover { background: #222; }

/* ---------- icon view (fm) ---------- */
.ix-fm { flex: 1; overflow: auto; background: #b9b9b9; padding: 12px 8px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px 2px; box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi); margin: 3px; }
.ix-fm .ix-icon { position: static; width: 104px; }
.ix-fm .ix-icon span { color: #000; text-shadow: none; font-size: 12.5px; word-break: break-word; }
.ix-path { flex: none; margin: 3px 3px 0; padding: 4px 8px; background: #d9d4c4; font: 12px var(--mono); box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi); display: flex; gap: 8px; align-items: center; }
.ix-path b { cursor: pointer; font: italic 700 12px var(--ix-font); padding: 2px 6px; box-shadow: inset 1px 1px 0 var(--g-hi), inset -1px -1px 0 var(--g-lo); background: var(--g); }

/* ---------- shell ---------- */
.ix-term { flex: 1; background: #10182b; color: #d6e2ff; font: 13px/1.35 var(--mono); padding: 8px 10px; overflow: auto; white-space: pre-wrap; word-break: break-word; user-select: text; -webkit-user-select: text; cursor: text; }
.ix-term .in { display: flex; }
.ix-term textarea { flex: 1; background: none; border: 0; outline: 0; color: #fff; font: inherit; padding: 0; margin: 0 0 0 6px; caret-color: #7dffb0; min-width: 0; resize: none; overflow: hidden; height: 1.35em; white-space: pre; border-radius: 0; -webkit-appearance: none; appearance: none; }
.ix-term .p { color: #7dffb0; }
.ix-term .d { color: #8fc7ff; font-weight: 700; }
.ix-term .x { color: #ffd27d; }
.ix-term .e { color: #ff9a9a; }
.ix-term a { color: #8fc7ff; }

/* ---------- jot / about ---------- */
.ix-text { flex: 1; overflow: auto; background: #f4f1e6; margin: 3px; padding: 12px 14px; font: 13px/1.5 var(--mono); white-space: pre-wrap; user-select: text; -webkit-user-select: text; box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi); }
.ix-about { display: flex; gap: 16px; padding: 16px; align-items: flex-start; }
.ix-about canvas { flex: none; }
.ix-about h3 { margin: 0 0 4px; font-size: 19px; }
.ix-about p { margin: 0 0 8px; font-weight: 400; font-style: normal; font-size: 13px; line-height: 1.4; }
.ix-about pre { margin: 0; font: 11.5px/1.45 var(--mono); background: #dcdcdc; padding: 8px 10px; box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi); white-space: pre-wrap; }

/* ---------- Netscape ---------- */
.ix-ns-bar { flex: none; display: flex; align-items: center; gap: 4px; padding: 4px 6px; box-shadow: inset 1px 1px 0 var(--g-hi), inset -1px -1px 0 var(--g-lo); }
.ix-ns-bar .ix-btn { padding: 5px 9px; font-size: 12.5px; }
.ix-ns-loc { flex: 1; min-width: 0; background: #9f9fc4; padding: 4px 8px; font: 12px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi); }
.ix-ns-n { width: 30px; height: 30px; flex: none; background: #173a6e; color: #fff; display: grid; place-items: center; font: 700 20px Georgia, serif; box-shadow: inset 1px 1px 0 #6f93c9, inset -1px -1px 0 #08182f; }
.ix-ns-n.busy { animation: ix-pulse 0.5s steps(2) infinite; }
@keyframes ix-pulse { 50% { background: #3b7ad0; } }
.ix-frame { flex: 1; min-height: 0; border: 0; width: 100%; background: #fff; margin: 0; display: block; }
.ix-framewrap { flex: 1; min-height: 0; display: flex; margin: 3px; box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi); padding: 1px; background: #fff; }

/* ---------- showcase / movie ---------- */
.ix-show { flex: 1; overflow: auto; display: flex; flex-direction: column; }
.ix-hero { flex: none; height: 200px; background: #222 center / cover no-repeat; margin: 3px 3px 0; box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi); position: relative; }
.ix-hero .award { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,0.72); color: #ffe7a8; font-size: 12px; padding: 4px 9px; }
.ix-info { padding: 12px 16px 14px; }
.ix-deck { flex: none; height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; cursor: pointer; margin: 3px 3px 0; padding: 0; background: linear-gradient(#4a4266, #2c2740); box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi); text-align: center; }
.ix-deck canvas { width: 250px; height: 160px; display: block; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.45)); transition: transform 0.15s ease; }
.ix-deck:hover canvas { transform: translateY(-2px) rotate(-1deg); }
.ix-deck .tap { color: #e8e4f6; font-size: 13px; }
.ix-deck.playing { cursor: default; background: #000; }
.ix-deck iframe { width: 100%; height: 100%; border: 0; display: block; }
.ix-info h2 { margin: 0; font-size: 22px; }
.ix-info .plat { font-size: 12px; color: #333; margin: 2px 0 8px; }
.ix-info p { margin: 0 0 12px; font-style: normal; font-weight: 400; font-size: 13.5px; line-height: 1.45; user-select: text; -webkit-user-select: text; }
.ix-info .tag { font-style: italic; font-weight: 700; }
.ix-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ix-movie { flex: 1; min-height: 0; margin: 3px; background: #000 center / cover no-repeat; position: relative; box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi); cursor: pointer; }
.ix-movie iframe { position: absolute; inset: 1px; width: calc(100% - 2px); height: calc(100% - 2px); border: 0; }
.ix-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; margin: -27px 0 0 -38px; background: rgba(20,20,20,0.82); border-radius: 12px; display: grid; place-items: center; transition: background 0.15s, transform 0.15s; }
.ix-movie:hover .ix-play { background: #e52d27; transform: scale(1.06); }
.ix-play::after { content: ""; border-left: 20px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; margin-left: 5px; }
.ix-transport { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 8px 7px; flex-wrap: wrap; }
.ix-transport .t { flex: 1; min-width: 120px; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- fsn ---------- */
.ix-fsn { flex: 1; min-height: 0; position: relative; margin: 3px; background: #0a1430; box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi); overflow: hidden; }
.ix-fsn canvas { position: absolute; inset: 1px; width: calc(100% - 2px) !important; height: calc(100% - 2px) !important; display: block; touch-action: none; cursor: grab; }
.ix-fsn-label { position: absolute; left: 10px; top: 8px; color: #fff; font-size: 12.5px; text-shadow: 1px 1px 0 #000; pointer-events: none; opacity: 0.85; }
.ix-fsn-info { position: absolute; left: 8px; right: 8px; bottom: 8px; background: rgba(180,180,180,0.94); border: 1px solid #000; padding: 8px 10px; display: none; gap: 10px; align-items: center; box-shadow: inset 1px 1px 0 var(--g-hi), inset -1px -1px 0 var(--g-lo); }
.ix-fsn-info.on { display: flex; }
.ix-fsn-info img { width: 74px; height: 48px; object-fit: cover; flex: none; background: #333; border: 1px solid #000; }
.ix-fsn-info .n { flex: 1; min-width: 0; font-size: 13.5px; }
.ix-fsn-info .n small { display: block; font: 400 11.5px var(--mono); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Soft Break ---------- */
.ix-game { flex: 1; min-height: 0; position: relative; margin: 3px; background: #eef0f6; box-shadow: inset 1px 1px 0 var(--g-lo), inset -1px -1px 0 var(--g-hi); overflow: hidden; }
.ix-game canvas { position: absolute; inset: 1px; width: calc(100% - 2px); height: calc(100% - 2px); display: block; touch-action: none; cursor: none; will-change: transform; transform: translateZ(0); }
.ix-promo { position: absolute; inset: 1px; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 9px; text-align: center; padding: 18px;
  background: rgba(238,240,246,0.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #232733; font-style: normal; font-weight: 400; }
.ix-promo.on { display: flex; animation: ix-fade 0.35s ease both; }
@keyframes ix-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ix-promo img { width: 92px; height: 92px; border-radius: 21px; box-shadow: 0 10px 28px rgba(60,70,110,0.28); }
.ix-promo h3 { margin: 4px 0 0; font: 700 23px -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: -0.01em; }
.ix-promo .score { font: 600 12px var(--ix-font); letter-spacing: 0.12em; text-transform: uppercase; color: #7a8198; }
.ix-promo p { margin: 0; max-width: 330px; font: 400 14px/1.45 -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif; color: #4a5066; }
.ix-promo .ix-actions { justify-content: center; margin-top: 6px; }
.ix-promo .fine { font-size: 11.5px; color: #8a90a6; }

/* ---------- dialog ---------- */
.ix-dialog { padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; }
.ix-dialog p { margin: 0 0 12px; font-size: 14px; line-height: 1.4; }

/* ---------- compact (phones): the desktop fills the viewport ---------- */
.irix.compact .ix-toolchest { left: 0; top: 0; right: 0; width: auto; display: flex; border-width: 0 0 1px; box-shadow: none; overflow-x: auto; z-index: 7000; }
.irix.compact .ix-tc-title { display: none; }
.irix.compact .ix-tc-row { flex: 1 0 auto; height: 34px; justify-content: center; padding: 0 12px; font-size: 13.5px; }
.irix.compact .ix-tc-row::after { display: none; }
.irix.compact .ix-win { left: 0 !important; top: 34px !important; width: 100% !important; height: calc(100% - 34px) !important; box-shadow: inset 1px 1px 0 var(--g-hi), inset -1px -1px 0 var(--g-lo); }
.irix.compact .ix-title { height: 34px; cursor: default; }
.irix.compact .ix-tb { width: 40px; }
.irix.compact .ix-tb.close::before { left: 10px; right: 10px; top: 14px; }
.irix.compact .ix-tb.min, .irix.compact .ix-tb.max, .irix.compact .ix-grip { display: none; }
.irix.compact .ix-tname { padding: 8px 10px; }
.irix.compact .ix-hero { height: 150px; }
.irix.compact .ix-menu { min-width: 210px; }
.irix.compact .ix-mi { padding: 9px 14px; font-size: 15px; }
.irix.compact .ix-text { font-size: 11.5px; padding: 10px; }
.irix.compact .ix-term { font-size: 12px; }
.irix.compact .ix-term textarea { font-size: 16px; } /* stops iOS zooming on focus */
