/* === Desktop foundation === */
html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  font-family: "Charcoal", "Lucida Grande", "Helvetica Neue", sans-serif;
}

body {
  background: #000;
  color: #000;
}

.desktop {
  position: fixed;
  inset: 20px 0 0 0;
  background: var(--desktop-bg, #63639C);
  overflow: hidden;
  user-select: none;
  cursor: default;
}

/* Content panels — allow text selection / copy */
.file-content,
.mail-content,
.notes-content,
.browser-content,
.chat-content,
.letter-body,
.resume-body,
.window-body.padding p,
.window-body.padding li {
  user-select: text;
  cursor: text;
}
.file-content a,
.mail-content a,
.notes-content a,
.browser-content a,
.chat-content a,
.letter-body a,
.resume-body a {
  cursor: pointer;
}

/* === Menu bar === */
.menu-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 20px;
  background: linear-gradient(to bottom, #f4f4f4 0%, #e2e2e2 50%, #c9c9c9 100%);
  border-bottom: 1px solid #888;
  z-index: 10000;
  font-size: 12px;
  font-weight: bold;
}

.menu-bar > ul[role="menubar"] {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0 6px;
  height: 100%;
  align-items: stretch;
}

.menu-bar > ul[role="menubar"] > li[role="menuitem"] {
  position: relative;
  padding: 0 10px;
  display: flex;
  align-items: center;
  cursor: default;
  list-style: none;
}

.menu-bar > ul[role="menubar"] > li[role="menuitem"]:hover,
.menu-bar > ul[role="menubar"] > li[role="menuitem"].open {
  background: rgba(0, 0, 0, 0.08);
}

.menu-bar li.menu-apple > span::before {
  content: "\f8ff";
  font-family: -apple-system, sans-serif;
}

.menu-bar li.menu-apple > span {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 30% 30%, #fff 0%, #ddd 40%, #888 100%);
  border-radius: 50%;
  box-shadow: inset -1px -1px 0 #555;
}

.menu-bar li.menu-apple > span::before {
  display: none;
}

.menu-bar > ul[role="menubar"] > li > ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ddd;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
  min-width: 200px;
  padding: 2px;
  margin: 0;
  list-style: none;
  z-index: 10001;
}

.menu-bar > ul[role="menubar"] > li.open > ul,
.menu-bar > ul[role="menubar"] > li:focus-within > ul {
  display: block;
}

.menu-bar > ul[role="menubar"] > li > ul > li {
  padding: 3px 18px 3px 22px;
  cursor: default;
  white-space: nowrap;
  list-style: none;
}

.menu-bar > ul[role="menubar"] > li > ul > li:hover:not([aria-disabled]):not(.menu-separator) {
  background: var(--primary-2, #339);
  color: #fff;
}

.menu-bar > ul[role="menubar"] > li > ul > li[aria-disabled] {
  color: #888;
}

.menu-separator {
  border-top: 1px solid #aaa;
  border-bottom: 1px solid #fff;
  margin: 3px 4px;
  padding: 0 !important;
  height: 0;
}

.menu-clock {
  margin-left: auto !important;
  font-weight: bold;
  font-size: 11px;
  padding: 0 12px !important;
}

/* === Desktop icons === */
.desktop-icons {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex !important;
  flex-direction: column;
  gap: 4px;
  width: 92px;
}

.desktop-icons .icon,
.desktop-trash {
  width: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 2px;
  cursor: default;
  outline: none;
}

.desktop-trash {
  position: absolute;
  bottom: 24px;
  right: 18px;
}

.icon-art {
  width: 48px;
  height: 48px;
  position: relative;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.4));
}

/* Icon graphics — CSS only */
.icon-file {
  background:
    linear-gradient(135deg, #fff 0%, #fff 70%, #999 70%, #999 75%, #ccc 75%) no-repeat,
    linear-gradient(#fff, #ddd);
  background-size: 100% 100%, 100% 100%;
  border: 1px solid #444;
  border-radius: 2px;
  width: 38px;
  height: 48px;
  margin-top: 0;
  position: relative;
}
.icon-file::before {
  content: "N.case";
  position: absolute;
  top: 6px; left: 4px; right: 4px;
  font-size: 7px;
  font-family: "Charcoal", monospace;
  color: #555;
  line-height: 1.4;
}
.icon-file::after {
  content: "";
  position: absolute;
  bottom: 6px; left: 4px; right: 4px;
  height: 18px;
  background:
    linear-gradient(#aaa, #aaa) no-repeat,
    linear-gradient(#aaa, #aaa) no-repeat,
    linear-gradient(#aaa, #aaa) no-repeat,
    linear-gradient(#aaa, #aaa) no-repeat;
  background-size: 100% 1px, 80% 1px, 100% 1px, 60% 1px;
  background-position: 0 0, 0 5px, 0 10px, 0 15px;
}

.icon-mail {
  width: 48px;
  height: 36px;
  background: linear-gradient(to bottom, #fff, #ddd);
  border: 1px solid #444;
  border-radius: 1px;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}
.icon-mail::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 49.5%, #444 49.5%, #444 50.5%, transparent 50.5%),
    linear-gradient(45deg, transparent 49.5%, #444 49.5%, #444 50.5%, transparent 50.5%);
}

.icon-notes {
  width: 36px;
  height: 46px;
  margin-top: 1px;
  background:
    linear-gradient(#fffacd, #fffacd) no-repeat,
    linear-gradient(#fffacd, #fffacd) no-repeat;
  background-size: 100% calc(100% - 3px), 100% 3px;
  background-position: 0 3px, 0 0;
  border: 1px solid #555;
  border-radius: 1px 1px 0 6px;
  position: relative;
}
.icon-notes::before {
  content: "";
  position: absolute;
  top: 8px; left: 4px; right: 4px;
  height: 28px;
  background:
    linear-gradient(#888, #888) no-repeat,
    linear-gradient(#888, #888) no-repeat,
    linear-gradient(#888, #888) no-repeat,
    linear-gradient(#888, #888) no-repeat;
  background-size: 100% 1px, 100% 1px, 80% 1px, 100% 1px;
  background-position: 0 0, 0 6px, 0 12px, 0 18px;
}
.icon-notes::after {
  content: "";
  position: absolute;
  top: -2px; left: 2px; right: 2px;
  height: 4px;
  background: repeating-linear-gradient(to right, #b8860b 0 2px, transparent 2px 4px);
}

.icon-browser {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 35%, #fff 35%, #fff 36%, transparent 36%),
    radial-gradient(circle at 50% 50%, #4a90d9 0%, #2e6dc0 60%, #1c4e8e 100%);
  border: 1px solid #1c4e8e;
  position: relative;
  margin-top: 1px;
  overflow: hidden;
}

.icon-chat {
  width: 46px;
  height: 36px;
  margin-top: 6px;
  background: linear-gradient(to bottom, #6ba9e6, #4a90d9);
  border: 1px solid #1c4e8e;
  border-radius: 14px;
  position: relative;
}
.icon-chat::before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 10px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 9px solid transparent;
  border-top: 8px solid #4a90d9;
}
.icon-chat::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 8px;
  right: 8px;
  height: 10px;
  background:
    radial-gradient(circle, #fff 1.5px, transparent 1.5px) 0 50% / 8px 100% repeat-x;
}
.icon-browser::before, .icon-browser::after {
  content: "";
  position: absolute;
  background: #fff;
  opacity: 0.6;
}
.icon-browser::before {
  top: 50%; left: 0; right: 0; height: 1px;
}
.icon-browser::after {
  top: 0; bottom: 0; left: 50%; width: 1px;
}

.icon-trash {
  width: 38px;
  height: 44px;
  margin-top: 2px;
  background: linear-gradient(to bottom, #ccc 0%, #ccc 15%, #aaa 15%, #aaa 18%, #ddd 18%);
  border: 1px solid #555;
  border-radius: 2px 2px 4px 4px;
  position: relative;
}
.icon-trash::before {
  content: "";
  position: absolute;
  top: -4px; left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 4px;
  background: #888;
  border-radius: 2px 2px 0 0;
  border: 1px solid #555;
  border-bottom: none;
}
.icon-trash::after {
  content: "";
  position: absolute;
  top: 8px; left: 4px; right: 4px; bottom: 4px;
  background:
    linear-gradient(#888, #888) no-repeat,
    linear-gradient(#888, #888) no-repeat,
    linear-gradient(#888, #888) no-repeat;
  background-size: 1px 100%, 1px 100%, 1px 100%;
  background-position: 25% 0, 50% 0, 75% 0;
}
.icon-trash.has-content {
  background: linear-gradient(to bottom, #ccc 0%, #ccc 15%, #aaa 15%, #aaa 18%, #e8d8a0 18%);
}

.icon-label {
  margin-top: 3px !important;
  text-align: center;
  padding: 1px 4px !important;
  font-size: 11px;
  color: #fff;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.7);
  font-weight: normal;
  background: transparent;
  border-radius: 1px;
  max-width: 80px;
  line-height: 1.2;
}

.icon:focus .icon-label,
.icon.selected .icon-label {
  background: var(--primary-2, #339);
  color: #fff;
  text-shadow: none;
}

/* === Window positioning when shown === */
.window[data-window-id] {
  position: absolute;
}

/* Generic dialog (no drag) */
.dialog {
  position: absolute;
  z-index: 9000;
}

/* === Window content layout === */
.window-body.padding {
  padding: 12px;
}

.placeholder {
  color: #888;
  font-style: italic;
  padding: 20px;
  text-align: center;
}

/* === File window === */
.file-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: calc(100% - 24px);
  overflow: hidden;
}

.file-sidebar {
  background: #f5f5f5;
  border-right: 1px solid #888;
  padding: 4px;
  overflow-y: auto;
}

.file-chapter {
  padding: 8px 6px;
  cursor: default;
  border-radius: 2px;
  display: grid;
  grid-template-columns: 18px 1fr;
  grid-template-rows: auto auto;
  gap: 1px 6px;
  margin-bottom: 2px;
  font-size: 12px;
}

.file-chapter .lock-icon {
  grid-row: 1 / span 2;
  align-self: center;
  text-align: center;
}

.file-chapter .chapter-title {
  font-weight: bold;
  color: #888;
}

.file-chapter .chapter-sub {
  font-size: 10px;
  color: #999;
}

.file-chapter.unlocked .chapter-title { color: #000; }
.file-chapter.unlocked .chapter-sub { color: #444; }

.file-chapter.selected {
  background: var(--primary-2, #339);
}
.file-chapter.selected .chapter-title,
.file-chapter.selected .chapter-sub { color: #fff; }

.file-chapter:not(.unlocked) {
  cursor: not-allowed;
}

.file-chapter.unlocked {
  cursor: pointer;
}

/* === Disco Elysium narration panel === */
.file-content {
  background: #0D1B2A;
  color: #C8C3BC;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.65;
  overflow-y: auto;
  padding: 24px 28px;
  position: relative;
}

.file-content::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.4) 100%),
    repeating-linear-gradient(0deg, transparent 0px, transparent 2px, rgba(255,255,255,0.018) 2px, rgba(255,255,255,0.018) 3px);
  opacity: 0.7;
  z-index: 0;
}

.file-content > * {
  position: relative;
  z-index: 1;
}

.file-empty .file-empty-title {
  font-size: 22px;
  letter-spacing: 1px;
  color: #d8d3cc;
  margin-bottom: 14px;
}
.file-empty .file-empty-meta {
  color: #8a8278;
  font-size: 12px;
  font-family: "Courier New", monospace;
  margin: 4px 0;
}
.file-empty .file-empty-hint {
  margin-top: 22px;
  color: #6e665d;
  font-size: 12px;
  font-style: italic;
}

.de-chapter-title {
  font-size: 22px;
  color: #d8d3cc;
  margin: 0 0 4px 0;
  letter-spacing: 1px;
}
.de-chapter-sub {
  color: #8a8278;
  font-size: 12px;
  font-family: "Courier New", monospace;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
}

.de-voice {
  margin: 18px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.de-voice-label {
  font-family: "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: bold;
}

.de-voice-text {
  padding-left: 12px;
  border-left: 2px solid currentColor;
  color: #c8c3bc;
}

.de-voice-text em {
  color: #d8d3cc;
  font-style: italic;
}

.de-voice-text strong {
  color: #efe9df;
}

.de-voice-text p {
  margin: 8px 0;
}

.de-voice.instinct .de-voice-label,
.de-voice.instinct .de-voice-text { color: #E8854A; }
.de-voice.instinct .de-voice-text { color: #c8c3bc; }
.de-voice.instinct .de-voice-text strong { color: #f4a070; }

.de-voice.history .de-voice-label { color: #5B9BD5; }
.de-voice.history .de-voice-text strong { color: #7BB5E8; }

.de-voice.tech .de-voice-label { color: #70AD47; }
.de-voice.tech .de-voice-text strong { color: #8FCB60; }

.de-voice.game .de-voice-label { color: #B07CD8; }
.de-voice.game .de-voice-text strong { color: #C896E8; }

.de-narration {
  margin: 20px 0;
  font-style: italic;
  color: #a39c91;
  padding-left: 12px;
  border-left: 1px dashed #555;
}

.de-footer {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid #2a3a4a;
  color: #6e665d;
  font-size: 11px;
  font-family: "Courier New", monospace;
}

/* === Mail window === */
.mail-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  height: calc(100% - 24px);
  overflow: hidden;
}

.mail-list {
  background: #f5f5f5;
  border-right: 1px solid #888;
  overflow-y: auto;
}

.mail-item {
  padding: 6px 10px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  font-size: 12px;
}

.mail-item .mail-sender { font-weight: bold; }
.mail-item .mail-subject { color: #444; }
.mail-item .mail-date { color: #888; font-size: 10px; margin-top: 2px; }

.mail-item.unread .mail-sender::before {
  content: "● ";
  color: #339;
}

.mail-item.selected {
  background: var(--primary-2, #339);
}
.mail-item.selected .mail-sender,
.mail-item.selected .mail-subject,
.mail-item.selected .mail-date { color: #fff; }

.mail-content {
  background: #fff;
  padding: 20px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.5;
}

.mail-headers {
  font-family: "Courier New", monospace;
  font-size: 11px;
  color: #555;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 14px;
}

.mail-headers div { margin: 2px 0; }
.mail-headers .label {
  display: inline-block;
  width: 70px;
  color: #888;
}

.mail-body-text p { margin: 10px 0; }
.mail-body-text { white-space: pre-wrap; }

/* === Notes window === */
.notes-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  height: calc(100% - 24px);
  overflow: hidden;
}

.notes-list {
  background: #f5f5f5;
  border-right: 1px solid #888;
  overflow-y: auto;
}

.notes-item {
  padding: 8px 10px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  font-size: 12px;
}

.notes-item .notes-title { font-weight: bold; }
.notes-item .notes-date { color: #888; font-size: 10px; margin-top: 2px; }

.notes-item.selected {
  background: var(--primary-2, #339);
}
.notes-item.selected .notes-title,
.notes-item.selected .notes-date { color: #fff; }

.notes-content {
  background: #fffce8;
  padding: 24px 30px;
  overflow-y: auto;
  font-family: "Georgia", serif;
  font-size: 14px;
  line-height: 1.7;
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, #d9c79f 27px 28px);
}

.notes-content h2 {
  font-size: 16px;
  margin: 0 0 8px 0;
}

.notes-content .notes-meta {
  font-family: "Courier New", monospace;
  font-size: 11px;
  color: #888;
  margin-bottom: 20px;
}

.notes-content p { margin: 14px 0; }

/* === Chat / Messages window === */
.chat-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  height: calc(100% - 24px);
  overflow: hidden;
}

.chat-list {
  background: #f5f5f5;
  border-right: 1px solid #888;
  overflow-y: auto;
}

.chat-item {
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  font-size: 12px;
}

.chat-item .chat-name {
  font-weight: bold;
  margin-bottom: 2px;
}

.chat-item .chat-sublabel {
  font-size: 10px;
  color: #888;
  margin-bottom: 4px;
}

.chat-item .chat-preview {
  color: #555;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item .chat-timestamp {
  color: #999;
  font-size: 10px;
  margin-top: 3px;
}

.chat-item.unread .chat-name::after {
  content: " ●";
  color: #4a90d9;
}

.chat-item.selected {
  background: var(--primary-2, #339);
}
.chat-item.selected .chat-name,
.chat-item.selected .chat-sublabel,
.chat-item.selected .chat-preview,
.chat-item.selected .chat-timestamp {
  color: #fff;
}

.window.active > .chat-content,
.chat-content {
  background: #ECEFF1;
  padding: 18px 22px 24px;
  overflow-y: auto;
  font-family: "Helvetica Neue", "Helvetica", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 13px;
}

.chat-header {
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  color: #555;
  padding-bottom: 10px;
  border-bottom: 1px solid #d0d4d6;
  margin-bottom: 14px;
}

.chat-time {
  text-align: center;
  font-size: 10.5px;
  color: #888;
  margin: 16px 0 8px;
  font-weight: normal;
  letter-spacing: 0.5px;
}

.msg-row {
  display: flex;
  margin: 4px 0;
}
.msg-row.sent {
  justify-content: flex-end;
}
.msg-row.received {
  justify-content: flex-start;
}

.msg-bubble {
  max-width: 72%;
  padding: 8px 12px;
  border-radius: 16px;
  line-height: 1.45;
  word-wrap: break-word;
}

.msg-row.sent .msg-bubble {
  background: #4a90d9;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg-row.received .msg-bubble {
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #d0d4d6;
  border-bottom-left-radius: 4px;
}

/* === Browser window === */
.browser-body {
  display: flex;
  flex-direction: column;
  height: calc(100% - 24px);
  overflow: hidden;
  background: #fff;
}

.browser-search {
  padding: 8px 10px;
  background: #ddd;
  border-bottom: 1px solid #888;
  display: flex;
  gap: 6px;
  align-items: center;
}

.browser-search-input {
  flex-grow: 1;
  background: #fff;
  padding: 4px 8px;
  border: 1px solid #888;
  box-shadow: inset 1px 1px 0 #bbb;
  font-family: "Courier New", monospace;
  font-size: 12px;
  outline: none;
}
.browser-search-input:focus {
  border-color: #339;
}

.browser-search-btn {
  padding: 4px 14px;
  background: linear-gradient(to bottom, #f4f4f4, #d4d4d4);
  border: 1px solid #555;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
}
.browser-search-btn:active {
  background: linear-gradient(to bottom, #b4b4b4, #999);
}

.browser-history {
  padding: 4px 10px;
  background: #eee;
  border-bottom: 1px solid #aaa;
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.browser-history-label {
  color: #777;
  margin-right: 4px;
}

.browser-history-empty {
  color: #aaa;
  font-style: italic;
}

.browser-history-chip {
  padding: 2px 8px;
  cursor: pointer;
  background: #ddd;
  border: 1px solid #888;
  border-radius: 10px;
  font-size: 11px;
}
.browser-history-chip::before {
  content: "✓ ";
  color: #4a8a4a;
}
.browser-history-chip:hover {
  background: #fff;
}

.browser-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px 28px;
  font-size: 13px;
  line-height: 1.6;
}

.browser-empty {
  color: #555;
  max-width: 460px;
}
.browser-empty p { margin: 10px 0; }

.browser-miss {
  margin-top: 20px;
  text-align: center;
  color: #777;
  font-style: italic;
  padding: 18px;
  border: 1px dashed #ccc;
  background: #fafafa;
}
.browser-miss strong {
  color: #c75b1f;
  font-style: normal;
}

.dino-wrap {
  margin-top: 20px;
  background: #fafafa;
  border: 1px solid #ccc;
  padding: 12px;
}
.dino-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  margin-bottom: 8px;
}
.dino-title {
  color: #333;
}
.dino-score {
  color: #666;
  font-family: "Courier New", monospace;
  font-size: 12px;
  letter-spacing: 1px;
}
#dino-canvas {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;
  background: #fff;
  border: 1px solid #ddd;
  cursor: pointer;
  outline: none;
}
.dino-instructions {
  margin-top: 8px;
  font-size: 11px;
  color: #888;
  text-align: center;
}
.dino-instructions kbd {
  background: #eee;
  border: 1px solid #aaa;
  border-radius: 3px;
  padding: 1px 6px;
  font-family: "Courier New", monospace;
  font-size: 11px;
  margin: 0 2px;
}

.browser-content h2 {
  font-size: 18px;
  margin: 0 0 4px 0;
  color: #339;
}

.browser-content .url-meta {
  font-family: "Courier New", monospace;
  font-size: 11px;
  color: #888;
  margin-bottom: 18px;
}

.browser-content p { margin: 10px 0; }
.browser-content blockquote {
  margin: 14px 0;
  padding: 8px 14px;
  border-left: 3px solid #ccc;
  color: #555;
  font-style: italic;
}

.browser-content .photo-frame {
  margin: 16px 0;
  border: 1px solid #888;
  padding: 4px;
  background: #fff;
  box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
  max-width: 480px;
}
.browser-content .photo-frame img {
  display: block;
  width: 100%;
  height: auto;
}
.browser-content .photo-caption {
  font-size: 11px;
  color: #888;
  text-align: center;
  margin-top: 6px;
  font-family: "Georgia", serif;
}

/* === Trash window === */
.trash-body {
  padding: 12px;
  overflow-y: auto;
  background: #fff;
}

.trash-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  cursor: pointer;
  border-radius: 2px;
}
.trash-file:hover {
  background: var(--primary-5, #ccf);
}
.trash-file .trash-file-icon {
  width: 24px;
  height: 28px;
  background: linear-gradient(#fff, #ddd);
  border: 1px solid #888;
  flex-shrink: 0;
}
.trash-file .trash-file-name { font-size: 12px; }
.trash-file .trash-file-meta { font-size: 10px; color: #888; }

/* === Hint window === */
.hint-body { font-size: 12px; }
.hint-intro {
  color: #555;
  font-style: italic;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ccc;
}

.hint-chapter {
  margin-bottom: 14px;
}
.hint-chapter .hint-chapter-title {
  font-weight: bold;
  margin-bottom: 4px;
}
.hint-chapter .hint-text {
  padding-left: 14px;
  color: #444;
  margin: 4px 0;
}
.hint-chapter .hint-locked {
  padding-left: 14px;
  color: #aaa;
  font-style: italic;
}
.hint-chapter .hint-buttons {
  padding-left: 14px;
  margin-top: 6px;
  display: flex;
  gap: 6px;
}
.hint-chapter.unlocked-already {
  opacity: 0.5;
}

/* === Resume window === */
.window.active > .resume-body,
.resume-body {
  background: #fbfaf6;
  color: #1a1a1a;
  font-family: "Georgia", serif;
  padding: 36px 44px 40px;
  overflow-y: auto;
  height: calc(100% - 24px);
  font-size: 13px;
  line-height: 1.7;
  border: 1px solid #888;
}
.resume-body h1 {
  font-size: 30px;
  color: #1a1a1a;
  margin: 0 0 10px 0;
  letter-spacing: 1px;
  font-weight: bold;
}
.resume-body .resume-contact {
  margin: -2px 0 12px;
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #555;
}
.resume-body .resume-contact a {
  color: #c75b1f;
  text-decoration: underline;
}
.resume-body .resume-contact a:hover {
  background: #ffe8d0;
}
.resume-body .resume-lead {
  color: #4a4a4a;
  font-style: italic;
  margin-bottom: 26px;
  font-size: 13.5px;
  padding-bottom: 18px;
  border-bottom: 1px solid #d8d2c2;
}
.resume-body h2 {
  font-size: 13px;
  color: #c75b1f;
  margin: 28px 0 10px 0;
  font-family: "Courier New", monospace;
  letter-spacing: 3px;
  font-weight: bold;
  border-bottom: 1px solid #c75b1f;
  padding-bottom: 4px;
}
.resume-body h3 {
  font-size: 14.5px;
  color: #1a1a1a;
  margin: 16px 0 2px 0;
  font-weight: bold;
}
.resume-body .resume-meta {
  font-family: "Courier New", monospace;
  font-size: 11px;
  color: #7a6f5a;
  margin-bottom: 6px;
}
.resume-body ul {
  padding-left: 22px;
  margin: 6px 0;
}
.resume-body li {
  margin: 5px 0;
  color: #2a2a2a;
}
.resume-body a {
  color: #c75b1f;
  text-decoration: underline;
}
.resume-body a:hover {
  background: #ffe8d0;
}

/* === Letter === */
.window.active > .letter-body,
.letter-body {
  background: #fffce8;
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, #d9c79f 27px 28px);
  color: #1a1a1a;
  font-family: "Georgia", serif;
  line-height: 1.8;
  padding: 32px 40px;
  overflow-y: auto;
  font-size: 14px;
  height: calc(100% - 24px);
}

.letter-body a {
  color: #c75b1f;
  text-decoration: underline;
}

.letter-body p { margin: 12px 0; }

.letter-body .letter-signature {
  text-align: right;
  margin-top: 28px;
  font-style: italic;
}

/* === Carrot bread essay (§4) styling within file content === */
.essay-title {
  font-size: 20px;
  color: #d8d3cc;
  margin: 0 0 6px 0;
}
.essay-meta {
  color: #8a8278;
  font-size: 11px;
  font-family: "Courier New", monospace;
  margin-bottom: 22px;
}
.essay-body p {
  margin: 14px 0;
  color: #c8c3bc;
}

/* === Buttons base === */
.button {
  padding: 4px 14px;
  background: linear-gradient(to bottom, #f4f4f4, #d4d4d4);
  border: 1px solid #555;
  border-radius: 8px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}
.button:active {
  background: linear-gradient(to bottom, #b4b4b4, #999);
}
.button.primary {
  background: linear-gradient(to bottom, #abc4e8, #5b87c9);
  border-color: #2a4d80;
  color: #000;
}
.button.primary:active {
  background: linear-gradient(to bottom, #5b87c9, #3a67a9);
}

/* === Boot screen === */
#boot {
  position: fixed;
  inset: 0;
  background: #888;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-family: "Charcoal", sans-serif;
}

.boot-mac {
  width: 80px;
  height: 90px;
  position: relative;
}

.boot-mac-body {
  width: 80px;
  height: 80px;
  background: linear-gradient(to bottom, #d8d8d0 0%, #c8c8c0 100%);
  border: 2px solid #555;
  border-radius: 6px;
  position: absolute;
  top: 0;
  box-shadow: inset 2px 2px 0 #efe8d8, inset -2px -2px 0 #888;
}

.boot-mac-face {
  position: absolute;
  width: 60px;
  height: 50px;
  top: 14px;
  left: 8px;
  background: #fff;
  border: 1px solid #333;
  z-index: 1;
}

.boot-mac-eye {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #000;
  border-radius: 50%;
  top: 14px;
}
.boot-mac-eye-left { left: 14px; }
.boot-mac-eye-right { right: 14px; }
.boot-mac-mouth {
  position: absolute;
  width: 26px;
  height: 4px;
  background: #000;
  border-radius: 2px;
  bottom: 12px;
  left: 17px;
}

.boot-text {
  font-size: 14px;
  color: #000;
  font-weight: bold;
}

.boot-progress {
  width: 240px;
  height: 14px;
  background: #444;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #222, inset -1px -1px 0 #666;
  position: relative;
}

.boot-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to bottom, #aaccef, #5b87c9 50%, #2a4d80);
  transition: width 2.4s linear;
}

.boot-status {
  font-size: 11px;
  color: #333;
  font-family: "Courier New", monospace;
}

/* === Desktop files (dynamic icons) === */
.desktop-files {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.desktop-files .icon {
  pointer-events: auto;
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 2px;
  cursor: default;
}

.icon-photo {
  width: 56px;
  height: 42px;
  background-size: cover;
  background-position: center;
  background-color: #fff;
  border: 1px solid #555;
  box-shadow: 1px 1px 0 #fff, 2px 2px 4px rgba(0,0,0,0.3);
}

.icon-pdf {
  width: 38px;
  height: 48px;
  background: linear-gradient(135deg, #fff 0%, #fff 70%, #999 70%, #999 75%, #eee 75%);
  border: 1px solid #444;
  border-radius: 2px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
}
.icon-pdf span {
  font-size: 9px;
  font-weight: bold;
  color: #c75b1f;
  font-family: "Courier New", monospace;
}

.icon-cert {
  width: 50px;
  height: 38px;
  background: linear-gradient(135deg, #fefdf6, #fff8e8);
  border: 2px solid #c75b1f;
  position: relative;
  box-shadow: 1px 1px 0 #fff, 2px 2px 4px rgba(0,0,0,0.3);
}
.icon-cert::before {
  content: "🏆";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* === Right-click context menu === */
.context-menu {
  position: fixed;
  background: #ddd;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
  min-width: 150px;
  padding: 2px;
  z-index: 25000;
  font-size: 12px;
}
.context-menu-item {
  padding: 4px 14px;
  cursor: default;
  white-space: nowrap;
}
.context-menu-item:hover {
  background: var(--primary-2, #339);
  color: #fff;
}

/* === Confetti === */
.confetti-piece {
  position: fixed;
  top: -20px;
  width: 8px;
  height: 14px;
  z-index: 30000;
  pointer-events: none;
  animation: confetti-fall linear forwards;
  will-change: transform, opacity;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0.6; }
}

/* === Resize handle hint === */
.window.active::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 16px;
  height: 16px;
  background-image:
    linear-gradient(135deg, transparent 40%, #888 40%, #888 50%, transparent 50%, transparent 60%, #888 60%, #888 70%, transparent 70%, transparent 80%, #888 80%, #888 90%, transparent 90%);
  pointer-events: none;
}

/* === Mobile gate === */
#mobile-gate {
  display: none;
  position: fixed;
  inset: 0;
  background: #63639C;
  color: #fff;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
  text-align: center;
  font-size: 1.1em;
  line-height: 1.6;
}

@media (max-width: 768px) {
  #boot, .menu-bar, .desktop { display: none !important; }
  #mobile-gate { display: flex; }
}

/* === Bottom-right help marker === */
.hint-marker {
  position: absolute;
  bottom: 12px;
  left: 16px;
  font-family: "Courier New", monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  pointer-events: none;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

/* Konami easter egg flip */
body.flipped {
  transform: rotate(180deg);
  transition: transform 1.2s ease;
}
