/* Root container and theme variables */
#os {
  --acc: #7c6cff;
  --win: rgba(22, 22, 36, 0.7);
  --win-b: rgba(255, 255, 255, 0.12);
  --panel: rgba(20, 20, 32, 0.72);
  --fg: #e9e9f2;
  --fg2: #a9a9bb;
  --hover: rgba(255, 255, 255, 0.08);
  --field: rgba(255, 255, 255, 0.06);
  position: fixed;
  inset: 0;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  overflow: hidden;
  color: var(--fg);
  font-family: Inter, system-ui, sans-serif;
  background: #0a0b12;
}
#os.on {
  opacity: 1;
  pointer-events: auto;
}
#os.light {
  --win: rgba(248, 248, 252, 0.8);
  --win-b: rgba(0, 0, 0, 0.1);
  --panel: rgba(250, 250, 254, 0.82);
  --fg: #16161e;
  --fg2: #5d5d70;
  --hover: rgba(0, 0, 0, 0.06);
  --field: rgba(0, 0, 0, 0.05);
}
#os .wall {
  position: absolute;
  inset: 0;
  transition: background 0.6s;
}
#os button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
#os .glass {
  background: var(--panel);
  border: 1px solid var(--win-b);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
#os .hidden {
  display: none !important;
}
#os input,
#os textarea,
#os select {
  font: inherit;
  color: var(--fg);
}
#os :focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

/* Top bar */
.os-top {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 92%);
  height: 42px;
  border-radius: 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  font-size: 13px;
  z-index: 900;
}
.os-top .tbtn {
  border: 0;
  background: none;
  padding: 8px 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}
.os-top .tbtn:hover {
  background: var(--hover);
}
.os-top b {
  letter-spacing: 0.14em;
  font-weight: 600;
}
.os-top .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--acc);
  display: inline-block;
}
.os-top .clock {
  color: var(--fg2);
}

/* Desktop icons (positioned by js/os/desktop-icons.js) */
.desk {
  --cell-w: 100px; /* icon width + gap */
  --cell-h: 102px; /* tallest icon (two-line label) + gap */
  position: absolute;
  left: 12px;
  top: 60px;
  right: 12px;
  bottom: 86px;
  z-index: 2;
  pointer-events: none;
}
.dicon {
  position: absolute;
  pointer-events: auto;
  touch-action: none;
  transition:
    left 0.18s ease,
    top 0.18s ease;
  width: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 12.5px;
  line-height: 1.2;
  background: none;
  border: 1px solid transparent;
  padding: 6px 4px;
  border-radius: 4px;
  color: #f2f2fa !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  text-align: center;
}
.dicon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
}
.dicon.sel {
  background: color-mix(in srgb, var(--acc) 35%, transparent);
  border-color: color-mix(in srgb, var(--acc) 70%, transparent);
}
.dicon svg {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}
.gl {
  display: flex;
  align-items: center;
  justify-content: center;
}
.gl svg {
  stroke-width: 2;
}

/* Dock */
.dock {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  height: 62px;
  padding: 0 10px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 900;
  max-width: 96vw;
  overflow-x: auto;
  scrollbar-width: none;
}
.dock button {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.dock button:hover {
  background: var(--hover);
}
.dock button.run::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--fg);
}
.dock .logo {
  background: var(--acc) !important;
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  width: 42px !important;
  height: 42px !important;
  margin: 0 4px;
}
.dock .sep {
  width: 1px;
  height: 40px;
  background: var(--win-b);
  flex-shrink: 0;
}

.panel {
  position: absolute;
  z-index: 950;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

/* Start menu */
#startmenu {
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 94vw);
  max-height: 70vh;
  overflow: auto;
}
#startmenu input {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--win-b);
  background: var(--field);
  padding: 0 14px;
  outline: none;
}
#startmenu h4 {
  margin: 14px 4px 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg2);
  font-weight: 500;
}
.appgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
}
.appbtn {
  border: 0;
  background: none;
  border-radius: 12px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-align: center;
}
.appbtn:hover,
.appbtn.sel {
  background: var(--hover);
}
.appbtn .ai {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Control center */
#cc {
  top: 62px;
  right: max(4%, calc(50% - 280px));
  width: 320px;
}
#cc .row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
#cc .tile {
  flex: 1;
  border: 0;
  border-radius: 14px;
  background: var(--field);
  padding: 12px;
  text-align: left;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 64px;
}
#cc .tile.on {
  background: var(--acc);
  color: #fff;
}
#cc label {
  font-size: 12px;
  color: var(--fg2);
  display: block;
  margin: 4px 2px 6px;
}
#cc input[type='range'] {
  width: 100%;
  accent-color: var(--acc);
}
.sw {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sw button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
}
.sw button.on {
  border-color: var(--fg);
}

/* Power menu */
#powermenu {
  bottom: 86px;
  right: max(3%, calc(50% - 300px));
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#powermenu button {
  border: 0;
  background: none;
  text-align: left;
  padding: 12px;
  border-radius: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}
#powermenu button:hover {
  background: var(--hover);
}

/* Spotlight search */
#spot {
  position: absolute;
  inset: 0;
  z-index: 980;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: center;
  padding-top: 16vh;
}
#spot .box {
  width: min(600px, 92vw);
  border-radius: 18px;
  padding: 10px;
  height: max-content;
}
#spot input {
  width: 100%;
  height: 50px;
  border: 0;
  background: none;
  outline: none;
  font-size: 18px;
  padding: 0 12px;
}
#spot .res button {
  width: 100%;
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  font-size: 14px;
}
#spot .res button.sel,
#spot .res button:hover {
  background: var(--hover);
}
#spot .res small {
  color: var(--fg2);
  margin-left: auto;
  font-size: 12px;
}

/* Notifications */
#toasts {
  position: absolute;
  top: 66px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 990;
  width: 300px;
  max-width: 90vw;
}
.toast {
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  animation: tin 0.35s ease;
}
.toast b {
  display: block;
  font-size: 13px;
}
.toast span {
  font-size: 12px;
  color: var(--fg2);
  line-height: 1.5;
}
.toast .ic {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--acc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
@keyframes tin {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Windows */
.win {
  position: absolute;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--win);
  border: 1px solid var(--win-b);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  min-width: 260px;
  min-height: 180px;
  animation: wopen 0.22s ease;
}
@keyframes wopen {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.win.min {
  display: none;
}
.win.max {
  left: 8px !important;
  top: 62px !important;
  width: calc(100% - 16px) !important;
  height: calc(100% - 160px) !important;
}
.win.focus {
  border-color: color-mix(in srgb, var(--acc) 45%, transparent);
}
.tb {
  height: 44px;
  flex-shrink: 0;
  padding: 0 8px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--win-b);
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.tb .t {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb .b {
  display: flex;
  gap: 6px;
}
.tb .b button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: var(--hover);
  font-size: 14px;
  line-height: 1;
}
.tb .b button.x:hover {
  background: rgba(255, 90, 120, 0.9);
  color: #fff;
}
.wc {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rz {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  touch-action: none;
}
.rz::after {
  content: '';
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--fg2);
  border-bottom: 2px solid var(--fg2);
  opacity: 0.5;
}

/* Shared controls */
.btn {
  border: 1px solid var(--win-b);
  background: var(--field);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  min-height: 36px;
}
.btn:hover {
  background: var(--hover);
}
.btn.pri {
  background: var(--acc);
  border-color: transparent;
  color: #fff;
}
.bar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--win-b);
  flex-wrap: wrap;
}
.pad {
  padding: 14px;
  overflow: auto;
  flex: 1;
}
.field {
  width: 100%;
  border: 1px solid var(--win-b);
  background: var(--field);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
textarea.field {
  resize: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
}
.mono {
  font-family: 'JetBrains Mono', monospace;
}
.muted {
  color: var(--fg2);
}

/* Files */
.exp {
  flex: 1;
  display: flex;
  min-height: 0;
}
.exp nav {
  width: 180px;
  flex-shrink: 0;
  padding: 12px 8px;
  border-right: 1px solid var(--win-b);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  overflow: auto;
}
.exp nav button {
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  border: 0;
  background: none;
  color: var(--fg2);
}
.exp nav button.sub {
  padding-left: 24px;
}
.exp nav button.on {
  background: color-mix(in srgb, var(--acc) 28%, transparent);
  color: var(--fg);
}
.exp .grid {
  flex: 1;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  align-content: start;
  overflow: auto;
}
.card {
  border-radius: 12px;
  padding: 12px;
  background: var(--field);
  border: 1px solid var(--win-b);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.card .th {
  height: 64px;
  border-radius: 8px;
}
.card b {
  font-size: 14px;
  font-weight: 500;
}
.card span {
  font-size: 12px;
  color: var(--fg2);
}
.card a {
  color: var(--acc);
  font-size: 12px;
}
button.card:hover {
  border-color: var(--acc);
}

/* CV viewer */
.pdfbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--fg2);
  border-bottom: 1px solid var(--win-b);
}
.pdfview {
  flex: 1;
  overflow: auto;
  background: #2a2a36;
  padding: 22px;
}
.page {
  background: #fff;
  color: #111;
  max-width: 640px;
  margin: 0 auto;
  padding: 44px 48px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}
.page h1 {
  margin: 0;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
}
.page .ct {
  margin: 4px 0 14px;
  text-align: center;
  font-size: 12.5px;
}
.page h2 {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #111;
  padding-bottom: 2px;
}
.page .en {
  margin-bottom: 10px;
}
.page .r {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.page .r span {
  white-space: nowrap;
}
.page ul {
  margin: 4px 0 0;
  padding-left: 18px;
}
.page li {
  margin: 2px 0;
}
.page p {
  margin: 3px 0;
}

/* Terminal */
.term {
  background: rgba(8, 8, 14, 0.9) !important;
  color: #d6d6e4;
}
.term .tbody {
  flex: 1;
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  line-height: 1.65;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.term .p {
  color: #5ee3ff;
}
.term form {
  display: flex;
  gap: 8px;
  margin: 0;
}
.term input {
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  color: #e9e9f2 !important;
  font: inherit;
  caret-color: #5ee3ff;
  min-width: 0;
}
.term a {
  color: #b9b2ff;
}
.term .ok {
  color: #3ddc84;
}
.term .err {
  color: #ff7a90;
}
.term .dim {
  color: #7c7c90;
}

/* Calculator */
.calc {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 10px;
}
.calc .disp {
  text-align: right;
  padding: 10px 6px;
}
.calc .disp small {
  display: block;
  color: var(--fg2);
  font-size: 13px;
  min-height: 18px;
}
.calc .disp div {
  font-size: 38px;
  font-weight: 300;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calc .keys {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.calc .keys button {
  border: 0;
  border-radius: 12px;
  background: var(--field);
  font-size: 18px;
  min-height: 46px;
}
.calc .keys button:hover {
  background: var(--hover);
}
.calc .keys .op {
  background: color-mix(in srgb, var(--acc) 30%, transparent);
}
.calc .keys .eq {
  background: var(--acc);
  color: #fff;
}
.calc .keys .z {
  grid-column: span 2;
}

.meter {
  height: 8px;
  border-radius: 4px;
  background: var(--field);
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  border-radius: 4px;
  transition:
    width 0.3s,
    background 0.3s;
}
.chk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
}
.chk input {
  accent-color: var(--acc);
  width: 16px;
  height: 16px;
}
input[type='range'] {
  accent-color: var(--acc);
}

.editor {
  flex: 1;
  display: flex;
  min-height: 0;
}
.editor aside {
  width: 170px;
  flex-shrink: 0;
  border-right: 1px solid var(--win-b);
  padding: 8px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.editor aside button {
  border: 0;
  background: none;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editor aside button.on {
  background: color-mix(in srgb, var(--acc) 28%, transparent);
}
#os .editor textarea {
  flex: 1;
  border: 0;
  background: none;
  outline: none;
  resize: none;
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--fg);
}

/* Games */
.game {
  flex: 1;
  display: flex;
  gap: 16px;
  padding: 14px;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
}
.game canvas {
  background: #08080e;
  border-radius: 10px;
  border: 1px solid var(--win-b);
  max-width: 100%;
  touch-action: none;
}
.game .side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  min-width: 120px;
}
.game .side b {
  font-size: 22px;
  font-weight: 500;
  display: block;
}

/* Settings */
.set {
  flex: 1;
  display: flex;
  min-height: 0;
}
.set nav {
  width: 170px;
  flex-shrink: 0;
  border-right: 1px solid var(--win-b);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.set nav button {
  border: 0;
  background: none;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
}
.set nav button.on {
  background: color-mix(in srgb, var(--acc) 28%, transparent);
}
.set section {
  flex: 1;
  padding: 18px;
  overflow: auto;
}
.set h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 500;
}
.wps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.wps button {
  height: 76px;
  border-radius: 12px;
  border: 2px solid transparent;
  font-size: 12px;
  color: #fff !important;
  display: flex;
  align-items: flex-end;
  padding: 8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.wps button.on {
  border-color: var(--acc);
}
.seg {
  display: inline-flex;
  border: 1px solid var(--win-b);
  border-radius: 10px;
  overflow: hidden;
}
.seg button {
  border: 0;
  background: none;
  padding: 8px 14px;
  font-size: 13px;
}
.seg button.on {
  background: var(--acc);
  color: #fff;
}

/* Browser */
.browser .addr {
  flex: 1;
  min-width: 120px;
  height: 36px;
  border-radius: 18px;
  border: 1px solid var(--win-b);
  background: var(--field);
  padding: 0 14px;
  outline: none;
}
.browser .bpage {
  flex: 1;
  overflow: auto;
  padding: 24px;
}
.browser .bm {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.browser .bm a {
  text-decoration: none;
  color: var(--fg);
  border-radius: 12px;
  padding: 14px;
  background: var(--field);
  border: 1px solid var(--win-b);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}
.browser .bm a:hover {
  border-color: var(--acc);
}
.browser .bm a small {
  color: var(--fg2);
  font-size: 12px;
}

/* System info */
.sys {
  flex: 1;
  overflow: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  align-content: start;
}
.sys .card b {
  font-size: 20px;
}
.sys canvas {
  width: 100%;
  height: 60px;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 2000;
}
.bsod {
  background: #0b1d4a;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vw;
  gap: 18px;
  font-size: 16px;
}
.bsod h1 {
  font-size: 72px;
  font-weight: 300;
  margin: 0;
}
.bsod p {
  margin: 0;
  max-width: 640px;
  line-height: 1.6;
}
.bsod code {
  font-family: 'JetBrains Mono', monospace;
  opacity: 0.8;
}

/* Small screens */
@media (max-width: 760px) {
  .win {
    left: 6px !important;
    top: 62px !important;
    width: calc(100% - 12px) !important;
    height: calc(100% - 156px) !important;
    min-width: 0;
  }
  .rz {
    display: none;
  }
  .exp nav,
  .editor aside,
  .set nav {
    width: 110px;
  }
  .exp nav button.sub {
    padding-left: 14px;
  }
  .game {
    flex-direction: column;
    align-items: center;
  }
  .bsod h1 {
    font-size: 48px;
  }
}

.sm-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--win-b);
  font-size: 13px;
  flex-wrap: wrap;
}
.fgrid2 {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)) !important;
  gap: 4px !important;
}
.fi {
  border: 1px solid transparent;
  background: none;
  border-radius: 6px;
  padding: 10px 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 12.5px;
  word-break: break-word;
}
.fi:hover {
  background: var(--hover);
}
.fi.sel {
  background: color-mix(in srgb, var(--acc) 25%, transparent);
  border-color: color-mix(in srgb, var(--acc) 55%, transparent);
}
.crumb {
  font-size: 13px;
  padding: 0 6px;
  color: var(--fg2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
}
.term .dir {
  color: #6aa6ff;
  font-weight: 600;
}
#os.framed {
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
}
@media (max-width: 760px) {
  .desk {
    --cell-w: 82px;
    --cell-h: 86px;
    bottom: 84px;
  }
  .dicon {
    width: 74px;
    font-size: 11px;
  }
}
#os .term input:focus-visible,
#os .editor textarea:focus-visible {
  outline: none;
}
.sendbox {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid var(--win-b);
  font-size: 13px;
  background: color-mix(in srgb, var(--acc) 10%, transparent);
}
.sendbox a.btn {
  text-decoration: none;
  color: #fff;
}
.ihead {
  padding: 12px 16px 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--fg2);
  white-space: pre-wrap;
  user-select: none;
}

#os .scr {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

/* CTF challenges */
.ctf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  align-content: start;
}
.ctfc .tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--field);
  color: var(--fg2);
  white-space: nowrap;
}
.ctfc .d {
  font-size: 13px !important;
  line-height: 1.55;
  color: var(--fg2);
}
.ctfc form {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.ctfc form input {
  padding: 7px 10px;
  font-size: 12.5px;
}
.ctfc .hb {
  align-self: flex-start;
  padding: 4px 10px;
  min-height: 28px;
  font-size: 12px;
}
.ctfc .hint {
  font-size: 12px !important;
  line-height: 1.5;
}
.ctfc .ok {
  color: #2ecc71 !important;
  font-size: 13px !important;
  font-weight: 500;
}
.ctfc.done {
  border-color: rgba(46, 204, 113, 0.5);
}
.field.bad {
  border-color: #ff5c7a;
  animation: shake 0.3s;
}
@keyframes shake {
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}
.ctfh {
  grid-column: 1/-1;
  margin: 6px 2px 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg2);
  font-weight: 500;
}
.pbar {
  height: 4px;
  background: var(--field);
}
.pbar i {
  display: block;
  height: 100%;
  background: var(--acc);
  transition: width 0.4s;
}
.lvs button {
  padding: 6px 12px;
  font-size: 12px;
}
.ctfintro {
  margin: 0;
  padding: 10px 16px 0;
  font-size: 13px;
  color: var(--fg2);
  line-height: 1.5;
}

.dicon.dragging {
  z-index: 5;
  opacity: 0.85;
  transition: none;
  cursor: grabbing;
}

/* About Me and Contact */
.about,
.contact {
  padding: 22px 24px;
  overflow: auto;
  font-size: 14px;
  line-height: 1.6;
}
.about h4 {
  margin: 18px 0 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg2);
}
.about-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.about-head h2 {
  margin: 0;
  font-weight: 600;
  font-size: 22px;
}
.about-head p {
  margin: 0;
}
.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: color-mix(in srgb, var(--acc) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--acc) 80%, transparent);
  flex-shrink: 0;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chips span {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--field);
  border: 1px solid var(--win-b);
  font-size: 12.5px;
}
.about-actions {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.clinks small {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--fg2);
}
.clinks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.clinks a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--field);
  border: 1px solid var(--win-b);
  color: var(--fg);
  text-decoration: none;
}
.clinks a:hover {
  border-color: color-mix(in srgb, var(--acc) 70%, transparent);
}
.clinks span {
  display: flex;
  flex-direction: column;
}

/* Trash */
.dicon.drop {
  background: color-mix(in srgb, var(--acc) 35%, transparent);
  border-color: color-mix(in srgb, var(--acc) 80%, transparent);
}
.trashapp {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.trashapp .count {
  font-size: 13px;
  padding-left: 4px;
}
.tlist {
  flex: 1;
  overflow: auto;
  padding: 8px 12px 12px;
}
.trow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
}
.trow:hover {
  background: var(--hover);
}
.tinfo {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.tinfo b {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tinfo small {
  font-size: 12px;
}
.tempty {
  text-align: center;
  padding: 50px 30px;
  color: var(--fg2);
}
.tempty p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
}
.tempty p:first-of-type {
  color: var(--fg);
  font-size: 15px;
}
