@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400..600;1,9..144,400..600&family=Geist:wght@300..700&family=Geist+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Type system */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-ui:      'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    'Geist Mono', 'SF Mono', ui-monospace, monospace;

  /* Surface palette — warmer near-black, refined accents */
  --text:     #f1ecff;
  --text-2:   #ddd0ff;
  --dim:      rgba(220,205,255,0.46);
  --dim-2:    rgba(220,205,255,0.22);
  --accent:   #c084fc;
  --accent2:  #f472b6;
  --gold:     #f5d585;        /* champagne tone for premium accents */
  --bg:       #08051a;        /* warmer near-black */
  --bg-edge:  #02010a;        /* vignette edge */
  --gborder:  rgba(255,255,255,0.07);
  --gborder-strong: rgba(255,255,255,0.14);
  --bar:      rgba(8,4,22,0.78);
  --surface:  rgba(14,8,32,0.55);

  /* compat vars used by admin.css */
  --panel:    #0d0620;
  --border:   #1e1040;
  --acc-lo:   rgba(192,132,252,0.4);
  --acc-glow: rgba(192,132,252,0.18);
}

html { height: 100%; }

body {
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  font-feature-settings: 'ss01', 'ss02', 'cv11';
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); }
strong { color: var(--accent); font-weight: 600; }
p { margin-bottom: 12px; line-height: 1.75; }
.dim { color: var(--dim); }

/* ── WALLPAPER ── two soft mesh glows, vignette, and a fine grain overlay */
.blobs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.blobs::before {
  content: '';
  position: absolute; inset: -10%;
  background:
    radial-gradient(ellipse 1100px 760px at 14% 18%, rgba(124, 58, 237, 0.32), transparent 62%),
    radial-gradient(ellipse 900px  680px at 88% 76%, rgba(244, 114, 182, 0.22), transparent 62%),
    radial-gradient(ellipse 720px  520px at 50% 108%, rgba(30, 58, 138, 0.20), transparent 70%),
    radial-gradient(circle at 50% 50%, transparent 40%, var(--bg-edge) 100%);
  filter: saturate(1.05);
  animation: meshDrift 42s ease-in-out infinite alternate;
}
.blobs::after {
  /* fine film-grain texture */
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.10;
}
@keyframes meshDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-3%, 2%, 0) scale(1.06); }
}
/* Hide legacy .blob children — wallpaper is now ::before/::after */
.blob { display: none; }

/* ── SPLASH ── */
#splash {
  position: fixed; inset: 0;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px; cursor: pointer; z-index: 30;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
#donut {
  font-size: min(10px, calc(100vw / 125));
  line-height: 0.9; font-weight: 900;
  white-space: pre; animation: neon 15s linear infinite;
}
@keyframes neon {
  0%   { color: #0ff; text-shadow: 0 0 1vw #0ff; }
  33%  { color: #f0f; text-shadow: 0 0 1vw #f0f; }
  66%  { color: #0f0; text-shadow: 0 0 1vw #0f0; }
  100% { color: #0ff; text-shadow: 0 0 1vw #0ff; }
}
#donut.scared {
  animation: none; color: #fff;
  text-shadow: 0 0 40px #fff, 0 0 80px rgba(255,255,255,0.4);
}
#hint {
  color: rgba(255,255,255,0.3); font-size: 12px;
  letter-spacing: 0.2em; animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── BOO ── */
#boo {
  position: fixed; inset: 0;
  display: none; align-items: center; justify-content: center;
  font-size: clamp(60px, 20vw, 140px); font-weight: 900;
  color: var(--accent2);
  text-shadow: 0 0 60px rgba(244,114,182,0.5), 0 0 120px rgba(244,114,182,0.25);
  z-index: 31; pointer-events: none;
  animation: shake 0.08s step-end infinite;
}
#boo.show { display: flex; }
@keyframes shake {
  0%  { transform: translate(-3px,  2px); }
  25% { transform: translate( 3px, -2px); }
  50% { transform: translate(-2px,  3px); }
  75% { transform: translate( 2px, -3px); }
}

/* ── TERMINAL ── */
#terminal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  z-index: 200;
}
#terminal-box {
  width: min(720px, 95vw); max-height: 70vh;
  background: rgba(6,2,18,0.95);
  border: 1px solid var(--gborder);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7), 0 0 0 0.5px rgba(255,255,255,0.05) inset;
  backdrop-filter: blur(40px);
  display: flex; flex-direction: column;
}
#terminal-bar {
  height: 38px; background: rgba(4,1,12,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex; align-items: center; padding: 0 12px; gap: 8px; flex-shrink: 0;
}
.terminal-tls { display: flex; gap: 7px; }
.terminal-tl {
  width: 12px; height: 12px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 7px; font-weight: 800; color: transparent; transition: color .15s; line-height: 1;
}
.terminal-tl.c { background: #ff5f57; box-shadow: 0 0 5px rgba(255,95,87,.45); }
.terminal-tl.m { background: #ffbd2e; box-shadow: 0 0 5px rgba(255,189,46,.4); }
.terminal-tl.x { background: #28ca41; box-shadow: 0 0 5px rgba(40,202,65,.4); }
#terminal-box:hover .terminal-tl { color: rgba(0,0,0,.45); }
#terminal-title { flex: 1; text-align: center; font-size: 12px; color: rgba(210,190,255,.32); letter-spacing: .01em; }
#terminal-close { cursor: pointer; }
#terminal-output {
  flex: 1; overflow-y: auto;
  padding: 12px 16px; font-size: 12px;
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.75; color: var(--text); white-space: pre-wrap;
}
#terminal-output .t-cmd,  #terminal-output .term-cmd  { color: var(--accent); }
#terminal-output .t-err,  #terminal-output .term-err  { color: #f87171; }
#terminal-output .t-dim,  #terminal-output .term-dim  { color: rgba(210,190,255,.4); }
#terminal-output .t-warn, #terminal-output .term-warn { color: #fbbf24; }
#terminal-input-row {
  display: flex; align-items: center;
  padding: 8px 16px; border-top: 1px solid rgba(255,255,255,.05);
  background: rgba(4,1,12,.6); flex-shrink: 0;
}
#terminal-prompt { color: var(--accent); font-size: 12px; font-family: 'Courier New', Courier, monospace; white-space: nowrap; }
#terminal-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: 'Courier New', Courier, monospace;
  font-size: 12px; caret-color: var(--accent);
}

/* ── SITE ── */
#site { display: none; height: 100vh; flex-direction: column; position: relative; z-index: 1; }
#site.on { display: flex; }

/* ── MENUBAR ── */
.menubar {
  flex-shrink: 0; height: 28px;
  background: var(--bar);
  backdrop-filter: blur(40px) saturate(1.8); -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 1px 0 rgba(255,255,255,0.025) inset;
  display: flex; align-items: center; padding: 0 14px; gap: 2px;
  position: relative; z-index: 100; user-select: none;
}
.mb-logo { font-size: 14px; margin-right: 8px; filter: drop-shadow(0 0 8px rgba(192,132,252,0.55)); cursor: pointer; transition: filter .2s; }
.mb-logo:hover { filter: drop-shadow(0 0 12px rgba(244,114,182,0.7)); }
.mb-site {
  font-family: var(--font-display); font-style: italic;
  font-weight: 500; font-size: 14px; margin-right: 14px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.mb-item {
  font-family: var(--font-ui);
  padding: 2px 10px; border-radius: 6px;
  color: rgba(220,205,255,0.55); font-size: 12px; font-weight: 450; cursor: pointer;
  text-decoration: none; transition: all .15s;
  -webkit-text-fill-color: rgba(220,205,255,0.55);
}
.mb-item:hover { background: rgba(255,255,255,0.07); color: var(--text); -webkit-text-fill-color: var(--text); }
.mb-item.on { color: var(--text); -webkit-text-fill-color: var(--text); font-weight: 600; }
.mb-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.mb-np { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent2); display: flex; align-items: center; gap: 6px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-np-dot { width:5px;height:5px;border-radius:50%;background:var(--accent2);box-shadow:0 0 8px var(--accent2);animation:pulse 2s ease-in-out infinite; flex-shrink: 0; }
.mb-cmd {
  font-family: var(--font-mono);
  font-size: 10px; padding: 2px 7px; border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(220,205,255,.46); letter-spacing:.02em; cursor:pointer;
  background: rgba(255,255,255,0.025); transition: all .15s;
}
.mb-cmd:hover { border-color: var(--accent); color: var(--accent); background: rgba(192,132,252,0.08); }
.mb-time { font-family: var(--font-mono); font-size: 11px; color: rgba(220,205,255,.5); font-feature-settings: 'tnum'; }

/* ── DESKTOP ── */
.desktop { position: relative; z-index: 1; flex: 1; overflow: hidden; }

/* ── WINDOW BASE ── */
.win {
  position: absolute; border-radius: 13px; overflow: hidden;
  border: 1px solid var(--gborder);
  background: var(--surface);
  backdrop-filter: blur(72px) saturate(2); -webkit-backdrop-filter: blur(72px) saturate(2);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.06) inset,
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 40px 90px rgba(0,0,0,0.72),
    0 12px 32px rgba(0,0,0,0.45),
    0 4px 10px rgba(0,0,0,0.3);
}
.win-bar {
  height: 38px; flex-shrink: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.025), rgba(0,0,0,0.0)), rgba(6,2,18,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.035);
  display: flex; align-items: center; padding: 0 12px; gap: 10px;
  cursor: grab; user-select: none;
}
.win-bar:active { cursor: grabbing; }
.win.is-dragging { cursor: grabbing; user-select: none; }
.tls { display: flex; gap: 8px; flex-shrink: 0; }
.tl {
  width: 12px; height: 12px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: transparent;
  transition: color .15s, transform .12s; line-height: 1; flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.18) inset, 0 1px 1px rgba(255,255,255,0.18) inset;
}
.tl:active { transform: scale(0.92); }
.tl-c { background: linear-gradient(180deg, #ff7a73, #ff5147); }
.tl-m { background: linear-gradient(180deg, #ffd067, #f5a623); }
.tl-x { background: linear-gradient(180deg, #4ee06d, #20b340); }
.win:hover .tl { color: rgba(0,0,0,0.55); }
.win-title {
  flex: 1; text-align: center; font-size: 12px; font-weight: 500;
  color: rgba(220,205,255,0.38); letter-spacing: -0.005em;
  font-family: var(--font-ui);
  font-feature-settings: 'tnum';
}

/* ── HERO WINDOW ── */
.win-hero { top: 44px; left: 50%; transform: translateX(-50%); width: 488px; }
.hero-body { padding: 30px 38px 26px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-donut {
  font-size: 72px; line-height: 1;
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(192,132,252,0.55)) drop-shadow(0 0 64px rgba(244,114,182,0.22));
  margin-bottom: 18px; cursor: pointer;
}
@keyframes float { 0%,100%{transform:translateY(0) rotate(-3deg);}50%{transform:translateY(-12px) rotate(3deg);} }
.hero-title {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1;
  color: var(--text);
  margin-bottom: 14px;
}
.hero-title::before { content: ''; }
.hero-sub {
  font-family: var(--font-display); font-style: italic;
  font-size: 17px; line-height: 1.45; max-width: 340px;
  color: var(--text-2);
  margin-bottom: 22px;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.hero-sub strong {
  font-style: normal; font-family: var(--font-mono); font-size: 14px;
  color: var(--gold); -webkit-text-fill-color: var(--gold);
  letter-spacing: 0;
  padding: 1px 6px; margin: 0 1px;
  border: 1px solid rgba(245,213,133,0.25); border-radius: 4px;
  background: rgba(245,213,133,0.07);
}
.hero-pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.hpill {
  font-family: var(--font-ui);
  padding: 5px 14px; border-radius: 99px; font-size: 11.5px; font-weight: 450;
  letter-spacing: .005em;
  border: 1px solid rgba(255,255,255,0.07); color: var(--dim); cursor: pointer;
  background: rgba(255,255,255,0.025); text-decoration: none; transition: all .2s;
  -webkit-text-fill-color: rgba(220,205,255,0.5);
  display: inline-block;
}
.hpill:hover {
  border-color: var(--accent); color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  background: rgba(192,132,252,0.08);
  transform: translateY(-1px);
}
.hpill.home-active {
  border-color: rgba(244,114,182,0.5); color: var(--accent2);
  -webkit-text-fill-color: var(--accent2);
  background: rgba(244,114,182,0.09); box-shadow: 0 0 16px rgba(244,114,182,0.12);
}
.hero-stats {
  display: flex; margin-top: 20px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.05); width: 100%;
}
.hs { text-align: center; flex: 1; padding: 0 8px; border-right: 1px solid rgba(255,255,255,0.04); }
.hs:last-child { border-right: none; }
.hs-n {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 500; letter-spacing: -.04em; line-height: 1;
  color: var(--text);
  font-feature-settings: 'tnum';
  font-variation-settings: 'opsz' 144;
}
.hs-l {
  font-family: var(--font-ui);
  font-size: 9px; color: var(--dim); letter-spacing: .14em;
  text-transform: uppercase; margin-top: 6px; font-weight: 500;
}

/* ── NOW PLAYING WINDOW ── */
.win-np { top: 55px; right: 26px; width: 256px; }
.np-body { padding: 14px 16px 16px; }
.np-hdr { display: flex; align-items: center; gap: 7px; margin-bottom: 11px; }
.np-dot { width:6px;height:6px;border-radius:50%;background:var(--accent2);box-shadow:0 0 8px var(--accent2);animation:pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{transform:scale(1);opacity:1;}50%{transform:scale(1.35);opacity:.7;} }
.np-live-lbl {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 11px; letter-spacing: .04em; text-transform: lowercase;
  color: var(--accent2);
}
#np-name {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 500; letter-spacing: -.018em; line-height: 1.2;
  color: var(--text); margin-bottom: 3px;
  font-variation-settings: 'opsz' 144;
}
#np-artist { font-size: 11.5px; color: var(--dim); margin-bottom: 14px; font-weight: 450; }
.np-prog { height: 3px; background: rgba(255,255,255,0.05); border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
#np-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent2)); box-shadow: 0 0 10px rgba(244,114,182,0.4); transition: width 1s linear; }
.np-times { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--dim); font-feature-settings: 'tnum'; }
.rp-head {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 12px; letter-spacing: 0; text-transform: lowercase;
  color: rgba(220,205,255,.4);
  padding: 11px 16px 6px; border-top: 1px solid rgba(255,255,255,0.04);
}
.rp-row { padding: 7px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.rp-row:last-child { border-bottom: none; }
.rp-num { font-family: var(--font-mono); font-size: 10px; color: rgba(255,255,255,0.18); min-width: 14px; font-feature-settings: 'tnum'; }
.rp-t { font-size: 11.5px; font-weight: 500; margin-bottom: 1px; letter-spacing: -0.005em; }
.rp-a { font-size: 10.5px; color: var(--dim); }

/* ── HOME NOTES WINDOW ── */
.win-notes { top: 60px; left: 26px; width: 265px; }
.notes-win-head {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 13px; letter-spacing: 0; text-transform: lowercase;
  color: rgba(220,205,255,.42); padding: 13px 16px 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.notes-win-head a {
  font-family: var(--font-ui); font-style: normal;
  font-size: 10.5px; letter-spacing: 0; color: var(--accent); font-weight: 500;
}
.notes-win-head a:hover { color: var(--text); }
.win-note-row { padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.035); cursor: pointer; transition: background .15s, padding-left .15s; text-decoration: none; display: block; color: inherit; }
.win-note-row:last-child { border-bottom: none; }
.win-note-row:hover { background: rgba(255,255,255,0.022); padding-left: 20px; }
.win-note-row:hover .win-nr-t { color: var(--accent); -webkit-text-fill-color: var(--accent); }
.win-nr-t {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 13.5px; letter-spacing: -0.005em; line-height: 1.25;
  margin-bottom: 3px; transition: color .15s;
}
.win-nr-d { font-family: var(--font-mono); font-size: 9.5px; color: var(--dim); font-feature-settings: 'tnum'; letter-spacing: 0; }

/* ── HOME GUESTBOOK WINDOW ── */
.win-gb { bottom: 66px; left: 50%; transform: translateX(-50%); width: 452px; }
.gb-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.gb-win-entry { padding: 13px 15px; border-right: 1px solid rgba(255,255,255,0.04); }
.gb-win-entry:last-child { border-right: none; }
.gb-win-name {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 12.5px; letter-spacing: -0.005em; margin-bottom: 6px;
  color: var(--gold);
}
.gb-win-msg { font-family: var(--font-display); font-size: 13px; color: rgba(241,236,255,.7); line-height: 1.5; font-weight: 400; }

/* ── DOCK ── */
.dock-wrap { position: relative; z-index: 100; flex-shrink: 0; height: 64px; display: flex; justify-content: center; align-items: flex-end; padding-bottom: 9px; }
.dock {
  display: flex; align-items: flex-end; gap: 6px;
  background: rgba(8,4,22,0.6);
  backdrop-filter: blur(48px) saturate(2.2); -webkit-backdrop-filter: blur(48px) saturate(2.2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; padding: 6px 12px;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.06) inset,
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 12px 48px rgba(0,0,0,.6),
    0 4px 14px rgba(0,0,0,.4),
    0 0 60px rgba(192,132,252,0.05);
}
.di { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; transition: transform .25s cubic-bezier(.34,1.56,.64,1); position: relative; text-decoration: none; }
.di:hover { transform: translateY(-8px) scale(1.18); }
.di:hover .di-tip { opacity: 1; transform: translateY(0); }
.di-box {
  width: 44px; height: 44px; border-radius: 11px;
  background: linear-gradient(160deg, rgba(192,132,252,0.12), rgba(244,114,182,0.06));
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; font-size: 23px;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.06) inset,
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 4px 14px rgba(0,0,0,.32);
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
}
.di:hover .di-box {
  background: linear-gradient(160deg, rgba(192,132,252,0.22), rgba(244,114,182,0.12));
  border-color: rgba(255,255,255,0.18);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.1) inset,
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 8px 24px rgba(0,0,0,.42),
    0 0 32px rgba(192,132,252,0.18);
}
.di.on .di-box {
  background: linear-gradient(160deg, rgba(192,132,252,0.24), rgba(244,114,182,0.14));
  border-color: rgba(192,132,252,0.32);
}
.di-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
}
.di-tip {
  position: absolute; bottom: calc(100% + 12px);
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 500; color: var(--text);
  background: rgba(8,4,22,0.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 7px;
  padding: 4px 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,.5);
  white-space: nowrap; opacity: 0; transform: translateY(5px);
  transition: all .15s; pointer-events: none; letter-spacing: -0.005em;
}
.dock-sep { width: 1px; height: 32px; background: rgba(255,255,255,0.07); align-self: center; margin: 0 4px; }

/* Minimized window chips inside the dock */
.dock-mins { display: flex; gap: 6px; align-items: center; }
.dock-mins:empty { display: none; }
.di-min .di-box {
  background: rgba(244,114,182,0.10);
  border-color: rgba(244,114,182,0.25);
  font-size: 18px;
}
.di-min:hover .di-box {
  background: rgba(244,114,182,0.18);
  border-color: rgba(244,114,182,0.4);
  box-shadow: 0 4px 16px rgba(0,0,0,.35), 0 0 20px rgba(244,114,182,0.18);
}

/* Window state: hidden (red close / yellow minimize) */
.win.is-hidden { display: none !important; }

/* Window state: fullscreen (green) */
.win.is-fullscreen {
  position: absolute !important;
  top: 0 !important; left: 0 !important;
  right: 0 !important; bottom: 0 !important;
  width: auto !important; height: auto !important;
  transform: none !important;
  z-index: 200 !important;
  border-radius: 0 !important;
}
.win.is-fullscreen .win-bar { cursor: default; }

/* ── SUB-PAGE WINDOW ── */
.subpage-win.win {
  top: 18px; left: 50%; transform: translateX(-50%);
  width: min(860px, calc(100% - 36px));
  bottom: 8px; height: auto;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.win-split { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.win-sidebar {
  width: 158px; flex-shrink: 0;
  background: rgba(0,0,0,0.2); border-right: 1px solid rgba(255,255,255,0.04);
  padding: 10px 0; overflow-y: auto;
}
.wsb-section {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  padding: 4px 14px; font-size: 11.5px; letter-spacing: 0; text-transform: lowercase;
  color: rgba(220,205,255,0.32); margin: 8px 0 4px;
}
.wsb-item {
  padding: 6px 14px; font-size: 12px; cursor: pointer; border-radius: 8px; margin: 2px 6px;
  display: flex; align-items: center; gap: 8px; color: var(--dim); transition: all .15s; text-decoration: none;
  -webkit-text-fill-color: rgba(210,190,255,0.42);
}
.wsb-item:hover { background: rgba(192,132,252,0.06); color: var(--text); -webkit-text-fill-color: var(--text); }
.wsb-item.on { background: rgba(192,132,252,0.12); color: var(--accent); -webkit-text-fill-color: var(--accent); }
.win-content { flex: 1; overflow-y: auto; padding: 20px 24px; }
.content-head {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 22px; letter-spacing: -0.02em; text-transform: lowercase;
  color: var(--text);
  margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; justify-content: space-between; align-items: baseline;
  font-variation-settings: 'opsz' 144;
}

/* notes list (sub-page) */
.note-row { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.04); text-decoration: none; display: block; color: inherit; transition: padding .15s; }
.note-row:last-child { border-bottom: none; }
.note-row:hover { padding-left: 4px; }
.note-row:hover .nr-title { color: var(--accent); }
.nr-title {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 17px; letter-spacing: -0.012em; line-height: 1.3;
  margin-bottom: 4px; transition: color .15s;
  font-variation-settings: 'opsz' 144;
}
.nr-date { font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); letter-spacing: 0; font-feature-settings: 'tnum'; }

/* projects */
.project-card { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.project-card:last-child { border-bottom: none; }
.project-title {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 17px; letter-spacing: -0.012em; line-height: 1.25;
  margin-bottom: 5px;
  font-variation-settings: 'opsz' 144;
}
.project-title a { color: var(--text); transition: color .15s; }
.project-title a:hover { color: var(--accent); }
.project-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.65; margin-bottom: 8px; opacity: 0.78; }
.project-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 10px; letter-spacing: .06em; padding: 2px 8px; border: 1px solid rgba(192,132,252,0.25); color: rgba(192,132,252,.7); border-radius: 99px; }

/* guestbook page */
.gb-form { border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 16px; margin-bottom: 20px; background: rgba(0,0,0,0.15); }
.gb-field { margin-bottom: 10px; }
.gb-field:last-child { margin-bottom: 0; }
.gb-form input, .gb-form textarea {
  width: 100%; background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 7px; color: var(--text); font-family: inherit; font-size: 12px;
  padding: 8px 12px; outline: none; resize: vertical; transition: border-color .15s;
}
.gb-form input:focus, .gb-form textarea:focus { border-color: rgba(192,132,252,0.4); }
.gb-form input::placeholder, .gb-form textarea::placeholder { color: rgba(210,190,255,.25); }
.gb-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.gb-btn {
  padding: 6px 18px; border-radius: 7px;
  background: rgba(192,132,252,0.1); border: 1px solid rgba(192,132,252,0.25);
  color: var(--accent); font-family: inherit; font-size: 12px; cursor: pointer; transition: all .15s;
}
.gb-btn:hover { background: rgba(192,132,252,0.18); box-shadow: 0 0 14px rgba(192,132,252,0.15); }
#gb-status { font-size: 11px; color: var(--dim); }
#gb-status.ok  { color: #4ade80; }
#gb-status.err { color: #f87171; }
.gb-entry { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.gb-entry:last-child { border-bottom: none; }
.gb-entry-hdr { display: flex; justify-content: space-between; margin-bottom: 5px; align-items: baseline; }
.gb-entry-name {
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.gb-entry-date { font-size: 10px; color: var(--dim); }
.gb-entry-msg { font-size: 12px; color: rgba(237,232,255,.65); line-height: 1.6; word-break: break-word; }

/* sorry */
.sorry-msg { font-size: 13px; line-height: 1.85; color: var(--text); margin-bottom: 14px; }
.sorry-timer { font-size: 12px; color: var(--dim); margin-top: 10px; }
#v-timer { color: var(--accent); font-weight: 600; }
.sorry-unlocked { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent2); margin-bottom: 14px; }

/* ── NOTE DETAIL ── */
body.note-page { height: auto; overflow: auto; }
body.note-page #site { height: auto; min-height: 100vh; }
#note-wrap { max-width: 680px; margin: 0 auto; padding: 0 24px 80px; position: relative; z-index: 1; }
#note-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 36px; }
.back-link { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); letter-spacing: 0; }
.back-link:hover { color: var(--accent); }
.site-name-sm {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  color: var(--text); letter-spacing: -0.005em;
  opacity: 0.85;
}
.note-title {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 42px; letter-spacing: -0.025em; line-height: 1.05;
  color: var(--text); margin-bottom: 10px;
  font-variation-settings: 'opsz' 144;
}
.note-date { font-family: var(--font-mono); font-size: 11px; color: var(--dim); margin-bottom: 36px; letter-spacing: 0; font-feature-settings: 'tnum'; }
.note-content { font-family: var(--font-display); font-size: 17px; line-height: 1.7; color: var(--text-2); font-weight: 400; }
.note-content p { margin-bottom: 18px; }
.note-content h2 { font-family: var(--font-display); font-style: italic; font-size: 24px; font-weight: 500; letter-spacing: -0.015em; color: var(--text); margin: 32px 0 12px; }
.note-content h3 { font-family: var(--font-display); font-style: italic; font-size: 19px; font-weight: 500; color: var(--text); margin: 24px 0 8px; }
.note-content a { color: var(--accent); }
.note-content a:hover { color: var(--text); }
.note-content code { background: rgba(192,132,252,0.08); border: 1px solid rgba(192,132,252,0.15); border-radius: 4px; padding: 1px 6px; font-size: 13px; font-family: var(--font-mono); }
.note-content pre { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 16px; overflow-x: auto; margin-bottom: 18px; font-size: 12.5px; font-family: var(--font-mono); }
#note-footer { display: flex; justify-content: space-between; padding: 20px 0; border-top: 1px solid rgba(255,255,255,0.05); margin-top: 40px; font-size: 11px; color: var(--dim); }

/* ── ERROR PAGES ── */
body.error-page { display: flex; align-items: center; justify-content: center; }
.err-win { position: relative !important; transform: none !important; width: 360px !important; text-align: center; }
.err-body { padding: 36px 32px 28px; }
.err-code {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 86px; letter-spacing: -.045em; line-height: 1;
  color: var(--text); margin-bottom: 14px;
  font-variation-settings: 'opsz' 144;
}
.err-msg { font-family: var(--font-display); font-style: italic; font-size: 15px; color: var(--text-2); margin-bottom: 22px; line-height: 1.5; opacity: 0.78; }
.err-home { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(192,132,252,0.3); padding-bottom: 2px; }
.err-home:hover { color: var(--text); -webkit-text-fill-color: var(--text); border-color: var(--text); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(192,132,252,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(192,132,252,0.25); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .win-hero { width: min(420px, calc(100vw - 320px)); }
  .win-gb { width: min(400px, calc(100vw - 40px)); }
  .gb-grid { grid-template-columns: 1fr 1fr; }
  .gb-win-entry:last-child { display: none; }
}

@media (max-width: 680px) {
  html, body { height: auto; overflow: auto; }
  #site { height: auto; min-height: 100vh; }
  .desktop { overflow: visible; height: auto; padding: 8px 0 12px; display: flex; flex-direction: column; gap: 10px; }
  .win { position: relative !important; top: auto !important; left: auto !important;
    right: auto !important; bottom: auto !important; transform: none !important;
    width: calc(100% - 24px) !important; margin: 0 auto; border-radius: 12px; }
  .subpage-win.win { height: auto !important; }
  .win-split { flex-direction: column; }
  .win-sidebar { width: 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.04); padding: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
  .wsb-section { display: none; }
  .wsb-item { border-radius: 99px; padding: 4px 12px; margin: 0; }
  .win-content { padding: 16px; }
  .win-hero { order: -1; }
  .win-np { order: 0; }
  .win-notes { order: 1; }
  .win-gb { order: 2; }
  .gb-grid { grid-template-columns: 1fr; }
  .dock { padding: 6px 10px; gap: 6px; }
  .di-box { width: 38px; height: 38px; font-size: 18px; }
}
