/* ===== aafia.os — pastel Y2K desktop ===== */

:root {
  --ink: #2a2438;
  --ink-soft: #4a4060;
  --paper: #fffefb;
  --paper-2: #f5f1e8;

  --sky-1: #c9deea;    /* baby blue */
  --sky-2: #e6d9ee;    /* lavender */
  --sky-3: #ffd9e6;    /* soft pink */
  --silver: #e3e1de;
  --silver-2: #c8c5c0;

  --accent-pink: #ff9ec6;
  --accent-blue: #8fb8d8;
  --accent-lav:  #b9a3d8;
  --accent-yellow: #ffe48a;
  --accent-mint: #a8d8c0;
  --accent-coral: #ff8f7a;

  --shadow-hard: 3px 3px 0 var(--ink);
  --shadow-soft: 0 8px 24px rgba(42,36,56,0.18);

  --font-display: 'DM Serif Display', 'Times New Roman', serif;
  --font-ui: 'Pixelify Sans', 'Courier New', monospace;
  --font-body: 'Quicksand', system-ui, sans-serif;
  --font-hand: 'Caveat', cursive;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  overflow: hidden;
  user-select: none;
}

body {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><path d='M3 2 L3 17 L7 13 L10 20 L13 19 L10 12 L16 12 Z' fill='%23fffefb' stroke='%232a2438' stroke-width='1.6' stroke-linejoin='round'/></svg>") 2 2, auto;
  background: var(--sky-1);
}

/* ===== wallpaper ===== */
#wallpaper {
  position: fixed; inset: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(255,217,230,0.6), transparent 38%),
    radial-gradient(circle at 82% 76%, rgba(230,217,238,0.7), transparent 42%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.3), transparent 60%),
    linear-gradient(160deg, var(--sky-1) 0%, var(--sky-2) 100%);
  z-index: 0;
}
#wallpaper::after {
  content:''; position:absolute; inset:0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.45) 1.2px, transparent 1.4px);
  background-size: 22px 22px;
  opacity: 0.55;
  pointer-events: none;
}
.wp-deco {
  position: absolute;
  pointer-events: none;
  opacity: 0.55;
  animation: float 8s ease-in-out infinite;
}
.wp-deco.d2 { animation-delay: -2s; animation-duration: 11s; }
.wp-deco.d3 { animation-delay: -4s; animation-duration: 9s; }
.wp-deco.d4 { animation-delay: -6s; animation-duration: 13s; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(6deg); }
}

/* ===== boot splash ===== */
#boot {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--ink);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 18px;
  font-family: var(--font-ui);
  transition: opacity .6s ease;
}
#boot.gone { opacity: 0; pointer-events: none; }
#boot .logo {
  font-family: var(--font-display);
  font-size: 64px;
  color: var(--paper);
  letter-spacing: 1px;
}
#boot .logo .dot { color: var(--accent-pink); }
#boot .tagline { font-size: 16px; opacity: .7; }
#boot .bar {
  width: 240px; height: 14px; border: 2px solid var(--paper);
  position: relative; overflow: hidden;
}
#boot .bar > div {
  position: absolute; left:0; top:0; bottom:0; width:0%;
  background: repeating-linear-gradient(45deg, var(--accent-pink) 0 8px, var(--accent-lav) 8px 16px);
  animation: bootfill 1.8s ease forwards;
}
@keyframes bootfill { to { width: 100%; } }
#boot .hint { font-size: 12px; opacity: .5; margin-top:6px; }

/* ===== desktop & icons ===== */
#desktop {
  position: fixed; inset: 0 0 44px 0;
  z-index: 10;
  padding: 18px;
}
.icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 96px);
  grid-auto-rows: 96px;
  gap: 4px 8px;
  width: 304px;  /* three columns of icons */
}
.dicon {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  padding: 6px 4px;
  border: 1.5px dashed transparent;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
}
.dicon:hover { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.5); }
.dicon.selected { background: rgba(143,184,216,0.35); border-color: rgba(42,36,56,0.4); }
.dicon .glyph {
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(1px 1px 0 rgba(42,36,56,0.18));
}
.dicon .glyph svg { width: 100%; height: 100%; }
.dicon .name {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--ink);
  text-align: center;
  line-height: 1.1;
  padding: 1px 4px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  word-break: normal;
  overflow-wrap: break-word;
  width: 88px;
}
.dicon.selected .name {
  background: var(--ink); color: var(--paper);
  text-shadow: none; border-radius: 2px;
}
.dicon .badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--accent-pink);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 9px;
  padding: 1px 5px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  transform: rotate(8deg);
}

/* ===== windows ===== */
#windows { position: fixed; inset: 0 0 44px 0; z-index: 20; pointer-events: none; }
.win {
  position: absolute;
  pointer-events: auto;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: var(--shadow-hard), var(--shadow-soft);
  display: flex; flex-direction: column;
  min-width: 280px; min-height: 180px;
  animation: winpop .22s cubic-bezier(.3,1.4,.5,1);
}
@keyframes winpop {
  from { transform: scale(.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.win.minimized { display: none; }
.win.maximized {
  top: 12px !important; left: 12px !important;
  width: calc(100vw - 24px) !important;
  height: calc(100vh - 68px) !important;
}
.win .titlebar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 10px;
  border-bottom: 2px solid var(--ink);
  border-radius: 8px 8px 0 0;
  font-family: var(--font-ui);
  font-size: 14px;
  cursor: grab;
  background: linear-gradient(180deg, var(--accent-blue), color-mix(in srgb, var(--accent-blue) 80%, white));
}
.win.t-lav .titlebar { background: linear-gradient(180deg, var(--accent-lav), color-mix(in srgb, var(--accent-lav) 80%, white)); }
.win.t-pink .titlebar { background: linear-gradient(180deg, var(--accent-pink), color-mix(in srgb, var(--accent-pink) 70%, white)); }
.win.t-yellow .titlebar { background: linear-gradient(180deg, var(--accent-yellow), color-mix(in srgb, var(--accent-yellow) 70%, white)); }
.win.t-mint .titlebar { background: linear-gradient(180deg, var(--accent-mint), color-mix(in srgb, var(--accent-mint) 70%, white)); }
.win.t-coral .titlebar { background: linear-gradient(180deg, var(--accent-coral), color-mix(in srgb, var(--accent-coral) 70%, white)); }
.win.t-silver .titlebar { background: linear-gradient(180deg, var(--silver), var(--silver-2)); }
.win:not(.focused) .titlebar { filter: saturate(.4) brightness(1.05); cursor: grab; }
.win .tb-icon { width: 18px; height: 18px; flex-shrink: 0; }
.win .tb-title { flex: 1; font-weight: 700; letter-spacing: .3px; }
.win .tb-btns { display: flex; gap: 4px; }
.win .tb-btn {
  width: 22px; height: 20px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border-radius: 3px;
  padding: 0;
}
.win .tb-btn:hover { background: var(--accent-yellow); }
.win .tb-btn.close:hover { background: var(--accent-coral); color: var(--paper); }
.win .body {
  flex: 1; overflow: auto;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}
.win .body::-webkit-scrollbar { width: 12px; }
.win .body::-webkit-scrollbar-track { background: var(--paper-2); }
.win .body::-webkit-scrollbar-thumb {
  background: var(--accent-lav); border: 2px solid var(--paper-2); border-radius: 4px;
}

/* shared body styles */
.body h1, .body h2, .body h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: .3px; }
.body h1 { font-size: 32px; margin: 0 0 4px; line-height: 1.1; }
.body h2 { font-size: 22px; margin: 14px 0 6px; }
.body h3 { font-size: 17px; margin: 10px 0 4px; }
.body p { margin: 6px 0 10px; }
.body a { color: var(--accent-lav); text-decoration: underline wavy; text-underline-offset: 3px; }
.body a:hover { color: var(--accent-pink); }
.body .meta {
  font-family: var(--font-ui);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ink-soft);
}
.body .kbd {
  font-family: var(--font-ui); font-size: 11px;
  border: 1.5px solid var(--ink); border-radius: 3px;
  padding: 1px 5px; background: var(--paper-2);
  box-shadow: 1px 1px 0 var(--ink);
}
.body .chip {
  display: inline-block;
  font-family: var(--font-ui); font-size: 11px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 1px 8px; margin: 0 4px 4px 0;
  background: var(--paper);
}
.body .chip.tech { background: var(--accent-blue); }
.body .chip.art  { background: var(--accent-pink); }
.body .chip.words{ background: var(--accent-yellow); }
.body .chip.thing{ background: var(--accent-mint); }
.body .chip.poem { background: var(--accent-lav); }

/* ===== taskbar ===== */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: 44px;
  z-index: 100;
  background: linear-gradient(180deg, var(--silver) 0%, var(--silver-2) 100%);
  border-top: 2px solid var(--ink);
  display: flex; align-items: center; gap: 6px;
  padding: 0 8px;
  font-family: var(--font-ui);
}
#start-btn {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-ui); font-size: 16px; font-weight: 700;
  border: 2px solid var(--ink);
  background: linear-gradient(180deg, var(--accent-pink), color-mix(in srgb, var(--accent-pink) 70%, white));
  color: var(--ink);
  padding: 4px 14px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
#start-btn:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
#start-btn.active { transform: translate(1px,1px); box-shadow: 1px 1px 0 var(--ink); background: var(--accent-lav); }
#start-btn .sparkle { font-family: var(--font-display); font-size: 16px; }

#window-list {
  display: flex; gap: 4px;
  flex: 1; min-width: 0;
  margin: 0 8px;
  overflow: hidden;
}
.wl-item {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-ui); font-size: 13px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  max-width: 180px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 1px 1px 0 var(--ink);
}
.wl-item:hover { background: var(--accent-yellow); }
.wl-item.active { background: var(--accent-blue); transform: translate(1px,1px); box-shadow: 0 0 0 var(--ink); }
.wl-item svg { width: 14px; height: 14px; flex-shrink: 0; }

#tray {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto;
  border-left: 1.5px solid var(--silver-2);
  padding-left: 10px;
  height: 28px;
}
.tray-item {
  font-family: var(--font-ui);
  font-size: 12px;
  display: flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border: 1.5px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}
.tray-item:hover { border-color: var(--ink); background: var(--paper); }
.tray-item.toggled { background: var(--accent-mint); border-color: var(--ink); }
#now-playing { max-width: 220px; overflow: hidden; }
#now-playing .np-track { display: inline-flex; white-space: nowrap; gap: 30px; padding-right: 30px; animation: np-marquee 22s linear infinite; }
#now-playing .np-track span { flex: none; }
@keyframes np-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
#clock { font-weight: 700; }

/* ===== start menu ===== */
#start-menu {
  position: fixed; left: 8px; bottom: 50px;
  width: 280px;
  z-index: 200;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 8px 8px 4px 4px;
  box-shadow: var(--shadow-hard), 0 -8px 24px rgba(42,36,56,0.2);
  transform-origin: bottom left;
  transform: scale(0);
  opacity: 0;
  transition: transform .18s cubic-bezier(.3,1.4,.5,1), opacity .12s ease;
}
#start-menu.open { transform: scale(1); opacity: 1; }
#start-menu .sm-header {
  background: linear-gradient(90deg, var(--accent-lav), var(--accent-pink));
  border-bottom: 2px solid var(--ink);
  padding: 10px 12px;
  border-radius: 6px 6px 0 0;
  display: flex; align-items: center; gap: 10px;
  color: var(--ink);
}
#start-menu .sm-header .who {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
}
#start-menu .sm-header .who small {
  display: block; font-family: var(--font-ui); font-size: 11px;
  letter-spacing: 1px; margin-top: 3px; opacity: .8;
}
#start-menu .sm-avatar {
  width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 50%;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 22px;
}
#start-menu .sm-list { padding: 6px 4px; }
.sm-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px;
  font-family: var(--font-ui); font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
}
.sm-item:hover { background: var(--accent-yellow); }
.sm-item svg { width: 18px; height: 18px; }
.sm-item .sub { margin-left: auto; font-size: 11px; color: var(--ink-soft); }
.sm-divider { height: 1.5px; background: var(--silver-2); margin: 6px 8px; border-radius:1px; }

/* ===== content-specific ===== */
.kv {
  display: grid; grid-template-columns: 100px 1fr;
  gap: 6px 14px;
  font-family: var(--font-ui); font-size: 12px;
  margin: 8px 0;
}
.kv dt { color: var(--ink-soft); text-transform: uppercase; letter-spacing: 1px; }
.kv dd { margin: 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.card {
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--ink); }
.card .thumb {
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1.5px solid var(--ink);
  font-family: var(--font-display); font-size: 32px;
  color: var(--ink);
  position: relative; overflow: hidden;
}
.card .thumb.photo-card {
  aspect-ratio: 3/4;
  padding: 0;
  background: var(--silver);
}
.card .thumb.photo-card img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  image-orientation: from-image;
}
.card .thumb.project-card {
  aspect-ratio: 16/10;
  padding: 0;
  background: var(--silver);
}
.card .thumb.project-card img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
}
.card .thumb.thing-card {
  aspect-ratio: 3/4;
  padding: 0;
  background: var(--silver);
}
.card .thumb.thing-card img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
}
.project-hero.project-hero-img {
  height: auto;
  padding: 0;
  background: var(--silver);
}
.project-hero.project-hero-img::after { content: none; }
.project-hero.project-hero-img img {
  display: block;
  width: 100%;
  height: auto;
}
.photos-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
}
.photo-hero {
  position: relative;
  border: 2px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
  background: var(--silver);
  margin: 8px 0 12px;
  box-shadow: 2px 2px 0 var(--ink);
}
.photo-hero img {
  display: block;
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  background: var(--ink);
  image-orientation: from-image;
}
.photo-hero .photo-caption {
  position: absolute;
  bottom: 8px; left: 10px;
  font-family: var(--font-hand);
  font-size: 22px;
  background: rgba(255,255,255,0.85);
  padding: 2px 10px;
  border-radius: 4px;
  border: 1.5px solid var(--ink);
}
.card .thumb .ttl { position: absolute; bottom: 4px; left: 6px; font-family: var(--font-hand); font-size: 13px; color: var(--ink); background: rgba(255,255,255,0.7); padding: 0 4px; border-radius: 2px; }
.card .info { padding: 6px 8px; font-family: var(--font-ui); font-size: 12px; }
.card .info .ttl2 { font-weight: 700; }
.card .info .sub2 { color: var(--ink-soft); font-size: 11px; }

.photo-thumb {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-lav));
  position: relative;
}
.photo-thumb.v2 { background: linear-gradient(135deg, var(--accent-pink), var(--accent-yellow)); }
.photo-thumb.v3 { background: linear-gradient(135deg, var(--accent-mint), var(--accent-blue)); }
.photo-thumb.v4 { background: linear-gradient(135deg, var(--accent-coral), var(--accent-pink)); }
.photo-thumb.v5 { background: linear-gradient(135deg, var(--accent-lav), var(--accent-mint)); }
.photo-thumb.v6 { background: linear-gradient(135deg, var(--accent-yellow), var(--accent-coral)); }
.photo-thumb::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.55), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,0.15), transparent 50%);
}

.poem-text {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.6;
  white-space: pre-wrap;
  margin: 12px 0;
  color: var(--ink);
}
.essay-text {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  max-width: 60ch;
}
.essay-text p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 48px;
  float: left;
  line-height: 0.9;
  padding: 4px 8px 0 0;
  color: var(--accent-coral);
}

.project-hero {
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  height: 160px;
  margin: 8px 0 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 28px;
  color: var(--ink);
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-lav));
}
.project-hero.h2 { background: linear-gradient(135deg, var(--accent-mint), var(--accent-yellow)); }
.project-hero.h3 { background: linear-gradient(135deg, var(--accent-pink), var(--accent-coral)); }
.project-hero.h4 { background: linear-gradient(135deg, var(--accent-yellow), var(--accent-lav)); }
.project-hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(0,0,0,0.04) 22px 23px),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(0,0,0,0.04) 22px 23px);
  pointer-events: none;
}

.about-flex {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: start;
}
.about-portrait {
  width: 140px; height: 180px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 35%, var(--accent-pink) 0 36px, transparent 37px),
    linear-gradient(180deg, transparent 0 90px, var(--accent-blue) 90px 100%),
    linear-gradient(135deg, var(--sky-2), var(--sky-1));
  position: relative;
  box-shadow: 2px 2px 0 var(--ink);
}
.about-portrait::before {
  content: '𓂃 ᡣ𐭩'; position: absolute; top: 56px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-size: 18px;
}
.about-portrait::after {
  content: 'aafia'; position: absolute; bottom: 6px; left: 0; right: 0; text-align: center;
  font-family: var(--font-hand); font-size: 18px; color: var(--paper);
}

.guestbook-entry {
  border: 1.5px dashed var(--silver-2);
  border-radius: 6px;
  padding: 8px 10px;
  margin: 6px 0;
  background: var(--paper-2);
  font-family: var(--font-hand);
  font-size: 17px;
  line-height: 1.3;
}
.guestbook-entry .gb-name {
  font-family: var(--font-ui); font-size: 11px;
  color: var(--ink-soft);
  display: block;
  margin-top: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
#guestbook-form {
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 10px;
  margin-top: 10px;
  background: var(--accent-yellow);
}
#guestbook-form textarea, #guestbook-form input {
  font-family: var(--font-hand); font-size: 16px;
  border: 1.5px solid var(--ink); border-radius: 4px;
  padding: 4px 8px; width: 100%;
  background: var(--paper);
  margin-bottom: 6px;
}
#guestbook-form button {
  font-family: var(--font-ui); font-size: 13px;
  border: 2px solid var(--ink); background: var(--accent-pink); padding: 4px 14px;
  border-radius: 4px; cursor: pointer; box-shadow: 2px 2px 0 var(--ink);
}
#guestbook-form button:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }

.contact-links {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.contact-link {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 8px 12px;
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-ui); font-size: 13px;
  box-shadow: 2px 2px 0 var(--ink);
}
.contact-link:hover { transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--ink); background: var(--accent-yellow); }
.contact-link .ic { width: 22px; height: 22px; }

/* ===== custom cursor sparkles ===== */
.sparkle {
  position: fixed;
  z-index: 9000;
  pointer-events: none;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--accent-pink);
  animation: sparklepop .8s ease forwards;
  text-shadow: 0 0 6px rgba(255,158,198,0.6);
}
@keyframes sparklepop {
  0%   { transform: translate(-50%,-50%) scale(0.3) rotate(0deg); opacity: 0.9; }
  40%  { transform: translate(-50%,-50%) scale(1.2) rotate(40deg); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(0.6) rotate(120deg); opacity: 0; }
}

/* ===== pet ===== */
#pet {
  position: fixed; bottom: 56px; right: 16px;
  z-index: 80;
  width: 64px; height: 64px;
  cursor: pointer;
  animation: petbob 2.6s ease-in-out infinite;
  filter: drop-shadow(2px 2px 0 rgba(42,36,56,0.25));
}
@keyframes petbob { 50% { transform: translateY(-6px); } }
#pet-speech {
  position: fixed; bottom: 124px; right: 14px;
  z-index: 81;
  pointer-events: none;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 6px 10px;
  font-family: var(--font-hand);
  font-size: 16px;
  max-width: 180px;
  box-shadow: 2px 2px 0 var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
#pet-speech::after {
  content: ''; position: absolute; right: 20px; bottom: -10px;
  width: 14px; height: 14px;
  background: var(--paper);
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
}
#pet-speech.show { opacity: 1; }

/* ===== tweaks panel chrome added by JS ===== */
.tw-panel {
  position: fixed;
  z-index: 500;
  width: 270px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow-hard), var(--shadow-soft);
  font-family: var(--font-ui);
  display: none;
}
.tw-panel.open { display: block; }
.tw-panel .tw-head {
  background: linear-gradient(180deg, var(--accent-mint), color-mix(in srgb, var(--accent-mint) 70%, white));
  border-bottom: 2px solid var(--ink);
  padding: 6px 10px;
  font-weight: 700;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px;
  border-radius: 6px 6px 0 0;
  cursor: grab;
}
.tw-panel .tw-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.tw-panel label { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tw-panel select, .tw-panel button {
  font-family: var(--font-ui); font-size: 13px;
  border: 1.5px solid var(--ink); background: var(--paper);
  border-radius: 4px; padding: 3px 8px; cursor: pointer;
}
.tw-panel button { box-shadow: 1px 1px 0 var(--ink); }
.tw-panel .swatches { display: flex; gap: 6px; }
.tw-panel .swatches span {
  width: 22px; height: 22px; border: 1.5px solid var(--ink); border-radius: 50%; cursor: pointer;
}
.tw-panel .swatches span.sel { outline: 2px solid var(--ink); outline-offset: 2px; }
.tw-panel input[type=checkbox] { transform: scale(1.2); accent-color: var(--accent-pink); }

/* ===== msn.exe — ozone_hope_chat window =====
   inspired by msn messenger ~2003. lives inside a regular window body. */

.msn-shell {
  display: flex; flex-direction: column;
  width: 100%;
  height: 100%;
  font-family: 'Tahoma', 'Geneva', 'Verdana', sans-serif;
  color: #1a1a2e;
  background: #fffefb;
}
/* let the msn shell fill the window body without the default body padding */
.win .body:has(.msn-shell) {
  padding: 0;
  overflow: hidden;
}

/* inner titlebar (the friend's name + status) */
.msn-titlebar {
  flex: 0 0 26px;
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px;
  background: linear-gradient(180deg, #d4e4f5 0%, #b8d1ea 100%);
  border-bottom: 1px solid #6e8aae;
  font-size: 12px;
  font-weight: bold;
}
.msn-buddy {
  display: inline-flex; align-items: center;
  width: 16px; height: 16px;
}
.msn-friend {
  flex: 1;
  color: #224488;
  font-weight: 700;
}
.msn-tilde {
  color: #c84a8a;
  font-weight: 400;
}
.msn-status {
  font-size: 10px;
  color: #336633;
  font-weight: 400;
  font-style: italic;
}
.msn-status.offline { color: #888; }

/* to/from meta block */
.msn-meta {
  flex: 0 0 auto;
  padding: 4px 10px 6px;
  background: #f7f5f1;
  border-bottom: 1px solid #d6d3cf;
  font-size: 10px;
  color: #555;
  display: flex; flex-direction: column; gap: 1px;
}
.msn-meta b { font-weight: 700; color: #333; }
.msn-meta-name.them { color: #c84a8a; font-weight: 700; }
.msn-meta-name.you  { color: #224488; font-weight: 700; }

/* messages scroll area */
.msn-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px 6px;
  background: #fffefb;
  font-size: 13px;
  line-height: 1.4;
  scrollbar-width: thin;
  scrollbar-color: #b9a3d8 #f0eee9;
}
.msn-messages::-webkit-scrollbar { width: 14px; }
.msn-messages::-webkit-scrollbar-track { background: #f0eee9; }
.msn-messages::-webkit-scrollbar-thumb {
  background: #c8c5c0;
  border: 2px solid #f0eee9;
  border-radius: 0;
}
.msn-msg { margin: 0 0 4px; word-wrap: break-word; }
.msn-msg .msn-name {
  font-weight: 700;
  font-size: 12px;
}
.msn-msg .msn-name.them { color: #c84a8a; }
.msn-msg .msn-name.you  { color: #224488; }
.msn-msg .msn-text { color: #1a1a2e; }
.msn-heart { color: #c84a8a; font-weight: 700; }

.msn-system {
  margin: 10px 0;
  padding: 8px 10px;
  text-align: center;
  color: #7a6a8a;
  font-size: 12px;
  font-style: italic;
  border-top: 1px dashed #d0c8d8;
  border-bottom: 1px dashed #d0c8d8;
  background: #faf7fb;
}

/* typing indicator (always present, opacity-toggled) */
.msn-typing {
  flex: 0 0 18px;
  padding: 2px 10px;
  font-size: 11px;
  color: #666;
  font-style: italic;
  background: #f7f5f1;
  border-top: 1px solid #d6d3cf;
  opacity: 0;
  transition: opacity .15s ease;
  display: flex; align-items: center; gap: 6px;
}
.msn-typing.show { opacity: 1; }
.msn-typing-dots {
  display: inline-flex; gap: 2px;
}
.msn-typing-dots i {
  width: 4px; height: 4px; border-radius: 50%;
  background: #c84a8a;
  display: inline-block;
  animation: msn-bounce 1.2s ease-in-out infinite;
}
.msn-typing-dots i:nth-child(2) { animation-delay: .15s; }
.msn-typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes msn-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-3px); opacity: 1; }
}

/* composer area at the bottom */
.msn-composer {
  flex: 0 0 auto;
  border-top: 1px solid #6e8aae;
  background: linear-gradient(180deg, #f0eee9 0%, #e6e2db 100%);
}
.msn-composer-bar {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-bottom: 1px solid #d6d3cf;
  background: linear-gradient(180deg, #f8f6f1 0%, #ebe7df 100%);
  font-size: 14px;
}
.msn-toolbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 20px;
  font-size: 12px;
  color: #444;
  border: 1px solid transparent;
  cursor: default;
  user-select: none;
}
.msn-toolbtn:hover { border-color: #888; background: #fff; }
.msn-choices {
  display: flex; flex-direction: column; gap: 4px;
  padding: 8px 10px 10px;
}
.msn-choice {
  font-family: 'Tahoma', sans-serif;
  font-size: 12px;
  text-align: left;
  padding: 6px 10px;
  border: 1px solid #6e8aae;
  background: linear-gradient(180deg, #ffffff 0%, #e8eef7 100%);
  color: #224488;
  border-radius: 2px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #ffffff;
  transition: background .12s ease, transform .08s ease;
}
.msn-choice:hover {
  background: linear-gradient(180deg, #fff7d6 0%, #ffe88a 100%);
  border-color: #b48a30;
  color: #553300;
}
.msn-choice:active { transform: translateY(1px); }
.msn-choice.restart {
  background: linear-gradient(180deg, #ffe6f0 0%, #ffc0d8 100%);
  border-color: #c84a8a;
  color: #6a1a4a;
  text-align: center;
  font-weight: 700;
}
.msn-choice.restart:hover {
  background: linear-gradient(180deg, #ffd0e0 0%, #ff9ec6 100%);
}
.too-small {
  position: fixed; inset: 0;
  display: none;
  z-index: 99999;
  background: var(--ink); color: var(--paper);
  flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 20px;
  font-family: var(--font-ui);
}
@media (max-width: 760px) {
  .too-small { display: flex; }
}
.too-small h2 { font-family: var(--font-display); font-size: 32px; margin: 0 0 8px; }
