:root {
  --win-gray: #c0c0c0;
  --win-light: #fff;
  --win-mid: #dfdfdf;
  --win-shadow: #808080;
  --win-dark: #000;
  --win-blue: #000080;
  --desktop: #008080;
  --ui-font: "MS Sans Serif", Tahoma, Geneva, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow: hidden;
  background: var(--win-gray);
  color: #000;
  font-family: var(--ui-font);
  font-size: 12px;
  -webkit-font-smoothing: none;
}

button,
input,
textarea {
  font: inherit;
}
button {
  color: #000;
}

.desktop {
  position: relative;
  min-height: 100dvh;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.desktop-pattern {
  display: none;
}

.paint-window {
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 3px;
  background: var(--win-gray);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow: none;
}

.title-bar {
  min-height: 28px;
  padding: 3px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(90deg, #000080, #1084d0);
  font-size: 13px;
  letter-spacing: 0.01em;
}

.title-brand {
  display: flex;
  align-items: center;
  gap: 7px;
}

.app-icon {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 16px;
  overflow: visible;
  shape-rendering: crispEdges;
}
.app-icon .document-page {
  fill: #fff;
  stroke: #000;
}
.app-icon .document-fold {
  fill: #c0c0c0;
  stroke: #000;
  stroke-linejoin: bevel;
}
.app-icon .document-line {
  fill: none;
  stroke: #000080;
  stroke-width: 1;
}

.window-actions {
  display: flex;
  gap: 2px;
}
.window-actions button,
.title-bar > button {
  width: 22px;
  height: 21px;
  padding: 0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  background: var(--win-gray);
  font-size: 14px;
  font-weight: 700;
  line-height: 14px;
}
.window-actions button:active,
.title-bar > button:active {
  border: 2px inset var(--win-gray);
}

.menu-bar {
  height: 30px;
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 5px;
  font-size: 15px;
  border-bottom: 1px solid var(--win-shadow);
}
.menu-bar > a,
.menu-bar > button {
  height: 25px;
  margin: 0;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  color: #000;
  font: inherit;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
}
.menu-bar > a:hover,
.menu-bar > a:focus-visible,
.menu-bar > button:hover,
.menu-bar > button:focus-visible {
  border: 1px outset var(--win-gray);
  outline: 0;
}
.menu-bar > a:active,
.menu-bar > button:active {
  border: 1px inset var(--win-gray);
}

.paint-body {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 64px 1fr;
  padding: 4px 1px 2px;
}

.toolbox {
  align-content: start;
  display: grid;
  grid-template-columns: repeat(2, 29px);
  padding-right: 4px;
}

.tool {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px outset var(--win-gray);
  background: var(--win-gray);
  font-family: serif;
  font-size: 21px;
  line-height: 1;
}
.tool:hover {
  background: #d2d2d2;
}
.tool:active,
.tool.is-active {
  border: 2px inset var(--win-gray);
  background-color: #fff;
  background-image: radial-gradient(#bfbfbf 0.7px, transparent 0.7px);
  background-size: 3px 3px;
}
.tool-icon {
  display: block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: auto;
  background-image: url("../images/classic-paint-tools.png");
  background-repeat: no-repeat;
  image-rendering: pixelated;
  pointer-events: none;
}
.tool-icon--0 {
  background-position: 0 0;
}
.tool-icon--1 {
  background-position: -16px 0;
}
.tool-icon--2 {
  background-position: -32px 0;
}
.tool-icon--3 {
  background-position: -48px 0;
}
.tool-icon--4 {
  background-position: -64px 0;
}
.tool-icon--5 {
  background-position: -80px 0;
}
.tool-icon--6 {
  background-position: -96px 0;
}
.tool-icon--7 {
  background-position: -112px 0;
}
.tool-icon--8 {
  background-position: -128px 0;
}
.tool-icon--9 {
  background-position: -144px 0;
}
.tool-icon--10 {
  background-position: -160px 0;
}
.tool-icon--11 {
  background-position: -176px 0;
}
.tool-icon--12 {
  background-position: -192px 0;
}
.tool-icon--13 {
  background-position: -208px 0;
}
.tool-icon--14 {
  background-position: -224px 0;
}
.tool-icon--15 {
  background-position: -240px 0;
}

.tool-options {
  grid-column: 1 / -1;
  margin-top: 9px;
  padding: 6px 4px;
  display: grid;
  gap: 3px;
  border: 2px inset var(--win-gray);
}
.tool-options button {
  height: 25px;
  padding: 5px 3px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  background: transparent;
}
.tool-options button:hover,
.tool-options button.is-active {
  border: 1px solid #000080;
  background: #fff;
}
.tool-options span {
  display: block;
  width: 34px;
  max-height: 14px;
  background: #000;
}

.workspace {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 4px 18px 18px 4px;
  background-color: #808080;
  background-image: radial-gradient(#9c9c9c 0.6px, transparent 0.6px);
  background-size: 4px 4px;
  border: 2px inset var(--win-gray);
}

.canvas-frame {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: #fff;
  box-shadow: 1px 1px 0 #000;
}
.canvas-frame::before,
.canvas-frame::after {
  content: "";
  position: absolute;
  z-index: 4;
  width: 6px;
  height: 6px;
  background: #fff;
  border: 1px solid #000;
  pointer-events: none;
}
.canvas-frame::before {
  right: -5px;
  bottom: -5px;
}
.canvas-frame::after {
  left: 50%;
  bottom: -5px;
}

#paint-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
  image-rendering: pixelated;
}

.canvas-logo-overlay {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  width: min(62%, 650px);
  height: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
}

.selection-outline {
  position: absolute;
  z-index: 4;
  border: 1px dashed #000;
  outline: 1px dashed #fff;
  outline-offset: -2px;
  pointer-events: none;
}

.canvas-frame.is-magnified {
  width: 200%;
  height: 200%;
}

.canvas-intro {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.canvas-intro.is-hidden {
  opacity: 0;
}
.canvas-intro p {
  margin: 0;
}
.canvas-intro .intro-kicker {
  margin-bottom: 4px;
  font-size: clamp(11px, 1.2vw, 15px);
  letter-spacing: 0.3em;
}
.logo-space {
  width: min(62%, 650px);
  aspect-ratio: 504 / 180;
  margin: clamp(8px, 1.5vh, 16px) 0;
}
.canvas-intro > p:not(.intro-kicker) {
  font-family: var(--ui-font);
  font-size: clamp(15px, 2vw, 28px);
}
.nav-hint {
  position: absolute;
  left: 20px;
  top: 18px;
  color: #000000;
  font-weight: "bold";
  font-family: var(--ui-font);
  font-size: 12px;
}
.hint-arrow {
  position: relative;
  top: 3px;
  width: 16px;
  height: 16px;
  margin-left: 1px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.intro-hint {
  position: absolute;
  left: 20px;
  bottom: 18px;
  color: #000000;
  font-weight: "bold";
  font-family: var(--ui-font);
  font-size: 12px;
}

.about-star {
  position: absolute;
  z-index: 6;
  top: clamp(54px, 11%, 94px);
  right: clamp(12px, 3vw, 42px);
  width: clamp(118px, 14vw, 170px);
  aspect-ratio: 1;
  padding: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  filter: drop-shadow(4px 5px 0 #000);
  transform: rotate(5deg);
  transition:
    transform 0.08s ease,
    filter 0.08s ease;
}
.about-star-shape {
  position: absolute;
  z-index: 0;
  inset: 5%;
  width: 90%;
  height: 90%;
  overflow: visible;
  fill: #1279ca;
  stroke: #1279ca;
  stroke-width: 6;
  stroke-linejoin: round;
}
.about-star > span {
  position: relative;
  z-index: 1;
  width: 100%;
  font-size: clamp(12px, 0.9vw, 14px);
  /* font-weight: 700; */
  /* line-height: 1.05; */
}
.about-star-name {
  width: 100%;
  margin: -1px auto -3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  white-space: nowrap;
}
.about-star-logo {
  display: inline-block;
  width: 74%;
  max-width: 100px;
  height: auto;
  margin: 0;
  filter: invert(1);
}
.about-star-name b {
  flex: 0 0 auto;
  margin-left: -12px;
  font-size: 12px;
  line-height: 1;
}
.about-star small {
  display: block;
  margin-top: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.about-star:hover,
.about-star:focus-visible {
  outline: 0;
  filter: drop-shadow(5px 6px 0 #000);
  transform: rotate(2deg) scale(1.05);
}
.about-star:active {
  filter: drop-shadow(2px 2px 0 #000);
  transform: rotate(2deg) translate(2px, 3px);
}
.about-star[hidden] {
  display: none;
}

.palette-bar {
  min-height: 61px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 3px;
}
.current-colors {
  position: relative;
  flex: 0 0 54px;
  height: 45px;
  border: 2px inset var(--win-gray);
}
.current-colors span {
  position: absolute;
  width: 27px;
  height: 27px;
  border: 1px solid #000;
}
#secondary-swatch {
  left: 18px;
  top: 13px;
  background: #fff;
}
#primary-swatch {
  left: 7px;
  top: 4px;
  background: #808040;
}
.colors {
  display: grid;
  grid-template-columns: repeat(14, 18px);
  grid-template-rows: repeat(2, 18px);
  gap: 1px;
}
.color {
  position: relative;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 2px outset var(--win-gray);
  background: var(--swatch);
}
.color:active,
.color.is-active {
  border: 2px inset var(--win-gray);
}
.quick-actions {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.quick-actions button,
.dialog-actions button,
.send-button {
  min-width: 42px;
  height: 28px;
  padding: 0 8px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  background: var(--win-gray);
  box-shadow: 1px 1px 0 #000;
  text-decoration: none;
  color: #000;
}
.quick-actions button:active,
.dialog-actions button:active,
.send-button:active {
  border: 2px inset var(--win-gray);
  box-shadow: none;
}

.status-bar {
  min-height: 25px;
  display: grid;
  grid-template-columns: 1fr 150px 18px;
  gap: 3px;
}
.status-bar > div {
  min-width: 0;
  padding: 4px 5px;
  border: 1px inset var(--win-gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-bar .resize-grip {
  padding: 4px 1px 0;
  text-align: right;
  border: 0;
  color: #777;
}

.dialog-wrap {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.18);
}
.dialog-wrap[hidden] {
  display: none;
}
.dialog {
  width: min(480px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100svh - 40px);
  padding: 3px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--win-gray);
  border: 2px outset var(--win-gray);
  box-shadow: 7px 9px 0 rgba(0, 0, 0, 0.3);
}
.dialog .title-bar {
  min-height: 25px;
  flex: 0 0 auto;
}
.dialog-content {
  min-height: 0;
  margin: 10px;
  padding: 16px;
  flex: 1 1 auto;
  display: flex;
  gap: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 2px inset var(--win-gray);
  font-size: 14px;
  line-height: 1.55;
}
.dialog-content.stacked {
  display: block;
}
.dialog-content h2 {
  margin: 0 0 3px;
  font-family: var(--ui-font);
  font-size: 24px;
}
.dialog-content p {
  margin: 8px 0;
}
.about-content {
  gap: 14px;
  font-size: 13px;
  line-height: 1.45;
}
.about-content > div:last-child {
  min-width: 0;
}
.about-content p {
  margin: 6px 0;
}
.about-content .about-projects-prompt {
  margin-top: 12px;
  font-weight: 700;
}
.dialog-content .version {
  margin-top: 0;
  color: #666;
  font-size: 11px;
}
.about-logo-wrap {
  flex: 0 0 88px;
  width: 88px;
  align-self: flex-start;
  padding: 5px;
  background: #fff;
  border: 2px inset var(--win-gray);
}
.about-logo-wrap img {
  display: block;
  width: 100%;
  height: auto;
}
.dialog-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 10px 9px;
}
.dialog-actions button {
  min-width: 82px;
}
.win-link {
  color: #000080;
}
.send-button {
  display: inline-grid;
  place-items: center;
  min-width: 130px;
  margin-top: 10px;
}

.work-dialog {
  width: min(660px, 100%);
}
.dialog-toolbar {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px;
  align-items: center;
  padding: 4px 6px;
  border-bottom: 1px solid var(--win-shadow);
}
.dialog-toolbar div {
  padding: 4px 7px;
  background: #fff;
  border: 2px inset var(--win-gray);
  font-family: var(--ui-font);
}
.project-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.project-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px;
  color: #000;
  text-decoration: none;
  border: 1px solid transparent;
}
.project-list a:hover {
  color: #fff;
  background: #000080;
  border-color: #000080;
}
.project-list small {
  display: block;
  opacity: 0.7;
}
.project-list a > span:last-child {
  min-width: 0;
}
.project-list strong {
  display: block;
  overflow-wrap: normal;
  word-break: normal;
}
.folder-icon {
  color: #ffcf22;
  font-size: 30px;
  text-shadow: 1px 1px #795d00;
}
.project-thumb {
  flex: 0 0 52px;
  width: 52px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid #808080;
}
.win-folder-icon {
  position: relative;
  width: 39px;
  height: 28px;
  display: block;
  margin-top: 5px;
  background: #f4c430;
  border: 2px solid #5e4a00;
  box-shadow:
    inset 2px 2px #fff59d,
    inset -2px -2px #b8860b,
    1px 1px #000;
}
.win-folder-icon::before {
  content: "";
  position: absolute;
  left: -2px;
  top: -8px;
  width: 19px;
  height: 9px;
  background: #f4c430;
  border: 2px solid #5e4a00;
  border-bottom: 0;
  box-shadow: inset 2px 2px #fff59d;
}
.win-folder-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 4px;
  height: 3px;
  background: #ffe987;
  opacity: 0.9;
}
.win-folder-icon span {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 5px;
  height: 5px;
  background: #d39a0b;
}
.empty-projects {
  grid-column: 1 / -1;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #555;
}

/* Project viewer and Explorer archive */
.project-viewer-body {
  overflow: hidden;
  background: var(--win-gray);
  font-family: var(--ui-font);
  font-size: 12px;
}
.project-desktop {
  width: 100vw;
  height: 100dvh;
  padding: 0;
}
.project-window {
  width: 100%;
  height: 100%;
  padding: 3px;
  display: flex;
  flex-direction: column;
  background: var(--win-gray);
  border: 2px outset var(--win-gray);
}
.window-actions a {
  width: 22px;
  height: 21px;
  display: grid;
  place-items: center;
  color: #000;
  text-decoration: none;
  background: var(--win-gray);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}
.project-file-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #000080;
  background: #fff;
  border: 1px solid #000;
}
.project-toolbar {
  min-height: 37px;
  display: grid;
  grid-template-columns: 28px auto 1fr;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #808080;
}
.project-toolbar button {
  width: 28px;
  height: 26px;
  padding: 0;
  font-size: 18px;
  background: var(--win-gray);
  border: 2px outset var(--win-gray);
}
.project-toolbar > div {
  height: 25px;
  padding: 4px 7px;
  overflow: hidden;
  white-space: nowrap;
  background: #fff;
  border: 2px inset var(--win-gray);
  font-family: var(--ui-font);
}
.project-scroll-area {
  min-height: 0;
  flex: 1 1 0;
  overflow: hidden;
  background: #f5f1cf;
  border: 2px inset var(--win-gray);
}
.project-hero {
  display: grid;
  grid-template-columns: minmax(280px, 30%) minmax(0, 70%);
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #f5f1cf;
}
.project-heading {
  min-height: 0;
  padding: clamp(20px, 3vw, 46px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.project-heading > p,
.archive-content > header > p {
  margin: 0 0 14px;
  font: 700 12px/1.2 var(--ui-font);
  letter-spacing: 0.14em;
}
.project-heading h1 {
  max-width: 620px;
  margin: 0;
  font: 700 clamp(32px, 4vw, 64px)/0.9 var(--ui-font);
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}
.project-deck {
  max-width: 520px;
  margin-top: 12px;
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.35;
}
.project-deck p {
  margin: 0;
}
.project-featured {
  min-width: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
  border-left: 2px inset var(--win-gray);
}
.project-gallery-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  width: 100%;
  flex: 1 1 0;
  overflow: hidden;
}
.project-slide {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  display: none;
  overflow: hidden;
}
.project-slide.is-active {
  display: block;
}
.project-slide > img {
  display: block;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
}
.project-gallery-thumbs {
  min-width: 0;
  flex: 0 0 54px;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  overflow-x: auto;
  background: var(--win-gray);
  border-top: 2px outset var(--win-gray);
}
.project-gallery-thumb {
  width: 60px;
  height: 42px;
  flex: 0 0 60px;
  padding: 2px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 2px outset var(--win-gray);
}
.project-gallery-thumb.is-active {
  border: 2px inset var(--win-gray);
  outline: 1px dotted #000080;
  outline-offset: -5px;
}
.project-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-gallery-controls {
  min-height: 34px;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 4px;
  padding: 3px;
  background: var(--win-gray);
  border-top: 1px solid #fff;
}
.project-gallery-controls button {
  padding: 0;
  background: var(--win-gray);
  border: 2px outset var(--win-gray);
}
.project-gallery-controls button:active {
  border-style: inset;
}
.project-gallery-controls button:disabled {
  color: #808080;
  text-shadow: 1px 1px #fff;
}
.gallery-arrow {
  width: 14px;
  height: 14px;
  display: block;
  margin: auto;
  fill: #000;
  shape-rendering: crispEdges;
}
.project-gallery-controls button:disabled .gallery-arrow {
  fill: #808080;
  filter: drop-shadow(1px 1px 0 #fff);
}
.project-gallery-readout {
  min-width: 0;
  padding: 4px 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  background: #fff;
  border: 2px inset var(--win-gray);
}
.project-gallery-readout strong {
  flex: 0 0 auto;
}
.project-gallery-readout span {
  min-width: 0;
  overflow: hidden;
  color: #555;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.project-placeholder {
  display: grid;
  place-items: center;
  background-color: #c0c0c0;
  background-image:
    linear-gradient(45deg, #aaa 25%, transparent 25%),
    linear-gradient(-45deg, #aaa 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #aaa 75%),
    linear-gradient(-45deg, transparent 75%, #aaa 75%);
  background-size: 16px 16px;
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
}
.project-placeholder span {
  padding: 6px 9px;
  background: #fff;
  border: 1px solid #000;
  font-family: var(--ui-font);
}
.project-main {
  display: block;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(55px, 9vw, 130px) clamp(24px, 7vw, 110px);
}
.project-details {
  width: min(100%, 380px);
  max-height: none;
  margin-top: clamp(14px, 2.2vh, 24px);
  flex: 0 0 auto;
  overflow: visible;
  border: 2px outset var(--win-gray);
  background: var(--win-gray);
}
.project-details h2 {
  margin: 2px;
  padding: 5px 7px;
  color: #fff;
  background: #000080;
  font: 700 12px/1.2 var(--ui-font);
}
.project-details dl {
  margin: 0;
  padding: 8px;
  background: #fff;
  border: 2px inset var(--win-gray);
}
.project-details dl div {
  padding: 7px 4px;
  border-bottom: 1px dotted #999;
}
.project-details dl div:last-child {
  border: 0;
}
.project-details dt {
  margin-bottom: 3px;
  color: #666;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.project-details dd {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}
.project-live-button {
  min-height: 30px;
  margin: 9px;
  padding: 7px 9px;
  display: block;
  color: #000;
  text-align: center;
  text-decoration: none;
  background: var(--win-gray);
  border: 2px outset var(--win-gray);
}
.project-content {
  max-width: 820px;
  font-size: clamp(17px, 1.45vw, 22px);
  line-height: 1.65;
}
.project-content > :first-child {
  margin-top: 0;
}
.project-content h2 {
  margin: 1.6em 0 0.5em;
  font: 700 clamp(27px, 3vw, 48px)/1 var(--ui-font);
  letter-spacing: -0.025em;
}
.project-content h3 {
  font: 700 23px/1.2 var(--ui-font);
}
.project-content img {
  max-width: 100%;
  height: auto;
}
.project-content .wp-block-image,
.project-content .wp-block-gallery {
  margin-block: clamp(35px, 6vw, 80px);
}
.project-pagination {
  min-height: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border-top: 1px solid #fff;
}
.project-pagination div:last-child {
  text-align: right;
}
.project-pagination a {
  display: inline-block;
  padding: 6px 10px;
  color: #000;
  text-decoration: none;
  border: 2px outset var(--win-gray);
}
.project-status {
  flex: 0 0 25px;
}

.archive-content {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
  border: 2px inset var(--win-gray);
}
.explorer-sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--win-gray);
  border-right: 2px outset var(--win-gray);
}
.explorer-pane-title {
  padding: 5px 7px;
  color: #fff;
  background: #000080;
  font-weight: 700;
}
.folder-tree {
  flex: 1;
  margin: 0;
  padding: 9px 5px;
  list-style: none;
  overflow-y: auto;
  background: #fff;
  border: 2px inset var(--win-gray);
}
.folder-tree li {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 5px;
  white-space: nowrap;
}
.folder-tree .tree-child {
  padding-left: 31px;
}
.folder-tree .is-selected {
  color: #fff;
  background: #000080;
}
.folder-tree a,
.folder-tree button {
  width: 100%;
  min-height: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  text-decoration: none;
}
.folder-tree li:has(a):hover,
.folder-tree li:has(a):focus-within,
.folder-tree li:has(button):hover,
.folder-tree li:has(button):focus-within {
  color: #fff;
  background: #000080;
}
.folder-tree a:focus,
.folder-tree button:focus {
  outline: 1px dotted currentColor;
  outline-offset: -2px;
}
.tree-toggle {
  width: 12px;
  height: 12px;
  display: grid;
  place-items: center;
  border: 1px solid #777;
  line-height: 10px;
}
.tree-computer {
  color: #777;
  font-size: 17px;
}
.mini-folder {
  position: relative;
  width: 17px;
  height: 13px;
  display: inline-block;
  background: #f4c430;
  border: 1px solid #5e4a00;
  box-shadow: inset 1px 1px #fff59d;
}
.mini-folder::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -4px;
  width: 8px;
  height: 4px;
  background: #f4c430;
  border: 1px solid #5e4a00;
  border-bottom: 0;
}
.title-folder-icon {
  flex: 0 0 17px;
  margin: 3px 1px 0;
}
.explorer-sidebar-info {
  min-height: 110px;
  padding: 12px;
  border-top: 2px outset var(--win-gray);
}
.explorer-sidebar-info strong,
.explorer-sidebar-info span {
  display: block;
}
.explorer-sidebar-info span {
  margin-top: 3px;
  color: #555;
}
.explorer-sidebar-info p {
  margin: 18px 0 0;
}
.explorer-files {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.explorer-files-header {
  min-height: 58px;
  padding: 9px 12px;
  border-bottom: 1px solid #aaa;
}
.explorer-files-header h1 {
  margin: 0 0 3px;
  font: 700 18px/1.1 var(--ui-font);
}
.explorer-files-header span {
  color: #555;
}
.archive-grid {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
  align-content: start;
  gap: 22px 12px;
  padding: 24px 18px;
  overflow-y: auto;
}
.archive-project {
  min-width: 0;
  color: #000;
  text-align: center;
  text-decoration: none;
}
.archive-project-icon {
  height: 65px;
  display: grid;
  place-items: center;
}
.archive-win-folder {
  transform: scale(1.45);
  transform-origin: center;
}
.archive-project h2 {
  display: inline-block;
  max-width: 100%;
  margin: 4px 0 2px;
  padding: 2px 4px;
  overflow: hidden;
  font: 400 12px/1.2 var(--ui-font);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.archive-project:hover h2,
.archive-project:focus h2 {
  color: #fff;
  background: #000080;
}
.archive-project p {
  margin: 1px 4px;
  overflow: hidden;
  color: #666;
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.archive-project:focus {
  outline: 1px dotted #000;
  outline-offset: 2px;
}
.archive-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-top: 80px;
  color: #555;
}
.explorer-pagination {
  display: flex;
  justify-content: space-between;
  padding: 5px;
  border-top: 1px solid #aaa;
}
.explorer-pagination a {
  padding: 4px 8px;
  color: #000;
  text-decoration: none;
  background: var(--win-gray);
  border: 2px outset var(--win-gray);
}

.desktop-footer {
  display: none;
}

/* Tablet only: stack the project panels and preserve the complete image. */
@media (min-width: 761px) and (max-width: 900px) {
  .single-oded_project.project-viewer-body {
    overflow-y: auto;
  }
  .single-oded_project .project-desktop,
  .single-oded_project .project-window {
    height: auto;
    min-height: 100svh;
  }
  .single-oded_project .project-scroll-area {
    flex: none;
    overflow: visible;
  }
  .single-oded_project .project-hero {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  .single-oded_project .project-heading {
    padding: 32px 42px;
  }
  .single-oded_project .project-heading h1 {
    font-size: clamp(40px, 7vw, 62px);
  }
  .single-oded_project .project-details {
    width: min(100%, 480px);
  }
  .single-oded_project .project-featured {
    height: auto;
    min-height: 380px;
    display: flex;
    background: transparent;
    border-left: 0;
    border-top: 2px inset var(--win-gray);
  }
  .single-oded_project .project-gallery-stage {
    height: min(62svh, 620px);
    flex: none;
  }
  .single-oded_project .project-slide > img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
  }
}

@media (max-width: 760px) {
  .desktop {
    min-height: 100svh;
    padding: 0;
    align-items: stretch;
  }
  .paint-window {
    height: 100svh;
    min-height: 0;
    width: 100%;
    border-width: 0;
    box-shadow: none;
  }
  .title-bar {
    min-height: 26px;
  }
  .paint-window {
    overflow: hidden;
  }
  .paint-body {
    min-height: 0;
    flex: 1 1 0;
    grid-template-columns: 58px 1fr;
    overflow: hidden;
  }
  .workspace {
    min-height: 0;
  }
  .canvas-frame {
    height: 100%;
    min-height: 0;
  }
  .palette-bar,
  .status-bar {
    flex-shrink: 0;
  }
  .toolbox {
    grid-template-columns: repeat(2, 27px);
  }
  .tool {
    width: 27px;
    height: 32px;
    font-size: 20px;
  }
  .tool-icon {
    transform: scale(1.08);
  }
  .tool-options {
    padding: 4px 3px;
  }
  .tool-options span {
    width: 38px;
  }
  .palette-bar {
    flex-wrap: wrap;
    gap: 3px;
    padding-bottom: 3px;
  }
  .colors {
    grid-template-columns: repeat(14, 15px);
  }
  .color {
    width: 15px;
    height: 17px;
  }
  .current-colors {
    flex-basis: 45px;
  }
  #primary-swatch {
    left: 3px;
  }
  #secondary-swatch {
    left: 10px;
  }
  .quick-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .quick-actions button {
    height: 24px;
  }
  .status-bar {
    grid-template-columns: 1fr 90px;
  }
  .resize-grip {
    display: none;
  }
  .menu-bar > a,
  .menu-bar > button {
    padding: 0 6px;
  }
  .canvas-logo-overlay {
    width: min(82%, 560px);
  }
  .logo-space {
    width: min(82%, 560px);
  }
  .nav-hint {
    left: 12px;
    top: 12px;
    font-size: 11px;
  }
  .intro-hint {
    left: 12px;
    bottom: 12px;
    font-size: 11px;
  }
  .about-star {
    top: 44px;
    right: 8px;
    width: 108px;
    padding: 16px;
  }
  .about-star,
  .about-star:hover,
  .about-star:focus-visible,
  .about-star:active {
    filter: none;
  }
  .about-star > span {
    font-size: 8px;
  }
  .about-star-name {
    margin-block: -2px -3px;
  }
  .about-star-logo {
    width: 76%;
  }
  .about-star-name b {
    margin-left: -8px;
    font-size: 12px;
  }
  .about-star small {
    margin-top: 0;
    font-size: 7px;
  }
  .desktop-footer {
    display: none;
  }
  .dialog-wrap {
    padding: 8px;
  }
  .dialog {
    max-height: calc(100dvh - 16px);
  }
  .dialog-content {
    min-height: 0;
    margin: 6px;
    padding: 12px;
    overflow-y: auto;
  }
  .about-content {
    gap: 10px;
    font-size: 12px;
    line-height: 1.4;
  }
  .about-logo-wrap {
    flex-basis: 68px;
    width: 68px;
    padding: 4px;
  }
  .work-dialog {
    width: 100%;
  }
  .work-dialog .dialog-content {
    flex: 1;
  }
  .dialog-toolbar {
    padding: 3px 5px;
  }
  .dialog-toolbar div {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .project-list {
    grid-template-columns: 1fr;
    gap: 3px;
    margin-top: 8px;
  }
  .project-list a {
    min-width: 0;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 7px 5px;
  }
  .project-list strong,
  .project-list small {
    white-space: normal;
  }
  .project-list .project-thumb {
    grid-row: 1;
  }
  .project-viewer-body {
    overflow-y: auto;
  }
  .single-oded_project.project-viewer-body {
    overflow: hidden;
    background: var(--win-gray);
  }
  .single-oded_project .project-desktop {
    height: 100svh;
    min-height: 0;
  }
  .single-oded_project .project-window {
    height: 100svh;
    min-height: 0;
  }
  .project-scroll-area {
    min-height: 0;
    flex: none;
    overflow: visible;
  }
  .single-oded_project .project-scroll-area {
    flex: 1 1 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }
  .project-hero {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }
  .single-oded_project .project-hero {
    height: auto;
    display: grid;
    grid-template-rows: auto auto;
    row-gap: 12px;
    padding-bottom: 20px;
    background: var(--win-gray);
  }
  .project-heading {
    padding: 32px 22px;
    overflow: visible;
  }
  .single-oded_project .project-heading {
    justify-content: flex-start;
    padding-block: 28px 32px;
    overflow: visible;
    background: #f5f1cf;
  }
  .project-heading h1 {
    font-size: clamp(34px, 13vw, 58px);
  }
  .project-details {
    width: 100%;
    max-height: none;
    margin-top: clamp(28px, 4vh, 42px);
  }
  .project-featured {
    width: 100%;
    height: auto;
    min-height: 0;
    border-left: 0;
    border-top: 2px inset var(--win-gray);
  }
  .single-oded_project .project-featured {
    height: auto;
    display: flex;
    padding: 0 0 12px;
    background: #111827;
  }
  .single-oded_project .project-gallery-stage {
    width: 100%;
    aspect-ratio: 16 / 10;
    flex: none;
    padding: 12px 10px;
  }
  .single-oded_project .project-slide > img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
  }
  .project-gallery-thumbs {
    justify-content: flex-start;
  }
  .single-oded_project .project-pagination {
    display: none;
  }
  .project-main {
    padding: 45px 20px 70px;
  }
  .archive-content {
    grid-template-columns: 1fr;
  }
  .explorer-sidebar {
    display: none;
  }
  .post-type-archive-oded_project.project-viewer-body {
    height: 100svh;
    overflow: hidden;
  }
  .post-type-archive-oded_project .project-desktop,
  .post-type-archive-oded_project .project-window {
    height: 100svh;
    min-height: 0;
  }
  .post-type-archive-oded_project .archive-content,
  .post-type-archive-oded_project .explorer-files {
    min-height: 0;
  }
  .explorer-files-header {
    min-height: 46px;
    padding: 6px 9px;
  }
  .explorer-files-header h1 {
    font-size: 16px;
  }
  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 4px;
    padding: 10px 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .archive-project-icon {
    height: 49px;
  }
  .archive-win-folder {
    transform: scale(1.18);
  }
  .archive-project h2 {
    margin-top: 1px;
  }
  .project-pagination {
    grid-template-columns: 1fr;
  }
}

/* Prevent accidental double-tap zoom and selection on the touch homepage. */
@media (hover: none) and (pointer: coarse) {
  body.oded-home,
  body.oded-home * {
    touch-action: manipulation;
  }
  body.oded-home {
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
  }
  body.oded-home input,
  body.oded-home textarea,
  body.oded-home select,
  body.oded-home [contenteditable="true"] {
    -webkit-user-select: text;
    user-select: text;
  }
}

/* Newer iPhone Safari floats its bottom controls over the page viewport. Keep
   the Explorer window above them while leaving the project pane scrollable. */
@media (max-width: 760px) and (hover: none) and (pointer: coarse) {
  @supports (-webkit-touch-callout: none) {
    .post-type-archive-oded_project .project-desktop {
      height: 100svh;
      padding-bottom: max(78px, env(safe-area-inset-bottom));
    }
    .post-type-archive-oded_project .project-window {
      height: 100%;
    }
  }
}

@media (max-width: 760px) and (hover: none) and (pointer: coarse) and (orientation: landscape) {
  @supports (-webkit-touch-callout: none) {
    .post-type-archive-oded_project .project-desktop {
      padding-bottom: max(48px, env(safe-area-inset-bottom));
    }
  }
}

/* WordPress adds a 46px mobile admin toolbar above the viewport when logged in. */
@media (max-width: 782px) {
  body.admin-bar .desktop {
    min-height: calc(100svh - 46px);
    height: calc(100svh - 46px);
  }
  body.admin-bar .paint-window {
    height: calc(100svh - 46px);
  }
  body.admin-bar.single-oded_project .project-desktop,
  body.admin-bar.single-oded_project .project-window,
  body.admin-bar.post-type-archive-oded_project,
  body.admin-bar.post-type-archive-oded_project .project-desktop {
    height: calc(100svh - 46px);
  }
  body.admin-bar.post-type-archive-oded_project .project-window {
    height: 100%;
  }
}

@media (max-width: 430px) {
  .menu-bar > a,
  .menu-bar > button {
    padding-inline: 5px;
  }
  .canvas-intro > p:not(.intro-kicker) {
    font-size: 15px;
  }
  .work-dialog .dialog-content h2 {
    font-size: 21px;
  }
  .project-toolbar {
    grid-template-columns: 26px auto minmax(0, 1fr);
  }
  .project-toolbar > div {
    min-width: 0;
    text-overflow: ellipsis;
  }
  .project-pagination {
    display: none;
  }
  .archive-grid {
    gap: 6px 2px;
    padding: 8px 5px;
  }
}

@media (max-height: 600px) {
  .dialog-wrap {
    padding: 6px;
  }
  .dialog {
    max-height: calc(100svh - 12px);
  }
  .about-content {
    font-size: 11px;
    line-height: 1.35;
  }
  .about-logo-wrap {
    flex-basis: 58px;
    width: 58px;
  }
  .paint-window {
    height: 100dvh;
    min-height: 0;
  }
  .desktop {
    padding-block: 0;
  }
  .tool-options {
    margin-top: 3px;
    padding-block: 2px;
  }
  .tool-options button {
    height: 21px;
  }
  .palette-bar {
    min-height: 44px;
  }
  .current-colors {
    height: 38px;
  }
}
