:root {
  --ink: #f4eaf0;
  --muted: #cdb9c6;
  --dim: #a8929f;
  --win: rgba(78, 58, 74, 0.86);
  --win-solid: #4d3a49;
  --side: rgba(64, 47, 60, 0.92);
  --bar: rgba(92, 70, 88, 0.75);
  --line: rgba(255, 255, 255, 0.09);
  --card: rgba(255, 255, 255, 0.05);
  --card-h: rgba(255, 255, 255, 0.09);
  --lime: #b9d84a;
  --pink: #f39aa6;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --radius: 18px;
  --shadow: 0 30px 80px rgba(10, 4, 10, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.07);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: #2a2128;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.ic { flex: none; display: block; }

/* ---------- wallpaper ---------- */
.wall {
  position: fixed; inset: 0; z-index: 0;
  background: #2c2230 url('/img/dunes.svg') center bottom / cover no-repeat;
  transition: filter .5s ease;
}
.wall.custom { background-position: center; }
body.win-open .wall { filter: saturate(1.05) brightness(.85); }

/* ---------- menubar ---------- */
.menubar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 34px; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(38, 28, 36, 0.55);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  font-size: 13.5px; font-weight: 500;
}
.mb-name { text-decoration: none; font-weight: 600; letter-spacing: .1px; }
.mb-right { display: flex; align-items: center; gap: 18px; }
.mb-btn { background: none; border: 0; padding: 4px; opacity: .85; display: flex; }
.mb-btn:hover { opacity: 1; }
.mb-clock { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- clock widget ---------- */
.clock-widget {
  position: fixed; top: 58px; right: 24px; z-index: 5;
  width: 220px; padding: 14px 16px 12px;
  border-radius: 18px;
  background: rgba(60, 44, 56, 0.55);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.cw-city { font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.cw-time { font-family: var(--serif); font-weight: 500; font-size: 38px; line-height: 1.15; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
body.win-open .cw-time { color: #f2b3bd; }
.cw-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); background: rgba(255,255,255,.06); padding: 4px 10px 4px 8px; border-radius: 999px; width: max-content; max-width: 100%; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); flex: none; display: inline-block; }
.dot.off { background: #f0a24a; box-shadow: 0 0 8px #f0a24a; }

/* ---------- desktop / hero ---------- */
.desktop {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding: 96px 24px 40px; overflow-y: auto;
}
.hero { text-align: center; max-width: 820px; animation: rise .8s ease both; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .4px; text-transform: uppercase;
  padding: 7px 16px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(255,255,255,.04);
}
.badge .sep { opacity: .6; }
.hero-title {
  font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5vw, 52px); line-height: 1.12;
  margin: 34px 0 18px; letter-spacing: -.3px; color: #eee2e8;
}
.hero-title em { font-style: italic; }
.hero-sub { font-size: clamp(15px, 1.6vw, 17px); line-height: 1.6; color: #e3d5dc; margin: 0 auto 28px; max-width: 610px; }
.cta {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: #fff; color: #1d1519; font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .2s, box-shadow .2s;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,.35); }

.icons { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 46px; margin-top: 56px; animation: rise .8s .15s ease both; }
.app-icon { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; width: 96px; }
.app-icon img { width: 66px; height: 66px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.35)); transition: transform .2s cubic-bezier(.3,1.6,.6,1); }
.app-icon:hover img { transform: translateY(-5px) scale(1.06); }
.app-icon:active img { transform: scale(.94); }
.app-icon span { font-size: 13px; padding: 3px 10px; border-radius: 7px; background: rgba(40, 30, 38, 0.55); backdrop-filter: blur(6px); white-space: nowrap; }
body.win-open .desktop { visibility: hidden; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- windows ---------- */
#windows { position: fixed; inset: 34px 0 0; z-index: 10; pointer-events: none; }
.win {
  pointer-events: auto;
  position: absolute; left: 50%; top: 50%;
  width: min(1340px, calc(100vw - 48px)); height: min(780px, calc(100vh - 34px - 70px));
  transform: translate(-50%, -50%);
  display: flex; overflow: hidden;
  border-radius: var(--radius);
  background: var(--win);
  backdrop-filter: blur(30px) saturate(1.3); -webkit-backdrop-filter: blur(30px) saturate(1.3);
  box-shadow: var(--shadow);
  animation: winIn .32s cubic-bezier(.2,.9,.3,1.1) both;
}
.win.closing { animation: winOut .2s ease both; }
.win.max { width: calc(100vw - 16px); height: calc(100vh - 34px - 16px); border-radius: 12px; }
.win.sm { width: min(780px, calc(100vw - 48px)); height: auto; max-height: calc(100vh - 34px - 60px); }
@keyframes winIn { from { opacity: 0; transform: translate(-50%, -46%) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes winOut { to { opacity: 0; transform: translate(-50%, -48%) scale(.97); } }

.lights { display: flex; gap: 8px; align-items: center; }
.lights button { width: 13px; height: 13px; border-radius: 50%; border: 0; padding: 0; position: relative; }
.lights .r { background: #ff5f57; } .lights .y { background: #febc2e; } .lights .g { background: #28c840; }
.lights:hover button::after { position: absolute; inset: 0; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: rgba(0,0,0,.55); line-height: 1; }
.lights:hover .r::after { content: '×'; font-size: 11px; } .lights:hover .y::after { content: '–'; } .lights:hover .g::after { content: '+'; }

.win-side {
  width: 244px; flex: none; background: var(--side);
  border-right: 1px solid var(--line); padding: 22px 16px; overflow-y: auto;
}
.win-side .lights { margin: 0 0 28px 6px; }
.side-label { font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--dim); margin: 0 0 10px 10px; font-weight: 500; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: 0; text-align: left; padding: 10px 12px; border-radius: 9px;
  font-size: 14.5px; color: var(--ink); opacity: .9;
}
.side-nav button:hover { background: rgba(255,255,255,.05); }
.side-nav button.active { background: rgba(255,255,255,.1); opacity: 1; }
.side-nav .ic { opacity: .8; }

.win-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.win-bar {
  height: 58px; flex: none; display: flex; align-items: center; gap: 14px;
  padding: 0 24px; background: var(--bar); border-bottom: 1px solid var(--line);
}
.win-bar .title { font-weight: 500; font-size: 15px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-arrows { display: flex; gap: 2px; }
.nav-arrows button { background: none; border: 0; padding: 4px; opacity: .75; }
.nav-arrows button:disabled { opacity: .3; cursor: default; }
.btn-close { background: none; border: 0; color: var(--pink); font-weight: 500; font-size: 15px; padding: 6px 2px; display: flex; align-items: center; gap: 6px; }
.btn-close:hover { color: #ffc2ca; }
.win-body { flex: 1; overflow-y: auto; padding: 30px 40px 40px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }

/* ---------- about ---------- */
.about-top { display: grid; grid-template-columns: 330px 1fr; gap: 48px; align-items: start; }
.photo {
  width: 100%; aspect-ratio: 330/390; border-radius: 16px; overflow: hidden;
  background: linear-gradient(150deg, #5a4655, #2e2329); box-shadow: 0 16px 40px rgba(0,0,0,.35);
  display: grid; place-items: center;
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .initials { font-family: var(--serif); font-size: 92px; font-style: italic; color: rgba(255,255,255,.35); }
.kicker { font-size: 12.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin: 10px 0 14px; font-weight: 500; }
.about-h { font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 3.6vw, 50px); line-height: 1.1; margin: 0; letter-spacing: -.3px; }
.about-sub { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--lime); font-size: clamp(24px, 2.6vw, 36px); margin: 8px 0 20px; }
.about-p { font-size: 16px; line-height: 1.75; color: #eadde4; margin: 0 0 16px; }
.divider { height: 1px; background: rgba(255,255,255,.12); margin: 30px 0; }
.about-cols { display: grid; grid-template-columns: 1.15fr 1fr; }
.about-cols > div:first-child { padding-right: 40px; border-right: 1px solid rgba(255,255,255,.12); }
.about-cols > div:last-child { padding-left: 44px; }
.sec-h { font-family: var(--serif); font-weight: 600; font-size: 34px; margin: 0 0 24px; }
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 12px; }
.service { text-align: center; font-size: 13.5px; line-height: 1.35; color: #eadde4; }
.service .ibox { width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); }
.tools { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 20px; }
.tool { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 21px; letter-spacing: -.5px; box-shadow: inset 0 0 0 1.5px currentColor; }
.tool-note { color: #eadde4; font-size: 14.5px; }
.tools.big .tool { width: 64px; height: 64px; font-size: 26px; }
.tool-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 10px; }
.tool-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; background: var(--card); }
.services.large { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.services.large .service { text-align: left; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; background: var(--card); font-size: 15px; }
.services.large .ibox { margin: 0; }

.timeline { display: flex; flex-direction: column; gap: 6px; }
.job { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.job:last-child { border-bottom: 0; }
.job .period { color: var(--lime); font-family: var(--mono); font-size: 12.5px; padding-top: 5px; }
.job h3 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 0 0 2px; }
.job .co { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.job ul { margin: 0; padding-left: 18px; color: #eadde4; line-height: 1.65; font-size: 15px; }

/* ---------- work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 26px; }
.work-card { cursor: pointer; background: none; border: 0; padding: 0; text-align: left; display: flex; flex-direction: column; justify-content: flex-start; align-self: start; }
.work-thumb { position: relative; aspect-ratio: 16/11; border-radius: 14px; overflow: hidden; background: #3a2c36; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.work-thumb .ph { width: 100%; height: 100%; transition: transform .5s ease; }
.work-card:hover .work-thumb img, .work-card:hover .work-thumb .ph { transform: scale(1.05); }
.work-tag { position: absolute; top: 14px; left: 14px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; padding: 6px 11px; border-radius: 999px; background: rgba(30, 22, 28, .6); backdrop-filter: blur(6px); }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; border: 2px solid rgba(255,255,255,.9); display: grid; place-items: center; background: rgba(0,0,0,.2); backdrop-filter: blur(3px); transition: transform .2s; }
.play .ic { fill: #fff; stroke: none; margin-left: 3px; }
.work-card:hover .play { transform: translate(-50%, -50%) scale(1.1); }
.work-card h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; margin: 16px 0 4px; }
.work-card p { margin: 0; color: #e3d5dc; font-size: 14.5px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------- contact ---------- */
.contact { padding: 14px 30px 36px; }
.contact .kicker { margin-top: 18px; }
.contact h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(36px, 4.2vw, 58px); line-height: 1.05; margin: 6px 0 22px; }
.contact h2 em { color: var(--pink); font-weight: 500; }
.contact p { font-size: 17px; line-height: 1.7; color: #f1e5eb; margin: 0 0 22px; }
.status-line { display: flex; align-items: center; gap: 10px; font-size: 16px; margin-bottom: 36px; }
.links { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.link-card { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 14px; text-decoration: none; background: rgba(40,28,36,.45); border: 1px solid rgba(255,255,255,.08); transition: background .2s, transform .2s; }
.link-card:hover { background: rgba(255,255,255,.08); transform: translateY(-2px); }
.link-card .lbox { width: 42px; height: 42px; border-radius: 10px; background: rgba(255,255,255,.08); display: grid; place-items: center; font-weight: 700; flex: none; }
.link-card b { display: block; font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.link-card small { color: var(--muted); font-size: 13px; word-break: break-all; }
.link-card .arr { margin-left: auto; opacity: .7; }

/* ---------- resume viewer ---------- */
.pdf-wrap { flex: 1; display: flex; min-height: 0; }
.pdf-thumbs { width: 140px; flex: none; background: rgba(50, 36, 46, .7); border-right: 1px solid var(--line); overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.pdf-thumbs canvas { width: 100%; border-radius: 3px; border: 3px solid transparent; cursor: pointer; background: #fff; }
.pdf-thumbs canvas.on { border-color: #3d8cff; }
.pdf-pages { flex: 1; overflow: auto; padding: 10px 24px 30px; display: flex; flex-direction: column; align-items: center; gap: 18px; background: rgba(40, 28, 36, .35); }
.pdf-pages canvas { background: #fff; box-shadow: 0 6px 30px rgba(0,0,0,.4); max-width: none; }
.pdf-foot { height: 46px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-top: 1px solid var(--line); background: var(--bar); font-size: 13.5px; }
.zoom { display: flex; align-items: center; gap: 12px; }
.zoom button { background: none; border: 0; font-size: 18px; width: 24px; }
.zoom input { width: 110px; accent-color: #d7c7d0; }
.btn-dl { background: none; border: 0; font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 4px; text-decoration: none; }
.pdf-msg { margin: auto; text-align: center; color: var(--muted); padding: 30px; }

/* ---------- paint ---------- */
.paint-body { padding: 20px 24px 22px; display: flex; flex-direction: column; gap: 20px; }
.paint-body > * { flex: none; }
.paint-top { display: grid; grid-template-columns: 200px 1fr; gap: 20px; min-height: 0; }
.tools-panel { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.tools-panel .tbtn { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; background: none; border: 0; text-align: left; font-size: 15px; }
.tools-panel .tbtn:hover { background: rgba(255,255,255,.05); }
.tools-panel .tbtn.on { background: rgba(255,255,255,.11); }
.tools-panel hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; width: 100%; }
.tools-panel label { font-size: 14px; margin: 6px 8px 10px; display: block; }
.tools-panel input[type=range] { width: calc(100% - 16px); margin: 0 8px; accent-color: #fff; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 0 8px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); padding: 0; }
.sw.on { outline: 2px solid #fff; outline-offset: 2px; }
.sw.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); position: relative; overflow: hidden; }
.sw.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.mini-row { display: flex; gap: 6px; padding: 10px 8px 0; }
.mini-row button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 7px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.04); font-size: 12.5px; }
.canvas-box { border-radius: 14px; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.35); background: #fff; align-self: start; position: relative; }
.canvas-box canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 8px 16px; border: 0; font-size: 14px; font-weight: 500; }
.pill-btn.light { background: #f3ecf0; color: #2a1f26; }
.pill-btn.ghost { background: none; }
.gallery { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.gal-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.gal-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.gal-head small { color: var(--muted); display: block; font-size: 12.5px; margin-top: 2px; }
.seg { display: flex; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.18); margin-left: auto; }
.seg button { background: none; border: 0; padding: 6px 16px; border-radius: 999px; font-size: 13.5px; }
.seg button.on { background: #f3ecf0; color: #2a1f26; }
.search { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); min-width: 230px; }
.search input { background: none; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 13.5px; width: 100%; }
.gal-row { display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.art { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 8px; }
.art.mine { border-color: rgba(243,154,166,.7); box-shadow: 0 0 0 1px rgba(243,154,166,.3); }
.art img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; display: block; cursor: zoom-in; background: #fff; }
.art .meta { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px 0; font-size: 13px; }
.art .meta small { display: block; color: var(--dim); font-size: 11.5px; }
.like { display: flex; align-items: center; gap: 5px; background: none; border: 0; font-size: 13px; }
.like.on .ic { fill: #fff; }

/* ---------- game ---------- */
.game-body { flex: 1; display: grid; grid-template-columns: 1fr 290px; gap: 0; min-height: 0; }
.game-stage { position: relative; min-height: 0; background: #1b1418; overflow: hidden; border-bottom-left-radius: var(--radius); }
.game-stage canvas { width: 100%; height: 100%; display: block; }
.hud { position: absolute; top: 20px; padding: 10px 18px; border-radius: 14px; background: rgba(20, 14, 18, .45); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.12); }
.hud small { display: flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 600; color: #ffb25e; }
.hud b { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hud.l { left: 20px; } .hud.r { right: 20px; text-align: right; } .hud.r small { justify-content: flex-end; }
.pad { position: absolute; bottom: 22px; display: flex; gap: 26px; }
.pad.l { left: 30px; } .pad.r { right: 30px; }
.pad button { width: 110px; height: 86px; border-radius: 18px; border: 1px solid rgba(255,255,255,.2); background: rgba(30, 22, 28, .45); backdrop-filter: blur(6px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 15px; user-select: none; -webkit-user-select: none; touch-action: none; }
.pad button.go { background: rgba(70, 140, 60, .35); border-color: rgba(140, 230, 110, .4); color: #9de27a; }
.pad button.go span { color: #fff; }
.pad button.stop { color: #ff5a4e; } .pad button.stop span { color: #fff; }
.pad button:active, .pad button.held { transform: scale(.95); background: rgba(255,255,255,.15); }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15, 10, 14, .45); backdrop-filter: blur(2px); text-align: center; }
.overlay h2 { font-family: var(--serif); font-size: 46px; margin: 0 0 6px; font-weight: 600; }
.overlay p { margin: 0 0 22px; color: #eadde4; }
.overlay .big { font-size: 15px; padding: 13px 26px; }
.board { background: rgba(40, 28, 36, .6); border-left: 1px solid var(--line); padding: 22px 20px; display: flex; flex-direction: column; }
.board h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 20px; font-weight: 600; }
.board .ic { color: #f6b73c; }
.board .seg { margin: 0 0 18px; justify-content: space-between; }
.board .seg button { padding: 6px 12px; }
.ranks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; overflow-y: auto; }
.ranks li { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; font-size: 15px; }
.ranks li.me { background: rgba(255,255,255,.09); }
.ranks .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.ranks li:nth-child(1) .n { background: #f6c23c; color: #3a2a00; }
.ranks li:nth-child(2) .n { background: #c9ccd6; color: #2a2a33; }
.ranks li:nth-child(3) .n { background: #e09452; color: #3a1c00; }
.ranks .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranks .sc { font-variant-numeric: tabular-nums; }
.save-score { margin-top: 14px; width: 100%; justify-content: center; padding: 14px; font-size: 15.5px; font-weight: 600; }
.save-score:disabled { opacity: .45; cursor: default; }
.round-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); display: grid; place-items: center; }
.pill-btn.gold { background: rgba(255,255,255,.08); color: var(--ink); }
.pill-btn.gold .ic { color: #f6b73c; }

/* ---------- lightbox / modal / toast ---------- */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(12, 8, 12, .78); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 30px; }
.lightbox[hidden] { display: none; }
.lb-inner { width: min(1100px, 100%); position: relative; }
.lb-media { width: 100%; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lb-media iframe, .lb-media video, .lb-media img { width: 100%; height: 100%; border: 0; display: block; object-fit: contain; }
.lb-cap { margin-top: 16px; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.lb-cap h3 { font-family: var(--serif); font-size: 26px; margin: 0; font-weight: 600; }
.lb-cap p { margin: 4px 0 0; color: var(--muted); }
.lb-close { position: absolute; top: -46px; right: 0; background: rgba(255,255,255,.1); border: 0; border-radius: 999px; padding: 8px 14px; display: flex; gap: 6px; align-items: center; }
.modal { width: min(420px, 100%); background: var(--win-solid); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 26px; font-weight: 600; }
.modal p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.modal input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); background: rgba(0,0,0,.2); color: var(--ink); font: inherit; outline: none; }
.modal input:focus { border-color: var(--pink); }
.modal .row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal .err { color: #ff9a9a; font-size: 13px; min-height: 18px; margin-top: 8px; }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 90; background: rgba(30, 22, 28, .92); padding: 11px 18px; border-radius: 999px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); border: 1px solid var(--line); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .about-top { grid-template-columns: 260px 1fr; gap: 32px; }
  .about-cols { grid-template-columns: 1fr; }
  .about-cols > div:first-child { padding-right: 0; border-right: 0; padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 30px; }
  .about-cols > div:last-child { padding-left: 0; }
  .game-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .board { border-left: 0; border-top: 1px solid var(--line); max-height: 260px; }
}
@media (max-width: 760px) {
  body { overflow: auto; }
  .clock-widget { position: static; margin: 0 auto 18px; width: auto; max-width: 260px; display: none; }
  .menubar { padding: 0 14px; }
  .mb-clock { font-size: 12.5px; }
  .desktop { padding-top: 70px; }
  .badge { font-size: 10.5px; gap: 6px; padding: 6px 12px; }
  .icons { gap: 20px 10px; margin-top: 40px; }
  .app-icon { width: 92px; }
  #windows { inset: 34px 0 0; }
  .win, .win.sm, .win.max { left: 0; top: 0; transform: none; width: 100vw; height: calc(100dvh - 34px); max-height: none; border-radius: 0; flex-direction: column; animation: mobIn .25s ease both; }
  .win.closing { animation: mobOut .2s ease both; }
  @keyframes mobIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
  @keyframes mobOut { to { opacity: 0; transform: translateY(30px); } }
  .win-side { width: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .win-side .lights, .win-side .side-label { display: none; }
  .side-nav { flex-direction: row; overflow-x: auto; gap: 6px; }
  .side-nav button { white-space: nowrap; width: auto; padding: 8px 12px; font-size: 13.5px; }
  .win-bar { padding: 0 14px; height: 50px; }
  .win-body { padding: 20px 18px 30px; }
  .about-top { grid-template-columns: 1fr; }
  .photo { max-width: 260px; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: 1fr; }
  .contact { padding: 10px 6px 20px; }
  .links { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; gap: 6px; }
  .pdf-thumbs { display: none; }
  .pdf-pages { padding: 10px; }
  .paint-top { grid-template-columns: 1fr; }
  .tools-panel { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .tools-panel .tbtn { font-size: 13px; padding: 7px 10px; }
  .tools-panel hr { display: none; }
  .tools-panel .size-wrap, .tools-panel .color-wrap { flex: 1 1 100%; }
  .swatches { grid-template-columns: repeat(8, 1fr); }
  .seg { margin-left: 0; }
  .search { min-width: 0; flex: 1; }
  .pad { gap: 10px; bottom: 12px; } .pad.l { left: 10px; } .pad.r { right: 10px; }
  .pad button { width: 72px; height: 64px; font-size: 12px; }
  .hud { top: 10px; padding: 6px 12px; } .hud.l { left: 10px; } .hud.r { right: 10px; }
  .hud b { font-size: 20px; } .hud small { font-size: 13px; }
  .game-stage { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* game extras */
.overlay[hidden] { display: none; }
.game-body.noboard { grid-template-columns: 1fr; }
.game-body.noboard .board { display: none; }
.win-game .win-bar .title { font-size: 19px; font-weight: 600; }
.win-paint .win-bar .title { font-size: 19px; font-weight: 600; }
.win:fullscreen { width: 100vw !important; height: 100vh !important; border-radius: 0; transform: none !important; left: 0; top: 0; animation: none; }

body:has(.win:not(.sm)) .clock-widget { opacity: 0; visibility: hidden; }
.clock-widget { transition: opacity .25s; }
@media (max-width: 760px) {
  .win-game .lbtn, .win-game .fs, .win-game .win-bar .title { display: none; }
  .win-paint .win-bar .title { display: none; }
  .win-bar .pill-btn { padding: 7px 11px; font-size: 13px; }
  .bar-extra { margin-right: 4px !important; gap: 6px !important; }
  .win-bar { gap: 10px; }
  .win-bar .lights + .title, .win-bar .lights { flex: none; }
  .bar-extra { margin-left: auto; }
}
.lb-media .ph { width: 100%; height: 100%; }
