/* The two menus -- copal-gui (Super+A) and copal-menu (Super+Space, Super+Z)
   -- and the bar and clock they sit under, on the site's desktop (desk.js),
   drawn at the page's own pixels. Their colours are the desktop's, not the
   pages': it is a picture of the machine, and a picture keeps its own palette
   whatever it is printed on. */

.desk {
  --bar: #121212; --bar-ink: #a79f8a; --bar-hot: #e9b86a;
  /* The menu panel on the theme's menu ground, as copal-gui draws it now:
     Antiquity (helios) -- menu-bg, shadow, highlight, text-light, accent. */
  --panel: #181818; --side: #121212; --line: #333333;
  --row-hot: #333333; --ink: #d0daed; --ink-soft: #9aa3b4;
  --accent: #fccf8a; --accent-dark: #87704f;
  position: relative; overflow: hidden; user-select: none;
  font: 15px/1.2 "Recia", "Inter", "Cantarell", system-ui, sans-serif;
  color: var(--ink); background: #6f7a55 center / cover no-repeat;
  cursor: default;
}

/* ----- the bar and the desktop's own clock ----- */
.sim-bar {
  position: absolute; inset: 0 0 auto 0; height: 26px; z-index: 10;
  display: flex; align-items: center; gap: 14px; padding: 0 10px;
  background: var(--bar); color: var(--bar-ink);
  font: 12px/26px "JetBrains Mono", ui-monospace, monospace;
}
.sim-bar button {
  all: unset; cursor: pointer; padding: 0 6px; color: var(--bar-hot); font-size: 15px;
}
.sim-ws { display: flex; gap: 0; }
.sim-ws span { width: 32px; text-align: center; cursor: pointer; }
.sim-ws span.on { color: var(--bar-hot); box-shadow: inset 0 -2px 0 var(--bar-hot); }
.sim-bar .grow { flex: 1; color: #c9b27a; white-space: nowrap; overflow: hidden; }
.sim-bar .time { color: var(--bar-hot); font-weight: 700; }

/* On the right, where the welcome window leaves the desktop in sight. */
.sim-clock {
  position: absolute; right: 5%; top: 15%; z-index: 1; pointer-events: none;
  text-align: right;
}
.sim-clock .hm {
  font: 600 120px/1 "Cormorant Garamond", Georgia, serif; color: #f4c27c;
  text-shadow: 0 2px 10px rgba(0,0,0,.25); letter-spacing: 2px;
}
.sim-clock .date {
  margin-top: 6px; font: 14px "JetBrains Mono", monospace; color: #e8e1cf;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* ----- the menu ----- */
.sim-menu {
  position: absolute; left: 6px; top: 32px; width: 590px; height: min(562px, calc(100% - 40px)); z-index: 8;
  display: flex; background: var(--panel);
  border: 1px solid var(--accent-dark); border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,.45);
}
.sim-menu[hidden] { display: none; }
.sim-side {
  width: 58px; flex: none; display: flex; flex-direction: column; justify-content: space-between;
  padding: 12px 0 10px; background: var(--side); border-right: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
}
.sim-side .col { display: flex; flex-direction: column; align-items: center; gap: 11px; }
.sim-side .col.sess { gap: 6px; }
.sim-ib {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 6px; cursor: pointer;
}
.sim-ib:hover, .sim-ib.hot { background: var(--row-hot); }

.sim-main { flex: 1; display: flex; flex-direction: column; padding: 10px 10px 8px; min-width: 0; }
.sim-search {
  height: 34px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  border: 1px solid var(--accent-dark); border-radius: 6px; background: var(--side);
}
.sim-search.focus { border-color: var(--accent); box-shadow: none; background: var(--side); }
.sim-search svg { flex: none; }
.sim-search .q {
  flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent;
  color: var(--ink); font: inherit; -webkit-appearance: none; appearance: none;
}
.sim-search .q::placeholder { color: var(--ink-soft); }
.sim-search .q::-webkit-search-cancel-button { display: none; }

.sim-body { flex: 1; display: flex; gap: 8px; min-height: 0; margin-top: 10px; }
.sim-secs { width: 162px; flex: none; }
.sim-sec {
  height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 10px;
  border-radius: 5px; white-space: nowrap;
}
.sim-sec.on { background: var(--row-hot); color: var(--accent); }
.sim-apps { flex: 1; overflow-y: auto; min-width: 0; scrollbar-width: thin; }
.sim-app {
  height: 30px; display: flex; align-items: center; gap: 10px; padding: 0 8px;
  border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sim-app.on { background: var(--row-hot); color: var(--accent); }
.sim-app .n { overflow: hidden; text-overflow: ellipsis; }
.sim-app .t { margin-left: auto; font-size: 11px; color: var(--ink-soft); }

.sim-foot { flex: none; border-top: 1px solid var(--line); margin-top: 6px; padding: 8px 6px 0; height: 48px; }
.sim-foot .n { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim-foot .d { opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }

.sim-ico {
  display: inline-block; flex: none; background-repeat: no-repeat;
  image-rendering: auto;
}

/* ----- hover: what the program opens to ----- */
.sim-peek {
  position: absolute; left: 610px; top: 32px; width: min(560px, calc(100% - 626px)); z-index: 7;
  background: #fce2ab; border: 1px solid #121212; box-shadow: 5px 5px 0 #121212;
  padding: 8px 8px 10px; pointer-events: none;
  opacity: 0; transform: translateY(6px); transition: opacity .12s, transform .12s;
}
.sim-peek.on { opacity: 1; transform: none; }
/* No room beside the menu: no picture, rather than one on top of it. */
@media (max-width: 1100px) { .sim-peek { display: none; } }
.sim-peek .shot {
  width: 100%; aspect-ratio: 16 / 10; display: block; background: #e7d5a6 center / cover no-repeat;
  border: 1px solid #121212; image-rendering: auto;
}
.sim-peek .shot.none { display: grid; place-items: center; color: #6d6047; font-size: 13px; }
.sim-peek .cap { margin-top: 7px; font-size: 13px; color: #1b1710; line-height: 1.35; }
.sim-peek .cap b { font-weight: 700; }

/* ----- the session buttons' screens ----- */
.sim-veil {
  position: absolute; inset: 0; z-index: 20; display: none; place-items: center; align-content: center;
  gap: 10px; background: rgba(10,10,10,.92); color: #f2e3c0; text-align: center;
  font: 16px "JetBrains Mono", monospace; cursor: pointer;
}
.sim-veil.on { display: grid; }
.sim-veil .big { font: 600 64px "Cormorant Garamond", Georgia, serif; color: #f4c27c; }

/* ----- right-click ----- */
.sim-ctx {
  position: absolute; z-index: 21; min-width: 190px; padding: 4px; display: none;
  background: #fff; border: 1px solid rgba(0,0,0,.2); border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.sim-ctx.on { display: block; }
.sim-ctx div { padding: 6px 10px; border-radius: 4px; cursor: pointer; }
.sim-ctx div:hover { background: var(--row-hot); }

/* ----- the other menu: copal-menu in wofi, as the screenshots show it ----- */
.tm-menu {
  position: absolute; left: 6px; top: 32px; width: 520px; max-height: calc(100% - 40px); z-index: 8;
  background: #1a1a1a; border: 1px solid #2c2c2c; border-radius: 4px; overflow: hidden;
  font: 14px/1 "JetBrains Mono", ui-monospace, monospace; color: #d8d2c4;
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
}
.tm-menu[hidden] { display: none; }
.tm-head {
  height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: #111; color: #8e8778; cursor: pointer; white-space: pre;
}
.tm-q {
  flex: 1; min-width: 2ch; padding: 0; border: 0; outline: 0; background: transparent;
  color: #efe6d2; font: inherit; caret-color: #c49a52; -webkit-appearance: none; appearance: none;
}
.tm-q::-webkit-search-cancel-button { display: none; }
.tm-rows { padding-top: 0; }
.tm-row {
  height: 28px; line-height: 28px; padding: 0 10px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; border-left: 3px solid transparent; cursor: pointer;
}
.tm-row.on { background: #2b2b2b; border-left-color: #e9b86a; color: #e9b86a; }
.tm-row.tm-none { color: #6d6658; cursor: default; }
.tm-card { left: 540px; width: min(560px, calc(100% - 556px)); }
.tm-man {
  width: 100%; height: 100%; box-sizing: border-box; padding: 26px 28px; background: #151515;
  font: 15px/1.5 "JetBrains Mono", monospace; color: #d8d2c4; text-align: left;
}
.tm-man .k { color: #8e8778; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
.tm-man .c { color: #e9b86a; font-size: 22px; margin: 12px 0 10px; }
.tm-man .p { color: #efe6d2; }
.sim-peek .cap a { color: #8a6320; font-weight: 700; }

/* ----- a phone: each menu a sheet under the bar ----- */
@media (max-width: 759px) {
  .sim-menu {
    left: 0; right: 0; top: 26px; bottom: 0; width: auto; height: auto;
    border-radius: 0; border-width: 1px 0 0;
  }
  .sim-side { width: 48px; border-radius: 0; }
  .sim-ib { width: 36px; height: 36px; }
  .sim-secs { width: 132px; }
  .sim-sec { padding: 0 6px; gap: 7px; font-size: 14px; }
  .sim-sec span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .sim-app { height: 36px; }   /* a finger, not a pointer */
  .tm-menu { left: 0; right: 0; top: 26px; bottom: 0; width: auto; max-height: none; border-radius: 0; }
  .tm-row { height: 34px; line-height: 34px; }
}

