:root {
  /* 深藍底搭配橘色重點（參考藍色貨櫃與橘色起重機的移軸場景） */
  color-scheme: dark;
  --bg: #0e1a2b;
  --surface: #162a44;
  --text: #eaf1fb;
  --muted: #9fb3cc;
  --line: #2c4466;
  --brand: #ff9a3c;
  --brand-d: #ffb36a;
  --on-brand: #2a1500;
  --brand-soft: #2a3c5c;
  --ok: #6ee7a8;
  --ok-soft: #17402f;
  --warn-soft: #3b3319;
  --warn-text: #f5d77a;
  --danger: #ff8f8f;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; color: var(--text);
  background: radial-gradient(1100px 520px at 50% -8%, #1f3c63 0%, transparent 70%) no-repeat, var(--bg);
  font: 16px/1.6 "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--on-brand); padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; top: 8px; }

.topbar { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
nav a { margin-left: 16px; color: var(--muted); text-decoration: none; font-size: 15px; }
nav a:hover { color: var(--brand); }

.mock-banner { background: var(--warn-soft); color: var(--warn-text); font-size: 14px; padding: 8px 0; }

.hero { padding: 32px 0 8px; display: flex; align-items: center; gap: 24px; justify-content: space-between; }
.hero-text { flex: 1 1 320px; }
.hero-img { width: min(320px, 42%); height: auto; flex: none; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35)); transform: rotate(2deg); }
.empty-img { display: block; width: 120px; height: auto; margin: 0 auto 8px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .3)); }
@media (max-width: 600px) { .hero { flex-direction: column-reverse; align-items: flex-start; } .hero-img { width: 70%; align-self: center; } }
.hero h1 { font-size: clamp(24px, 5vw, 34px); line-height: 1.3; margin: 0 0 8px; }
.hero p { color: var(--muted); margin: 0; }
section { margin-top: 36px; }
h2 { font-size: 22px; margin: 0 0 14px; }
h3 { font-size: 17px; margin: 0 0 8px; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 13px; margin-top: 8px; }

.card, .empty, .progress-wrap, .group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.empty { padding: 20px; text-align: center; color: var(--muted); border-style: dashed; }
.empty p { margin: 0 0 10px; }
.empty p:last-child { margin: 0; }

.project-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 16px; }
.project {
  text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 14px; cursor: pointer; color: var(--text); font: inherit;
}
.project:hover { border-color: var(--brand); }
.project.is-on { border-color: var(--brand); background: var(--brand-soft); }
.project b { display: block; }
.project .mini { height: 6px; background: var(--line); border-radius: 99px; margin: 10px 0 4px; overflow: hidden; }
.project .mini i { display: block; height: 100%; background: var(--brand); }
.project small { color: var(--muted); }
.tag { display: inline-block; font-size: 12px; background: var(--warn-soft); color: var(--warn-text); border-radius: 99px; padding: 0 8px; margin-left: 6px; }

.form { padding: 16px; margin-top: 16px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.req { color: var(--danger); }
input[type=text], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
textarea { font-family: ui-monospace, Consolas, monospace; font-size: 13px; resize: vertical; }
.is-invalid { border-color: var(--danger) !important; }
.err { color: var(--danger); font-size: 13px; margin: 4px 0 0; min-height: 0; }
.err:empty { display: none; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row .field { min-width: 140px; }
.row .grow { flex: 1 1 220px; }

.btn {
  font: inherit; font-size: 15px; padding: 9px 16px; border-radius: 8px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
}
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 600; }
.btn.primary:hover { background: var(--brand-d); }
.btn.danger { color: var(--danger); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.panel-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 14px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.progress-wrap { padding: 14px 16px; margin-bottom: 14px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14px; }
.bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--brand); transition: width .3s; }
.bar-fill.full { background: var(--ok); }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.search { flex: 1 1 200px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg-btn { font: inherit; font-size: 14px; border: 0; background: transparent; color: var(--text); padding: 8px 14px; cursor: pointer; }
.seg-btn.is-on { background: var(--brand); color: var(--on-brand); font-weight: 600; }

.group { margin-bottom: 14px; overflow: hidden; }
.group-h { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--brand-soft); font-weight: 700; }
.group-h span { font-weight: 400; font-size: 13px; color: var(--muted); }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); }
.item label { flex: 1; display: flex; gap: 10px; align-items: center; cursor: pointer; min-height: 28px; }
.item input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.item.done .txt { text-decoration: line-through; color: var(--muted); }
.del { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; padding: 4px 8px; border-radius: 6px; }
.del:hover { color: var(--danger); }

/* ===== 總覽：Data Center 場景 ===== */
.stage { border-radius: 22px; margin: 4px 0 22px; overflow: hidden; background: #0c1829; box-shadow: 0 22px 44px rgba(0, 0, 0, .45); border: 1px solid var(--line); }
.stage-in { padding: 18px 12px 0; text-align: center; }
.stage-title { margin: 0; font-size: 18px; letter-spacing: .5px; color: #eaf1fb; }
.stage-sub { margin: 2px 8px 12px; font-size: 13px; color: #9fb3cc; }
.dc { display: block; width: 100%; height: auto; border-radius: 14px; }
.stage-foot { background: linear-gradient(#142640, #0f1e34); padding: 14px 16px 16px; text-align: center; margin-top: 12px; }
.stage-foot p { margin: 0; }
.stage-foot #stageMsg { font-weight: 600; }
.stage-foot .stage-count { color: var(--muted); font-size: 13px; margin-top: 2px; }

.rack { cursor: pointer; outline: none; }
.rack .frame { stroke: #0b1a30; stroke-width: 3; transition: stroke .2s; }
.rack:hover .frame, .rack:focus-visible .frame { stroke: #ff9a3c; }
.rack:focus-visible .focus-ring { stroke: #ffd9ae; opacity: 1; }
.rack .focus-ring { fill: none; stroke-width: 3; opacity: 0; }
.rack.done .plate { fill: #2fb36d; }
.dc.complete .led { animation: blink 1.2s ease-in-out infinite; }
.dc .light-bar { fill: #fff; opacity: .22; transition: fill .4s, opacity .4s; }
.dc.complete .light-bar { fill: #8ff0b5; opacity: .95; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dc.complete .led { animation: none; } }
/* ===== 像素風場景與動畫（所有動作皆為「一格一格」的跳動） ===== */
.stage { border-radius: 0; border: 4px solid #3f84e8; box-shadow: 0 0 0 4px #07101f, 0 22px 44px rgba(0, 0, 0, .45); }
.dc-frame { position: relative; border: 4px solid #07101f; background: #07101f; line-height: 0; }
.dc-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 3px); }
.dc { border-radius: 0; }
text.px { font-family: "Press Start 2P", ui-monospace, Consolas, monospace; }
.rack .frame { stroke: none; stroke-width: 0; }
.rack:hover .frame, .rack:focus-visible .frame { fill: #3d68a8; stroke: none; }
.rack .focus-ring { fill: none; stroke: #ffd9ae; stroke-width: 1; stroke-dasharray: 2 2; opacity: 0; }
.rack:focus-visible .focus-ring { opacity: 1; }
.rack.done .plate { fill: #2fb36d; }
.dc .led { animation: blink 1.6s steps(1, end) infinite; }
.dc.complete .led { animation: blink .8s steps(1, end) infinite; }
.bgled { animation: blink 2.4s steps(1, end) infinite; }
.beacon { animation: blink .6s steps(1, end) infinite; }
.pace { animation-name: pace; animation-iteration-count: infinite; }
@keyframes pace {
  0% { transform: translateX(-10px); animation-timing-function: steps(20, end); }
  50% { transform: translateX(10px); animation-timing-function: steps(20, end); }
  100% { transform: translateX(-10px); }
}
.flip { animation-name: flip; animation-iteration-count: infinite; animation-timing-function: steps(1, end); }
@keyframes flip { 0% { transform: scaleX(1); } 50% { transform: scaleX(-1); } 100% { transform: scaleX(1); } }
.walking .fa { animation: fa .4s steps(1, end) infinite; }
.walking .fb { animation: fb .4s steps(1, end) infinite; }
@keyframes fa { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fb { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }
.cheering { animation: hop .7s steps(1, end) infinite; }
@keyframes hop { 0% { transform: translateY(0); } 50% { transform: translateY(-4px); } 100% { transform: translateY(0); } }
.twinkle { animation: blink .9s steps(1, end) infinite; }
.agv { animation: drive 20s steps(260, end) infinite; }
@keyframes drive { from { transform: translateX(-24px); } to { transform: translateX(244px); } }
.slot-new { animation: slotin .6s steps(8, end) both; }
@keyframes slotin { from { transform: translateY(-36px); opacity: 0; } 20% { opacity: 1; } to { transform: none; opacity: 1; } }
.slot-next { animation: next 1s steps(1, end) infinite; stroke: #ff9a3c; stroke-opacity: 1; }
@keyframes next { 0% { stroke-opacity: 1; } 50% { stroke-opacity: .2; } 100% { stroke-opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .pace, .flip, .walking .fa, .walking .fb, .cheering, .twinkle, .agv, .beacon, .bgled, .slot-new, .slot-next, .dc .led { animation: none !important; }
  .walking .fb { opacity: 0; }
}
/* ===== 多人協作與專案監控 ===== */
.mock-banner.live { background: var(--ok-soft); color: var(--ok); }
.mock-banner.err { background: #4a2323; color: #ffb4b4; }
.members { padding: 14px 16px; margin-bottom: 16px; }
.members h3 { margin: 0; }
.members-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.chips { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--brand-soft); border: 1px solid var(--line); border-radius: 99px; padding: 3px 12px; font-size: 13px; }
.chips li.me { border-color: var(--brand); }
.chips li small { color: var(--muted); margin-left: 4px; }
.mem-me { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.mem-me .field { margin: 0; min-width: 160px; }
.activity { list-style: none; padding: 0; margin: 0 0 8px; }
.activity li { padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.activity time { color: var(--muted); font-size: 12px; margin-left: 6px; }
.txt-wrap { display: flex; flex-direction: column; }
.meta { font-size: 12px; color: var(--muted); }
.fn-card .owner { font-size: 12px; color: var(--muted); }
.mon-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat b { display: block; font-size: 26px; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 13px; }
.stat.ok b { color: var(--ok); }
.stat.warn b { color: var(--warn-text); }
.mon-table { display: grid; gap: 8px; margin-bottom: 12px; }
.mon-head, .mon-row { display: grid; grid-template-columns: minmax(150px, 1.6fr) repeat(4, minmax(66px, 1fr)) 56px 92px minmax(110px, 1fr); gap: 10px; align-items: center; }
.mon-head { padding: 0 14px; color: var(--muted); font-size: 12px; }
.mon-row { width: 100%; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; }
.mon-row:hover { border-color: var(--brand); }
.mon-row.pass { border-color: var(--ok); }
.mon-name small { display: block; color: var(--muted); font-size: 12px; }
.mon-cell small { display: block; color: var(--muted); font-size: 12px; }
.mon-cell.pass small { color: var(--ok); }
.mon-bar { display: block; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 3px; }
.mon-bar i { display: block; height: 100%; background: var(--brand); }
.mon-cell.pass .mon-bar i { background: var(--ok); }
.mon-last { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .mon-head { display: none; }
  .mon-row { grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .mon-row > [data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  .mon-row .mon-name { grid-column: 1 / -1; }
}
nav a.is-on { color: var(--brand); font-weight: 600; }
.crumb { margin: 20px 0 8px; }
.crumb a, .back-ov a { color: var(--brand); text-decoration: none; }
.crumb a:hover, .back-ov a:hover { text-decoration: underline; }
.back-ov { margin: 16px 0 0; }
.sub { margin: 24px 0 10px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 2px solid var(--line); margin-bottom: 16px; padding-bottom: 0; }
.tab {
  font: inherit; font-size: 15px; color: var(--muted); background: transparent; border: 0; cursor: pointer;
  padding: 10px 16px; border-radius: 10px 10px 0 0; white-space: nowrap; display: flex; gap: 8px; align-items: baseline;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tab:hover { color: var(--text); }
.tab.is-on { color: var(--brand); border-bottom-color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.tab-c { font-size: 12px; opacity: .8; }
.tabpanel:focus-visible { outline-offset: 6px; }
.fn-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.fn-card {
  text-align: left; font: inherit; color: var(--text); background: var(--surface); cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 4px;
}
.fn-card:hover { border-color: var(--brand); transform: rotate(-.6deg); }
.fn-card.pass { border-color: var(--ok); }
.fn-card .mini { height: 6px; background: var(--line); border-radius: 99px; margin: 6px 0 2px; overflow: hidden; }
.fn-card .mini i { display: block; height: 100%; background: var(--brand); }
.fn-card.pass .mini i { background: var(--ok); }
.fn-card .go { margin-top: 6px; color: var(--brand); font-size: 14px; }
.fn-card small { color: var(--muted); }
.fn-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 12px; }
.chip { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 99px; padding: 1px 10px; margin-left: 8px; }
.chip.pass { background: var(--ok-soft); color: var(--ok); }
.chip.fail { background: var(--warn-soft); color: var(--warn-text); }
.project .chip { display: block; width: fit-content; margin: 8px 0 0; }
.group-h .chip { color: inherit; font-size: 12px; }
.group-h .chip.pass { color: var(--ok); }
.group-h .chip.fail { color: var(--warn-text); }
.gate { border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; font-weight: 600; border: 1px solid var(--line); }
.gate.pass { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.gate.fail { background: var(--warn-soft); color: var(--warn-text); }
.notpass-box { background: var(--warn-soft); color: var(--warn-text); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; }
.done-box { background: var(--ok-soft); color: var(--ok); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; font-weight: 600; }
.cat-sum { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cat-sum li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.cat-sum .mini { height: 6px; background: var(--line); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.cat-sum .mini i { display: block; height: 100%; background: var(--brand); }
.export-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.footer { margin: 48px 0 24px; text-align: center; color: var(--muted); font-size: 13px; }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-size: 14px;
  transition: .25s; max-width: calc(100% - 32px); z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
[hidden] { display: none !important; }

@media (max-width: 520px) {
  nav a { margin-left: 10px; font-size: 14px; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .seg { width: 100%; }
  .seg-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ===== 像素風 UI（整站）與側邊欄 ===== */
:root { --px: #040b16; --px-hi: #2f4f80; --radius: 0; }
* { border-radius: 0 !important; }
body {
  background:
    radial-gradient(1100px 520px at 50% -8%, #1f3c63 0%, transparent 70%) no-repeat,
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px),
    var(--bg);
  background-size: 100% 520px, 16px 16px, 16px 16px, auto;
}
h1, h2, h3, .brand, .side-title, .stage-title { font-family: "Press Start 2P", "DotGothic16", "Noto Sans TC", monospace; font-weight: 400; line-height: 1.8; letter-spacing: 0; }
h1 { font-size: clamp(14px, 2.4vw, 20px); }
h2 { font-size: 14px; }
h3, .stage-title { font-size: 12px; }
.brand { font-size: 11px; color: var(--brand); }
.btn, .seg-btn, .tab, .chip, .tag, .side-item, .side-nav a { font-family: "DotGothic16", "Noto Sans TC", sans-serif; }
:focus-visible { outline: 3px dashed var(--brand-d); outline-offset: 2px; }

.topbar { border-bottom: 3px solid var(--px); box-shadow: 0 3px 0 var(--px-hi); }
.mock-banner { border-bottom: 3px solid var(--px); }

.card, .empty, .progress-wrap, .group, .project, .fn-card, .stat, .mon-row, .members, .cat-sum li {
  border: 3px solid var(--px); box-shadow: inset 0 0 0 2px var(--px-hi), 4px 4px 0 var(--px);
}
.empty { border-style: dashed; box-shadow: none; }
.gate, .done-box, .notpass-box { border: 3px solid var(--px); box-shadow: 4px 4px 0 var(--px); }
.project, .fn-card, .mon-row { transition: none; }
.project:hover, .fn-card:hover, .mon-row:hover { border-color: var(--brand); transform: translate(-2px, -2px); box-shadow: inset 0 0 0 2px var(--px-hi), 6px 6px 0 var(--px); }
.fn-card.pass, .mon-row.pass { border-color: var(--ok); }
.gate.pass { border-color: var(--ok); }

input[type=text], input[type=search], select, textarea { border: 3px solid var(--px); background: #0b1830; box-shadow: inset 3px 3px 0 rgba(0, 0, 0, .35); }
.is-invalid { border-color: var(--danger) !important; }

.btn {
  border: 3px solid var(--px); background: #22406b; color: var(--text); padding: 8px 14px; font-size: 14px;
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .35), inset 3px 3px 0 rgba(255, 255, 255, .16), 3px 3px 0 var(--px);
}
.btn:hover { background: #2c5084; border-color: var(--px); }
.btn:active { transform: translate(3px, 3px); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .35), inset 3px 3px 0 rgba(255, 255, 255, .16); }
.btn.primary { background: var(--brand); border-color: var(--px); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-d); }
.btn.danger { color: #ff9a9a; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.seg { border: 3px solid var(--px); background: #0b1830; box-shadow: 3px 3px 0 var(--px); }
.seg-btn.is-on { background: var(--brand); color: var(--on-brand); }
.tabs { border-bottom: 3px solid var(--px); gap: 4px; }
.tab { border: 3px solid transparent; border-bottom: 0; margin-bottom: -3px; }
.tab.is-on { background: var(--brand-soft); border-color: var(--px); box-shadow: inset 0 0 0 2px var(--px-hi); color: var(--brand); }
.chip, .tag { border: 2px solid var(--px); }

.bar { height: 16px; border: 3px solid var(--px); background: #0b1830; }
.mini, .mon-bar { height: 8px !important; border: 2px solid var(--px); background: #0b1830 !important; }
.bar-fill, .mini i, .mon-bar i { transition: none; background-image: repeating-linear-gradient(90deg, transparent 0 6px, rgba(4, 11, 22, .55) 6px 8px); }

.item { border-top: 2px dashed var(--line); }
.group-h { border-bottom: 3px solid var(--px); }
.item input[type=checkbox] {
  -webkit-appearance: none; appearance: none; flex: none; width: 22px; height: 22px; cursor: pointer;
  border: 3px solid var(--px); background: #0b1830; box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .4);
}
.item input[type=checkbox]:checked { background: var(--brand); box-shadow: inset 0 0 0 3px #0b1830; }
.item input[type=checkbox]:focus-visible { outline: 3px dashed var(--brand-d); outline-offset: 2px; }
.del { border: 3px solid transparent; }
.del:hover { border-color: var(--danger); }

.hero-img { transform: none; filter: drop-shadow(4px 4px 0 var(--px)); image-rendering: pixelated; }
.empty-img { background: none; filter: drop-shadow(3px 3px 0 var(--px)); image-rendering: pixelated; }
.toast { border: 3px solid var(--px); box-shadow: 4px 4px 0 var(--px); transition: none; }

/* 側邊欄 */
.layout { display: flex; align-items: flex-start; max-width: 1200px; margin: 0 auto; }
.layout > main { flex: 1; min-width: 0; margin: 0; padding: 0 20px; max-width: 920px; }
.sidebar {
  width: 252px; flex: none; position: sticky; top: 56px; max-height: calc(100vh - 56px); overflow-y: auto;
  padding: 16px 12px 24px; background: #0f1d33; border-right: 3px solid var(--px); box-shadow: inset -3px 0 0 var(--px-hi);
}
.side-nav { display: grid; gap: 6px; margin-bottom: 18px; }
.side-nav a { display: block; padding: 8px 10px; color: var(--muted); text-decoration: none; border: 3px solid transparent; }
.side-nav a:hover { color: var(--text); border-color: var(--line); }
.side-nav a.is-on { color: var(--on-brand); background: var(--brand); border-color: var(--px); font-weight: 600; }
.side-title { font-size: 10px; color: var(--brand); margin: 6px 0 8px; }
.sidebar input[type=search] { margin-bottom: 10px; }
.side-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.side-item {
  width: 100%; text-align: left; color: var(--text); background: var(--surface); cursor: pointer; padding: 8px 10px;
  border: 3px solid var(--px); box-shadow: inset 0 0 0 2px var(--px-hi);
}
.side-item:hover { border-color: var(--brand); }
.side-item.is-on { background: var(--brand-soft); border-color: var(--brand); }
.side-row { display: flex; gap: 8px; align-items: center; }
.dot { flex: none; width: 10px; height: 10px; border: 2px solid var(--px); background: var(--muted); }
.dot.pass { background: var(--ok); }
.dot.prog { background: var(--warn-text); }
.side-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.side-item .mini { display: block; margin: 6px 0 3px; }
.side-item .mini i { display: block; height: 100%; background-color: var(--brand); }
.side-item small { color: var(--muted); font-size: 12px; }
.side-new { width: 100%; }
.menu-btn { display: none; }
.side-overlay { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: inline-block; }
  .layout > main { padding: 0 16px; }
  .sidebar { position: fixed; top: 56px; left: 0; bottom: 0; max-height: none; z-index: 40; transform: translateX(-102%); transition: transform .2s steps(5, end); }
  body.side-open .sidebar { transform: none; }
  body.side-open .side-overlay { display: block; position: fixed; inset: 56px 0 0 0; background: rgba(0, 0, 0, .55); z-index: 35; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
.side-me { margin: 10px 0 0; color: var(--muted); }
.linklike { font: inherit; color: var(--brand); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
/* ===== 流程改進：下一步、繼續上次、提示條動作 ===== */
.next-step, .resume { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px; }
.next-step h3, .resume h3 { margin: 0 0 4px; }
.next-step p, .resume p { margin: 0; }
.next-step { border-color: var(--brand) !important; }
.toast { display: flex; align-items: center; gap: 14px; }
.toast.show { pointer-events: auto; }
.toast-act { font: inherit; font-weight: 700; color: #a14a00; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.has-projects .hero-img, .has-projects .hero-text p { display: none; }
.has-projects .hero { padding-top: 12px; }