/* Amina's Frame Fellowship Exhibit: shared styles for the welcome, world and zine pages.
   1990s multimedia CD-ROM: cream desktop, charcoal stage, Win95 plastic windows,
   muted red / lavender / cyan / butter accents. Same palette as THE PREDICTOR. */
:root {
  --cream: #f2ecdf;
  --ivory: #f8f3e7;
  --charcoal: #1b181d;
  --ink: #21141f;
  --face: #d8cfba;
  --hi: #fbf6e8;
  --lo: #8a7f70;
  --teal-d: #3f7572;
  --red: #b5434f;
  --lavender: #b4a9dc;
  --lavender-d: #6f639e;
  --cyan: #8fd6d8;
  --butter: #efd982;
  --font: "Arimo", "Liberation Sans", Arial, Helvetica, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", ui-monospace, monospace;
  --shadow-text: 1px 1px 0 var(--ink), 2px 2px 0 var(--ink), 3px 3px 0 var(--ink);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 15px/1.55 var(--font);
  background-color: var(--cream);
  background-image: radial-gradient(rgba(33, 20, 31, .09) .7px, transparent .8px);
  background-size: 4px 4px;
  -webkit-font-smoothing: antialiased;
}
body.dark {
  background-color: var(--charcoal);
  background-image: var(--grain),
    radial-gradient(ellipse 70% 62% at 50% 45%, #241f27 0%, rgba(27, 24, 29, .96) 55%, rgba(27, 24, 29, 0) 100%),
    repeating-radial-gradient(circle at 0% 110%, transparent 0 26px, rgba(180, 169, 220, .14) 26px 27px),
    repeating-radial-gradient(circle at 105% -10%, transparent 0 30px, rgba(180, 169, 220, .10) 30px 31px);
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- Win95 plastic ---------- */
.window {
  background: var(--face); border: 1px solid var(--ink); padding: 4px; min-width: 0;
  box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo), 8px 8px 0 rgba(33, 20, 31, .45);
}
.titlebar { display: flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 4px 0 8px; background: var(--teal-d); color: var(--ivory); }
.titlebar h1, .titlebar h2, .titlebar .t { flex: 1; min-width: 0; font: 700 13px/28px var(--font); letter-spacing: .05em; text-shadow: 1px 1px 0 var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.close {
  flex: none; width: 26px; height: 22px; display: grid; place-items: center; cursor: pointer; text-decoration: none;
  font: 700 15px/1 var(--font); color: var(--ink); background: var(--face); border: 1px solid var(--ink);
  box-shadow: inset 1px 1px 0 var(--hi), inset -1px -1px 0 var(--lo);
}
.close:hover { background: var(--butter); }
.menubar { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 5px 8px; font-size: 13px; }
.menubar a { text-decoration: none; }
.menubar a:hover { text-decoration: underline; }
.body { background: var(--ivory); padding: clamp(16px, 3vw, 28px); box-shadow: inset 2px 2px 0 var(--lo), inset -2px -2px 0 var(--hi); }
.status { display: flex; gap: 3px; padding-top: 4px; font-size: 11px; letter-spacing: .03em; }
.status span { flex: 1 1 auto; padding: 1px 8px; box-shadow: inset 1px 1px 0 var(--lo), inset -1px -1px 0 var(--hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.btn {
  font: 700 14px/1.2 var(--font); color: var(--ink); text-decoration: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 40px; padding: 8px 16px; background: var(--face); border: 1px solid var(--ink); border-radius: 0;
  box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo);
}
.btn:hover { background: #e2dac7; }
.btn:active { box-shadow: inset 2px 2px 0 var(--lo), inset -2px -2px 0 var(--hi); }
.btn-primary { background: var(--butter); box-shadow: inset 2px 2px 0 #fbf0bf, inset -2px -2px 0 #a48f3e, 0 0 0 2px var(--face), 0 0 0 3px var(--ink); }
.btn-primary:hover { background: #f4e39d; }
:focus-visible { outline: 2px dotted var(--ink); outline-offset: 2px; }
.dark :focus-visible { outline-color: var(--butter); }

/* ---------- Welcome (/frame) ---------- */
.welcome { min-height: 100vh; display: grid; place-items: center; padding-block: 32px; }
.welcome .window { width: 100%; max-width: 760px; }
.stage {
  background-color: var(--charcoal); background-image: var(--grain); color: var(--ivory);
  border: 1px solid var(--ink); box-shadow: inset 3px 3px 0 rgba(0, 0, 0, .45), 0 0 0 2px var(--lo), 0 0 0 3px var(--hi);
  margin: 3px; padding: clamp(20px, 4vw, 36px); display: flex; flex-direction: column; gap: 10px; text-align: center; align-items: center;
}
.stage h2 { font: 700 clamp(28px, 6.4vw, 54px)/1.05 var(--font); color: var(--butter); text-shadow: var(--shadow-text); text-wrap: balance; }
.stage p { font: 700 12px/1.4 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); text-shadow: 1px 1px 0 var(--ink); }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.choice {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 16px; text-decoration: none; color: var(--ink);
  background: var(--face); border: 1px solid var(--ink); box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo), 5px 5px 0 rgba(33, 20, 31, .4);
}
.choice:hover { background: var(--butter); }
.choice:active { box-shadow: inset 2px 2px 0 var(--lo), inset -2px -2px 0 var(--hi); }
.choice .px { width: 64px; height: 64px; }
.choice strong { font: 700 clamp(17px, 2.6vw, 22px)/1.15 var(--font); letter-spacing: .06em; }
.choice span { font-size: 13px; }
@media (max-width: 560px) { .choices { grid-template-columns: 1fr; } }

/* ---------- Pixel icons ---------- */
.px { display: block; image-rendering: pixelated; shape-rendering: crispEdges; }

/* ---------- World (/frame/world) ---------- */
.world { min-height: 100vh; display: flex; flex-direction: column; }
.world-head { padding-block: 20px 8px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; justify-content: space-between; }
.world-head h1 { font: 700 clamp(20px, 3.4vw, 30px)/1.1 var(--font); letter-spacing: .02em; }
.world-head p { font: 12px var(--mono); }
.desktop { flex: 1; padding-block: 16px 100px; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 22px 12px; align-content: start; max-width: 980px; width: 100%; margin: 0 auto; }
.icon {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 6px; cursor: pointer;
  background: none; border: 1px dotted transparent; font: inherit; color: var(--ink); text-align: center; text-decoration: none;
}
.icon .px { width: 64px; height: 64px; filter: drop-shadow(3px 3px 0 rgba(33, 20, 31, .35)); }
.icon span { font: 700 12.5px/1.25 var(--font); padding: 2px 5px; }
.icon small { font: 10.5px/1.2 var(--mono); opacity: .7; }
.icon:hover span, .icon:focus-visible span { background: var(--teal-d); color: var(--ivory); }
.icon:focus-visible { outline: none; border-color: var(--ink); }

.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  padding: 6px max(10px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
  background: var(--face); border-top: 1px solid var(--ink); box-shadow: inset 0 2px 0 var(--hi);
}
.taskbar .btn { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.taskbar .clock { margin-left: auto; font: 12px var(--mono); padding: 4px 10px; box-shadow: inset 1px 1px 0 var(--lo), inset -1px -1px 0 var(--hi); }

/* Open window (one at a time) */
.overlay { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px)); background: rgba(27, 24, 29, .35); }
.overlay[hidden] { display: none !important; }
.overlay .window { width: 100%; max-width: 820px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; }
.overlay .body { overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 560px) {
  .overlay { padding: 0; place-items: stretch; }
  .overlay .window { max-height: none; height: 100%; box-shadow: none; }
}
.intro { font-size: 16px; max-width: 64ch; }
.hero { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 560px) { .hero { grid-template-columns: 1fr; } }
.items { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--ink); }
.item { display: grid; grid-template-columns: minmax(0, 168px) minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px dotted var(--ink); }
.item.no-media { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 560px) { .item { grid-template-columns: 1fr; } }
.item h3 { font: 700 18px/1.25 var(--font); }
.meta { font: 11.5px/1.4 var(--mono); color: var(--teal-d); text-transform: uppercase; letter-spacing: .06em; }
.item p { margin-top: 4px; max-width: 60ch; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.links .btn { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.media { aspect-ratio: 4 / 3; width: 100%; max-width: 100%; border: 1px solid var(--ink); background: var(--charcoal); overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.ph {
  aspect-ratio: 4 / 3; width: 100%; max-width: 100%; display: grid; place-items: center; text-align: center; padding: 10px;
  border: 2px dashed var(--lavender-d); background: repeating-linear-gradient(45deg, #ece6f6 0 8px, #f4f0fa 8px 16px);
  font: 600 10.5px/1.35 var(--mono); color: var(--lavender-d); letter-spacing: .04em;
}
.todo { margin-top: 10px; border: 1px dashed var(--red); color: var(--red); padding: 6px 10px; font: 12px/1.4 var(--mono); }
.todo::before { content: "TO ADD · "; font-weight: 600; }
body.hide-todos .todo { display: none; }

.email-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; background: var(--charcoal); color: var(--ivory); border: 1px solid var(--ink); }
.email-row .addr { font: 700 clamp(18px, 3.4vw, 26px)/1.2 var(--font); color: var(--butter); text-shadow: 1px 1px 0 var(--ink), 2px 2px 0 var(--ink); user-select: all; word-break: break-all; }
.copy-msg { font: 12px var(--mono); min-height: 1.2em; }

/* ---------- Zine (/frame/zine) ---------- */
.zine-wrap { max-width: 980px; margin: 0 auto; padding-block: 24px 48px; }
.spreads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 640px) { .spreads { grid-template-columns: 1fr; } }
.page { background: var(--ivory); border: 1px solid var(--ink); box-shadow: 6px 6px 0 rgba(33, 20, 31, .35); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.page:nth-child(4n+2), .page:nth-child(4n+3) { background: #f1ecf8; }
.page h2 { font: 700 clamp(26px, 4.6vw, 40px)/1 var(--font); color: var(--red); letter-spacing: -.01em; }
.page .num { font: 11px var(--mono); opacity: .7; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
