/* ============================================================
   RETRO DESKTOP — Win9x-flavored portfolio OS
   ============================================================ */

:root {
  /* ===== ハイドレンジアブルーを主役にした寒色パレット =====
     メイン: #3F61A1 / タイトルバーだけ暖色ピンクのアクセント */
  --hydrangea: #3f61a1;  /* メインカラー */
  --navy: #25386b;       /* 寒色・濃 */
  --sky: #6f97d6;        /* 寒色・中 */
  --pale: #c9d9ef;       /* 寒色・淡 */

  /* themeable via Tweaks */
  --accent-1: #e0588f;   /* active titlebar (left) — 暖色アクセント */
  --accent-2: #f4a3c8;   /* active titlebar (right) — 暖色アクセント */
  --accent-solid: #3f61a1;  /* メイン操作色（ボタン・選択） */
  --wall-a: #4f74bd;     /* wallpaper top */
  --wall-b: #29407e;     /* wallpaper bottom */
  --win-radius: 0px;

  /* fixed chrome palette — 寒色寄りのグレー */
  --face: #c7cdd8;
  --face-lt: #e9edf4;
  --hi: #ffffff;
  --sh: #8089a0;
  --dk: #3c4357;
  --ink: #1b2230;
  --teal: #355a9c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%; overflow: hidden;
  font-family: var(--font-ui, "BIZ UDPGothic", "MS PGothic", system-ui, sans-serif);
  color: var(--ink);
  -webkit-font-smoothing: none;
  user-select: none;
  touch-action: manipulation;
}
html[data-font="dot"] { --font-ui: "DotGothic16", "BIZ UDPGothic", monospace; }
html[data-font="system"] { --font-ui: system-ui, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif; }

img { image-rendering: pixelated; }

/* ---------- Desktop ---------- */
#desktop {
  position: fixed; inset: 0 0 38px 0;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 70% 12%, rgba(255,255,255,.12), transparent 60%),
    linear-gradient(180deg, var(--wall-a), var(--wall-b));
}

/* ---------- Desktop icons ---------- */
#icon-layer {
  position: absolute; inset: 0; z-index: 2;
}
.desk-icon {
  position: absolute; width: 88px; padding: 8px 4px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; border: 1px solid transparent;
  text-align: center; touch-action: none;
}
.desk-icon.dragging { opacity: .85; z-index: 50; cursor: grabbing; }
.desk-icon .ico { width: 48px; height: 48px; filter: drop-shadow(1px 1px 0 rgba(0,0,0,.35)); }
.desk-icon .ico svg, .desk-icon .ico img { width: 100%; height: 100%; }
.ai { display: inline-flex; line-height: 0; }
.ai svg, .ai img { display: block; }
.icon-drop-over { outline: 2px dashed var(--accent-solid); outline-offset: 1px; background: rgba(255,255,255,.18); }
.desk-icon.icon-drop-over { background: rgba(255,255,255,.28); border-color: #fff; }
.desk-icon .lbl {
  font-size: 13px; line-height: 1.25; color: #fff;
  text-shadow: 1px 1px 0 rgba(0,0,0,.85), 0 0 2px rgba(0,0,0,.6);
  padding: 1px 3px;
}
.desk-icon.sel { border-color: #fff8; }
.desk-icon.sel .lbl { background: var(--accent-solid); text-shadow: none; }

/* ---------- Pinned note (hero) ---------- */
#pinned {
  position: absolute; z-index: 1;
  right: 7%; top: 22%;
  width: 360px; max-width: 42vw;
  background: #f3eccf;
  color: #2b3a55;
  padding: 30px 30px 26px;
  box-shadow: 3px 5px 0 rgba(0,0,0,.28);
  clip-path: polygon(0 0, 100% 0, 100% 88%, 88% 100%, 0 100%);
}
#pinned .pin {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #6ba3e8, #1d5fc0 70%);
  box-shadow: 1px 3px 3px rgba(0,0,0,.4), inset -2px -2px 3px rgba(0,0,0,.3);
}
#pinned .pin::after {
  content: ""; position: absolute; left: 50%; top: 90%;
  width: 3px; height: 12px; background: #6b7480; transform: translateX(-50%);
}
#pinned hr { border: none; border-top: 1px solid #b9b08a; margin: 0 0 16px; }
#pinned .dots { border: none; border-top: 2px dotted #8aa0c0; margin: 16px 0; }
#pinned h1 { font-size: 30px; line-height: 1.35; margin: 6px 0 0; text-align: center; letter-spacing: .04em; }
#pinned p { font-size: 14px; line-height: 1.85; margin: 0; text-align: center; }
#pinned .foot { border: none; border-top: 1px solid #b9b08a; margin: 18px 0 0; }

/* ---------- Windows ---------- */
.window {
  position: absolute; z-index: 10;
  display: flex; flex-direction: column;
  min-width: 240px; min-height: 150px;
  background: var(--face);
  border: 2px solid; border-color: var(--hi) var(--dk) var(--dk) var(--hi);
  box-shadow: inset 1px 1px 0 var(--face-lt), inset -1px -1px 0 var(--sh), 2px 2px 0 rgba(0,0,0,.35);
  border-radius: var(--win-radius);
  overflow: hidden;
}
.window.min { display: none; }
.window.snap-front { z-index: 60; }

.titlebar {
  height: 30px; flex: 0 0 30px;
  display: flex; align-items: center; gap: 7px;
  padding: 0 4px 0 6px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  color: #fff; cursor: grab;
}
.window.inactive .titlebar { background: linear-gradient(90deg, #8a9099, #aeb4bb); }
.titlebar .t-ico { width: 18px; height: 18px; flex: 0 0 18px; }
.titlebar .t-ico svg { width: 100%; height: 100%; }
.titlebar .t-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.titlebar .t-btns { display: flex; gap: 3px; }
.tbtn {
  width: 22px; height: 20px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--face); color: #000;
  border: 2px solid; border-color: var(--hi) var(--dk) var(--dk) var(--hi);
  box-shadow: inset 1px 1px 0 var(--face-lt), inset -1px -1px 0 var(--sh);
  cursor: pointer; font-size: 0;
}
.tbtn:active { border-color: var(--dk) var(--hi) var(--hi) var(--dk); box-shadow: none; }
.tbtn .g { display: block; }
.tbtn.min .g { width: 9px; height: 2px; background: #000; margin-top: 7px; }
.tbtn.max .g { width: 11px; height: 9px; border: 1px solid #000; border-top-width: 2px; }
.tbtn.close .g { width: 11px; height: 11px; position: relative; }
.tbtn.close .g::before, .tbtn.close .g::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px;
  background: #000; transform-origin: center;
}
.tbtn.close .g::before { transform: translate(-50%,-50%) rotate(45deg); }
.tbtn.close .g::after { transform: translate(-50%,-50%) rotate(-45deg); }

.win-body {
  flex: 1; min-height: 0; overflow: auto;
  background: var(--face);
  -webkit-overflow-scrolling: touch;
}
.win-pad { padding: 14px 16px 18px; }

/* sunken content panel */
.sunken {
  background: #e3e9f3; border: 2px solid; border-color: var(--sh) var(--hi) var(--hi) var(--sh);
  box-shadow: inset 1px 1px 0 rgba(0,0,0,.12);
}
.field { background: #fff; border: 2px solid; border-color: var(--sh) var(--hi) var(--hi) var(--sh); }

/* resize handle */
.resize-h {
  position: absolute; right: 0; bottom: 0; width: 16px; height: 16px;
  cursor: nwse-resize; z-index: 5;
}
.resize-h::after {
  content: ""; position: absolute; right: 2px; bottom: 2px; width: 8px; height: 8px;
  background:
    linear-gradient(135deg, transparent 45%, var(--sh) 45% 55%, transparent 55%),
    linear-gradient(135deg, transparent 70%, var(--sh) 70% 80%, transparent 80%);
}

/* ---------- generic buttons ---------- */
.btn {
  font: inherit; font-size: 14px; cursor: pointer;
  padding: 6px 14px; min-height: 32px;
  background: var(--face); color: var(--ink);
  border: 2px solid; border-color: var(--hi) var(--dk) var(--dk) var(--hi);
  box-shadow: inset 1px 1px 0 var(--face-lt), inset -1px -1px 0 var(--sh);
}
.btn:active, .btn.on {
  border-color: var(--dk) var(--hi) var(--hi) var(--dk);
  box-shadow: inset 1px 1px 0 var(--sh);
}
.btn.primary { background: var(--accent-solid); color: #fff; border-color: #fff6 #0006 #0006 #fff6; }
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 3px; padding: 8px 10px 0; }
.tab {
  font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap;
  padding: 7px 16px 8px; background: var(--face);
  border: 2px solid; border-color: var(--hi) var(--dk) var(--sh) var(--hi);
  border-bottom: none; border-radius: 5px 5px 0 0;
  margin-bottom: -2px; color: #333;
}
.tab.active { background: #e3e9f3; padding-bottom: 10px; z-index: 2; color: #000; font-weight: 700; }

/* ---------- 自己紹介 ---------- */
.profile-grid { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: start; }
.avatar-slot { width: 200px; height: 200px; }
.avatar-cap { margin-top: 12px; font-size: 14px; line-height: 1.7; color: #2a2f35; }
.info-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; align-items: start; padding: 13px 0; }
.info-row + .info-row { border-top: 1px dashed #aab6cc; }
.info-key { display: flex; align-items: center; gap: 9px; font-weight: 700; color: #333; }
.info-key .k-ico { width: 22px; height: 22px; flex: 0 0 22px; display: grid; place-items: center; }
.info-val { font-size: 15px; line-height: 1.75; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; padding: 3px 9px; background: #d7e2f4; border: 1px solid #9db4d4; }

.skill-row { padding: 12px 2px; }
.skill-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.skill-head b { font-size: 15px; }
.skill-head span { font-size: 13px; color: #555; }
.bar { height: 18px; background: #fff; border: 2px solid; border-color: var(--sh) var(--hi) var(--hi) var(--sh); padding: 2px; }
.bar > i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--accent-solid) 0 9px, #6fa3e6 9px 11px); }
.skill-note { font-size: 13px; color: #555; margin-top: 5px; }

.ach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ach { padding: 18px; text-align: center; }
.ach .n { font-size: 38px; font-weight: 800; color: var(--accent-solid); line-height: 1; }
.ach .l { font-size: 13px; color: #444; margin-top: 8px; }

.timeline { position: relative; padding-left: 8px; }
.tl-row { display: grid; grid-template-columns: 70px 1fr; gap: 16px; padding: 12px 0; }
.tl-row + .tl-row { border-top: 1px dashed #aab6cc; }
.tl-year { font-weight: 800; color: var(--accent-solid); font-size: 17px; }
.tl-text { font-size: 14px; line-height: 1.75; }

/* ---------- 作品一覧 ---------- */
.gallery-wrap { display: grid; grid-template-columns: 1fr 190px; gap: 16px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag-btn { font: inherit; font-size: 14px; cursor: pointer; padding: 6px 16px; min-width: 76px; white-space: nowrap;
  background: var(--face); border: 2px solid; border-color: var(--hi) var(--dk) var(--dk) var(--hi);
  box-shadow: inset 1px 1px 0 var(--face-lt), inset -1px -1px 0 var(--sh); }
.tag-btn.active { background: var(--accent-solid); color: #fff; border-color: var(--dk) var(--hi) var(--hi) var(--dk); box-shadow: inset 1px 1px 0 rgba(0,0,0,.3); }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.work-card { padding: 8px; cursor: pointer; }
.work-card:hover { outline: 2px solid var(--accent-solid); outline-offset: -2px; }
.work-thumb { width: 100%; aspect-ratio: 4/3; }
.work-card .wt { font-size: 14px; font-weight: 700; margin: 9px 2px 7px; line-height: 1.4; }
.tag-pill { font-size: 12px; padding: 2px 9px; border: 1px solid #0002; }
.aside-panel { padding: 14px; }
.aside-h { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.aside-num { font-size: 30px; font-weight: 800; color: var(--accent-solid); }
.hint { background: #e7eefa; border: 1px solid #aebfdc; padding: 10px 12px; font-size: 13px; line-height: 1.7; }
.statusbar { position: sticky; bottom: 0; border-top: 2px solid var(--sh); background: var(--face); font-size: 13px; padding: 6px 12px; color: #333; box-shadow: 0 -1px 0 var(--hi); }

/* work detail */
.detail-grid { display: grid; grid-template-columns: 300px 1fr; gap: 20px; }
.detail-thumb { width: 300px; aspect-ratio: 4/3; }
.detail-meta { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; font-size: 14px; line-height: 1.6; }
.detail-meta dt { font-weight: 700; color: #444; }
.detail-meta dd { margin: 0; }
.detail-pts { margin: 10px 0 0; padding-left: 20px; line-height: 1.9; font-size: 14px; }

/* ---------- ブログ ---------- */
.blog-list { display: flex; flex-direction: column; gap: 12px; }
.blog-item { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 12px; cursor: pointer; }
.blog-item:hover { outline: 2px solid var(--accent-solid); outline-offset: -2px; }
.blog-thumb { width: 96px; height: 72px; }
.blog-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.blog-title { font-size: 15px; font-weight: 700; line-height: 1.4; }
.blog-date { font-size: 12px; color: #666; white-space: nowrap; }
.blog-ex { font-size: 13px; color: #444; line-height: 1.7; margin-top: 6px; }
.post-body { max-width: 640px; line-height: 1.95; font-size: 15px; }
.post-body h3 { font-size: 17px; margin: 22px 0 8px; color: var(--teal); border-bottom: 2px solid #cdd6e6; padding-bottom: 4px; }
.post-hero { width: 100%; aspect-ratio: 16/7; margin-bottom: 16px; }

/* ---------- contact / trash ---------- */
.form-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; margin-bottom: 12px; }
.form-row label { font-weight: 700; font-size: 14px; }
.inp { font: inherit; font-size: 14px; padding: 7px 9px; width: 100%; background: #fff; color: #000;
  border: 2px solid; border-color: var(--sh) var(--hi) var(--hi) var(--sh); }
textarea.inp { resize: vertical; min-height: 92px; }
.trash-empty { text-align: center; padding: 40px 20px; color: #555; }

/* ---------- げーむのたね ---------- */
.seed-add { padding: 14px; }
.seed-add-h { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.seed-tagpick { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.seed-tag { font: inherit; font-size: 13px; cursor: pointer; padding: 4px 11px;
  background: #fff; border: 2px solid; border-color: var(--hi) var(--dk) var(--dk) var(--hi); }
.seed-tag.on { background: var(--c, #e2e4e7); border-color: var(--dk) var(--hi) var(--hi) var(--dk);
  box-shadow: inset 1px 1px 0 rgba(0,0,0,.15); font-weight: 700; }
.seed-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 16px; }
.seed-card { position: relative; padding: 14px 14px 12px; display: flex; flex-direction: column; }
.seed-card:hover { outline: 2px solid var(--accent-solid); outline-offset: -2px; }
.seed-del { position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; line-height: 1;
  font: inherit; font-size: 15px; cursor: pointer; color: #777; background: transparent; border: 0; }
.seed-del:hover { color: var(--accent-solid); }
.seed-title { font-weight: 800; font-size: 16px; line-height: 1.4; margin: 0 22px 7px 0; }
.seed-memo { font-size: 13.5px; line-height: 1.75; color: #444; flex: 1 1 auto; }
.seed-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 12px; }
.seed-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.seed-date { font-size: 12px; color: #888; white-space: nowrap; }
.seed-empty { grid-column: 1/-1; text-align: center; color: #666; padding: 36px 20px; line-height: 1.9; }

/* ---------- カラーパレット ---------- */
.pal-hero { display: grid; grid-template-columns: 150px 1fr; gap: 18px; padding: 16px; align-items: stretch; }
.pal-hero-sw { border: 2px solid; border-color: var(--dk) var(--hi) var(--hi) var(--dk);
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 7px; min-height: 130px; }
.pal-hero-sw span { font-size: 12px; font-weight: 700; color: #fff; background: rgba(0,0,0,.32); padding: 2px 6px; letter-spacing: .04em; }
.pal-hero-title { font-size: 22px; font-weight: 800; color: var(--hydrangea); letter-spacing: .03em; }
.pal-hero-sub { font-size: 13.5px; color: #45506a; margin: 5px 0 12px; line-height: 1.7; }
.pal-spec { display: grid; gap: 4px; }
.pal-spec-row { display: grid; grid-template-columns: 78px 1fr; font-size: 13.5px; line-height: 1.6; }
.pal-spec-k { font-weight: 700; color: #5b6680; }
.pal-spec-v { font-variant-numeric: tabular-nums; color: #222; }
.pal-sec-h { display: flex; align-items: baseline; gap: 12px; font-weight: 800; font-size: 15px; margin: 20px 2px 12px; color: #222; }
.pal-sec-h span { font-weight: 400; font-size: 12.5px; color: #6b7488; }
.pal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pal-card { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 10px; align-items: center; }
.pal-chip { width: 64px; height: 64px; border: 2px solid; border-color: var(--dk) var(--hi) var(--hi) var(--dk); }
.pal-name { font-weight: 800; font-size: 14.5px; display: flex; align-items: center; gap: 7px; }
.pal-temp { font-size: 11px; font-weight: 700; padding: 1px 7px; border: 1px solid; }
.pal-temp.cool { color: #2b4a86; background: #d7e2f4; border-color: #9db4d4; }
.pal-temp.warm { color: #9c3a66; background: #f7d6e6; border-color: #e3a3c2; }
.pal-role { font-size: 12.5px; color: #5b6680; margin: 3px 0 6px; }
.pal-codes { font-size: 12.5px; color: #333; font-variant-numeric: tabular-nums; }
.pal-story { padding: 16px; margin-top: 18px; }
.pal-story-h { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 15px; margin-bottom: 10px; color: var(--hydrangea); }
.pal-story p { font-size: 14px; line-height: 1.95; margin: 0 0 10px; color: #2c3445; }
.pal-story p:last-child { margin-bottom: 0; }

/* ---------- 編集モード ---------- */
.ed-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ed-bar-h { font-weight: 800; font-size: 16px; }
.ed-list { display: flex; flex-direction: column; gap: 8px; }
.ed-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; }
.ed-card-main { min-width: 0; }
.ed-card-title { font-weight: 700; font-size: 15px; line-height: 1.4; }
.ed-card-sub { display: flex; align-items: center; gap: 9px; margin-top: 5px; }
.ed-meta { font-size: 12.5px; color: #5b6680; }
.ed-card-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.ed-empty { text-align: center; color: #666; padding: 34px 20px; line-height: 1.9; }
.btn.danger { color: #9c3258; }
.btn.danger:hover { background: #f7d6e6; }
.btn.ghost { background: transparent; border-color: var(--sh) var(--sh) var(--sh) var(--sh); box-shadow: none; color: var(--accent-solid); font-weight: 700; }

.ed-field { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; margin-bottom: 14px; }
.ed-field > label { font-weight: 700; font-size: 14px; padding-top: 8px; color: #2c3445; }
.ed-field textarea.inp { min-height: 70px; }
.ed-field select.inp { width: auto; min-width: 160px; }
.ed-thumb { width: 180px; height: 120px; }
.ed-note { font-size: 12px; color: #6b7488; margin-top: 6px; }
.ed-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

.ed-body { display: flex; flex-direction: column; gap: 10px; }
.ed-body-row { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.ed-body-row-h { display: flex; gap: 8px; align-items: center; }
.ed-body-row-h .inp { flex: 1; }
.btn.ed-brm { min-height: 0; padding: 4px 10px; font-size: 15px; line-height: 1; flex: 0 0 auto; }
.ed-body-row textarea.inp { min-height: 56px; }

.ed-export-h { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 14px; margin-bottom: 7px; }
.ed-code { width: 100%; min-height: 150px; font-family: "DotGothic16", ui-monospace, monospace; font-size: 12px; line-height: 1.5; white-space: pre; overflow: auto; }

/* ---------- Taskbar ---------- */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 38px; z-index: 5000;
  display: flex; align-items: center; gap: 5px; padding: 3px 5px;
  background: var(--face);
  border-top: 2px solid var(--hi);
  box-shadow: inset 0 1px 0 var(--face-lt);
}
#start-btn {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 7px;
  font-weight: 800; font-size: 15px; cursor: pointer; flex: 0 0 auto;
  background: var(--face); border: 2px solid; border-color: var(--hi) var(--dk) var(--dk) var(--hi);
  box-shadow: inset 1px 1px 0 var(--face-lt), inset -1px -1px 0 var(--sh);
}
#start-btn.on { border-color: var(--dk) var(--hi) var(--hi) var(--dk); box-shadow: inset 1px 1px 0 var(--sh); }
#start-btn .si { width: 22px; height: 22px; display: inline-flex; }
#start-btn .si svg, #start-btn .si img { width: 22px; height: 22px; }
.tb-sep { width: 2px; align-self: stretch; margin: 3px 2px; background: var(--sh); box-shadow: 1px 0 0 var(--hi); flex: 0 0 auto; }
#task-btns { display: flex; gap: 4px; flex: 1; min-width: 0; overflow: hidden; }
.task-btn {
  display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; min-width: 0; flex: 0 1 170px;
  font-size: 13px; cursor: pointer;
  background: var(--face); border: 2px solid; border-color: var(--hi) var(--dk) var(--dk) var(--hi);
  box-shadow: inset 1px 1px 0 var(--face-lt), inset -1px -1px 0 var(--sh);
}
.task-btn .ti { width: 18px; height: 18px; flex: 0 0 18px; }
.task-btn .tt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-btn.active { border-color: var(--dk) var(--hi) var(--hi) var(--dk);
  box-shadow: inset 1px 1px 0 var(--sh); background: #b9bdc2;
  background-image: linear-gradient(45deg, #c9cdd2 25%, #bfc3c8 25% 50%, #c9cdd2 50% 75%, #bfc3c8 75%); background-size: 4px 4px; }
.tray { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; flex: 0 0 auto;
  border: 2px solid; border-color: var(--sh) var(--hi) var(--hi) var(--sh); box-shadow: inset 1px 1px 0 rgba(0,0,0,.08); }
.tray .tr-ico { width: 18px; height: 18px; opacity: .8; cursor: default; }
#clock { font-size: 14px; font-weight: 600; min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; }
html[data-font="dot"] #clock, html[data-font="dot"] #start-btn { letter-spacing: .02em; }

/* ---------- Start menu ---------- */
#start-menu {
  position: fixed; left: 5px; bottom: 41px; z-index: 6000; width: 256px;
  display: none; background: var(--face);
  border: 2px solid; border-color: var(--hi) var(--dk) var(--dk) var(--hi);
  box-shadow: inset 1px 1px 0 var(--face-lt), 3px 3px 0 rgba(0,0,0,.35);
}
#start-menu.open { display: flex; }
#start-menu .sm-rail {
  width: 34px; flex: 0 0 34px; align-self: stretch;
  background: linear-gradient(180deg, var(--hydrangea), #16306b);
  writing-mode: vertical-rl; text-orientation: upright;
  color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .15em;
  display: flex; align-items: flex-end; justify-content: center; padding: 12px 0;
}
#start-menu .sm-list { flex: 1; padding: 4px; }
.sm-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; cursor: pointer; font-size: 15px; }
.sm-item .smi { width: 26px; height: 26px; flex: 0 0 26px; }
.sm-item:hover { background: var(--accent-solid); color: #fff; }
.sm-sep { height: 0; border-top: 1px solid var(--sh); border-bottom: 1px solid var(--hi); margin: 4px 6px; }

/* ---------- Boot splash ---------- */
#boot {
  position: fixed; inset: 0; z-index: 99999; background: #0a0a16;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
  color: #dfe6f2; font-family: "DotGothic16", monospace;
}
#boot.hide { opacity: 0; pointer-events: none; transition: opacity .6s; }
#boot .b-logo { width: 96px; height: 96px; display: grid; place-items: center; cursor: pointer; }
#boot .b-logo .ai svg, #boot .b-logo .ai img { width: 96px; height: 96px; border-radius: 6px; }
#boot .b-logo.icon-drop-over { outline-offset: 4px; }
#boot .b-title { font-size: 26px; letter-spacing: .12em; }
#boot .b-sub { font-size: 14px; color: #8a93a8; margin-top: -18px; }
#boot .b-bar { width: 280px; height: 20px; border: 2px solid #3a4258; background: #11131f; padding: 2px; }
#boot .b-bar > i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, #3f7ee0 0 12px, transparent 12px 16px); animation: bootbar 2.1s steps(20) forwards; }
@keyframes bootbar { to { width: 100%; } }
#boot .b-hint { font-size: 12px; color: #5f6884; }

/* spawn animation */
@keyframes winIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.window.spawn { animation: winIn .14s ease-out; }
html[data-anim="off"] .window.spawn { animation: none; }
html[data-anim="off"] #boot .b-bar > i { animation-duration: .4s; }

/* ---------- Responsive: phone ---------- */
@media (max-width: 720px) {
  #icon-layer { width: auto; padding: 0; }
  .desk-icon { width: 78px; }
  .desk-icon .ico { width: 40px; height: 40px; }
  #pinned { right: 4%; left: 96px; width: auto; max-width: none; top: 16px; padding: 20px; }
  #pinned h1 { font-size: 21px; }

  .window {
    position: fixed !important;
    inset: 0 0 38px 0 !important;
    width: auto !important; height: auto !important;
    transform: none !important; border-radius: 0;
    min-width: 0; min-height: 0;
  }
  .window.min { display: none; }
  .titlebar { cursor: default; height: 34px; flex-basis: 34px; }
  .resize-h { display: none; }
  .profile-grid { grid-template-columns: 1fr; }
  .avatar-slot { width: 160px; height: 160px; margin: 0 auto; }
  .info-row { grid-template-columns: 1fr; gap: 4px; }
  .gallery-wrap { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .seed-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-thumb { width: 100%; }
  .ach-grid { grid-template-columns: repeat(2, 1fr); }
  #task-btns .task-btn { flex-basis: 120px; }
  .tray .tr-ico.hide-sm { display: none; }
}
@media (max-width: 420px) {
  .work-grid { grid-template-columns: 1fr; }
  .ach-grid { grid-template-columns: 1fr; }
}
