:root {
  --ink: #111827;
  --ink-2: #1d2638;
  --paper: #f5f0df;
  --paper-2: #fffaf0;
  --line: #263244;
  --muted: #667085;
  --cyan: #1bc6c8;
  --orange: #ff974f;
  --pink: #f05d87;
  --green: #8fd694;
  --shadow: 5px 5px 0 var(--line);
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Courier New", Consolas, monospace; letter-spacing: 0; image-rendering: pixelated; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.scanlines { position: fixed; inset: 0; pointer-events: none; opacity: .06; background: repeating-linear-gradient(0deg, transparent 0 3px, #111827 3px 4px); z-index: 5; }
.topbar { min-height: 68px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: var(--paper); border-bottom: 5px solid var(--cyan); position: relative; z-index: 6; }
.brand, .top-meta, .button-row { display: flex; align-items: center; gap: 12px; }
.brand { font-weight: 800; font-size: 16px; letter-spacing: 1px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 30px; background: var(--orange); color: var(--ink); border: 3px solid var(--paper); font-size: 11px; box-shadow: 3px 3px 0 var(--cyan); }
.chip, .status { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border: 2px solid currentColor; font-size: 11px; font-weight: 700; white-space: nowrap; }
.icon-button.is-refreshing { animation: refresh-spin .7s steps(8, end) 1; }
@keyframes refresh-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.chip-muted, .status-muted { color: var(--muted); background: #e4dfcf; border-color: var(--muted); }
.icon-button { width: 30px; height: 30px; border: 2px solid var(--paper); background: transparent; color: var(--paper); font-size: 20px; line-height: 1; }
.layout { width: min(1100px, 90vw); margin: 34px auto 70px; display: grid; grid-template-columns: minmax(0, 1fr); }
.content { min-width: 0; }
.hero-band { display: flex; justify-content: space-between; gap: 20px; align-items: end; padding: 26px 0 30px; border-bottom: 3px solid var(--line); }
.eyebrow { margin: 0 0 8px; color: #4f627a; font-size: 11px; font-weight: 800; letter-spacing: 1px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(25px, 4vw, 48px); line-height: 1.08; max-width: 760px; }
h2 { margin-bottom: 0; font-size: 19px; }
.muted { color: var(--muted); font-size: 12px; }
.live-clock { white-space: nowrap; border: 3px solid var(--line); padding: 11px 12px; background: var(--paper-2); font-weight: 700; box-shadow: var(--shadow); }
.dot, .pixel-led { display: inline-block; width: 10px; height: 10px; margin-right: 8px; background: var(--muted); vertical-align: -1px; }
.dot.live, .pixel-led { background: var(--green); box-shadow: 2px 2px 0 var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 22px 0 13px; }.section-head.compact { align-items: center; margin: 0 0 16px; }
.panel { border: 3px solid var(--line); background: var(--paper-2); box-shadow: var(--shadow); }.activity-panel { padding: 20px; }.empty-state { min-height: 80px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.activity-title { display: flex; justify-content: space-between; gap: 16px; align-items: start; border-bottom: 2px dashed #b7b2a4; padding-bottom: 14px; margin-bottom: 12px; }.activity-title h3 { margin: 0; font-size: 17px; }.task-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }.task-card { border: 2px solid #b7b2a4; background: #fffdf6; }.task-row { padding: 10px; border: 2px solid #b7b2a4; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }.task-card > .task-row { border: 0; }.task-row small { display: block; color: var(--muted); margin-top: 4px; }.status { background: #edf0e8; }.status-running { color: #18724f; background: #ddf4dd; border-color: #18724f; }.status-waiting { color: #76551e; background: #fff0c2; border-color: #a97828; }.status-error { color: #a33a4e; background: #ffe0e6; border-color: #a33a4e; }.status-done { color: #176c60; background: #d7f6f1; border-color: #176c60; }.status-estimated { color: #8a4b15; background: #ffe6cf; border-color: #d26a25; }.task-complete { color: #176c60; }.checkpoint-list { display: grid; gap: 5px; padding: 0 8px 8px; }.checkpoint-row { display: flex; justify-content: space-between; gap: 8px; padding: 7px 8px; border-left: 3px solid #c8c0af; background: #f5f0df; font-size: 10px; }.checkpoint-row small { display: block; color: var(--muted); margin-top: 3px; }.checkpoint-complete { border-left-color: var(--green); background: #e2f5e2; }.preview-task { border-bottom: 2px dashed #b7b2a4; padding: 8px 0; }.preview-task:last-child { border-bottom: 0; }
.table-wrap { overflow-x: auto; }.account-table { width: 100%; border-collapse: collapse; min-width: 690px; }.account-table th { padding: 12px 13px; text-align: left; color: #637189; font-size: 10px; letter-spacing: 1px; border-bottom: 3px solid var(--line); }.account-table td { padding: 14px 13px; border-bottom: 2px solid #d8d2c2; font-size: 12px; }.account-table tbody tr { cursor: pointer; transition: background .12s; }.account-table tbody tr:hover { background: #e8f8f1; }.account-name { font-weight: 800; }.account-uid { color: var(--muted); font-size: 10px; margin-top: 4px; }.claim-dot { display: inline-block; width: 9px; height: 9px; background: var(--pink); box-shadow: 2px 2px 0 var(--line); margin-left: 7px; }
.notice-list { display: grid; gap: 10px; }.notice { border-left: 5px solid var(--orange); background: var(--paper-2); padding: 13px 15px; box-shadow: 3px 3px 0 #c7c0af; }.notice-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }.notice strong { display: block; margin-bottom: 7px; }.notice p { white-space: pre-wrap; margin: 0; font-size: 12px; line-height: 1.6; }.notice time { display: block; color: var(--muted); font-size: 10px; margin-top: 8px; }
.admin-notice-list { display: grid; gap: 8px; margin-top: 16px; }.admin-notice-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 2px dashed #b7b2a4; padding-top: 9px; }.admin-notice-row strong, .admin-notice-row small { display: block; }.admin-notice-row strong { font-size: 11px; }.admin-notice-row small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.rail-copy { color: #526075; font-size: 11px; line-height: 1.7; }.admin-dock { margin-top: 34px; }.admin-panel { padding: 18px; margin-top: 12px; }.risk-box { border: 2px solid #b33a4a; background: #fff0f2; color: #8e2d3e; padding: 10px; margin: 14px 0; font-size: 11px; line-height: 1.6; }.risk-box summary, .risk-box label { color: #a33a4e; font-weight: 800; }.risk-box p { margin: 10px 0; }.risk-box label { display: block; }.qr-box { margin-top: 14px; padding: 14px; border: 2px dashed var(--line); text-align: center; background: #f0e9d7; }.qr-box img { width: 180px; height: 180px; display: block; margin: auto; image-rendering: pixelated; }.qr-box span { display: block; margin-top: 10px; color: #607086; font-size: 11px; }.stack-form { display: grid; gap: 11px; }.check-line { display: flex; align-items: center; gap: 8px; }.stack-form label { display: grid; gap: 5px; color: #526075; font-size: 10px; font-weight: 700; }.stack-form input, .stack-form textarea { width: 100%; border: 2px solid var(--line); background: #fffdf6; padding: 9px; color: var(--ink); resize: vertical; }.stack-form input:focus, .stack-form textarea:focus { outline: 3px solid var(--cyan); outline-offset: 1px; }.button { min-height: 38px; border: 3px solid var(--line); padding: 8px 12px; background: var(--paper-2); color: var(--ink); box-shadow: 3px 3px 0 var(--line); font-weight: 800; font-size: 11px; }.button:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--line); }.button:disabled { cursor: not-allowed; opacity: .45; }.button-primary { background: var(--cyan); }.button-orange { background: var(--orange); }.button-cyan { background: var(--cyan); }.button-dark { color: var(--paper); background: var(--ink); }.button-small { min-height: 30px; padding: 5px 8px; font-size: 10px; }.admin-form { margin-top: 16px; padding-top: 16px; border-top: 2px dashed #b7b2a4; }.form-message { min-height: 16px; color: #a33a4e; font-size: 10px; }.preview-output { max-height: 260px; overflow: auto; white-space: normal; color: #176c60; font-size: 10px; }.hidden { display: none !important; }
.detail-status-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }.status-action { min-height: 25px; padding: 4px 8px; border: 2px solid currentColor; box-shadow: 2px 2px 0 var(--line); font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }.status-stop { color: #a33a4e; background: #fff0f2; }.status-action:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 var(--line); }
.checkpoint-row { align-items: center; background: #fffaf0; }.checkpoint-copy { min-width: 0; flex: 1; }.checkpoint-copy > span { display: block; }.progress-track { display: block; height: 6px; margin-top: 7px; background: #ded7c6; border: 1px solid #c4baa5; overflow: hidden; }.progress-fill { display: block; height: 100%; background: #52ad69; transition: width .25s ease; }.checkpoint-complete .progress-fill { background: #218a56; }.checkpoint-row > b { white-space: nowrap; }.detail-actions { margin-top: 12px; }
.checkpoint-alias { display: block; color: var(--ink); font-size: 10px; }.reward-name { display: block; margin-top: 3px; color: #176c60; font-size: 13px; }
@media (max-width: 980px) { .hero-band { align-items: start; flex-direction: column; } }
@media (max-width: 650px) { .topbar { padding: 0 18px; }.top-meta .chip:first-child { display: none; }.layout { width: min(94vw, 1100px); margin-top: 20px; }.task-list { grid-template-columns: 1fr; }.hero-band { padding-top: 10px; } h1 { font-size: 28px; } }

/* Pixel-card treatment for native dialogs and account details. */
dialog.account-dialog {
  width: min(700px, 90vw);
  max-height: min(88vh, 900px);
  margin: auto;
  padding: 26px;
  color: var(--ink);
  background: var(--paper-2);
  border: 3px solid var(--line);
  box-shadow: 8px 8px 0 var(--cyan);
  overflow: auto;
}
dialog.account-dialog::backdrop { background: rgba(17, 24, 39, .48); }
.dialog-close {
  width: 31px;
  height: 31px;
  border: 2px solid var(--line);
  background: var(--pink);
  color: var(--ink);
  font-weight: 800;
  line-height: 1;
  box-shadow: 3px 3px 0 var(--line);
}
.dialog-close:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.dialog-toolbar {
  position: sticky;
  top: -26px;
  z-index: 2;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin: -26px -26px 0;
  padding: 26px 26px 12px;
  background: var(--paper-2);
  border-bottom: 2px dashed transparent;
}
.dialog-toolbar > div:first-child { min-width: 0; }
.dialog-controls { display: flex; align-items: center; justify-content: end; gap: 9px; }
.detail-updated { color: var(--muted); font-size: 10px; white-space: nowrap; }
.dialog-icon-button {
  width: 31px;
  height: 31px;
  border: 2px solid var(--line);
  background: var(--cyan);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--line);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}
.dialog-icon-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.dialog-icon-button:disabled { cursor: wait; opacity: .75; }
.dialog-icon-button.is-refreshing { animation: refresh-spin .7s steps(8, end) infinite; }
.account-dialog h2 { margin: 0 0 12px; font-size: 24px; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}
.detail-cell {
  min-height: 78px;
  padding: 12px;
  border: 3px solid #b7b2a4;
  background: #fffaf0;
  box-shadow: 3px 3px 0 #c7c0af;
}
.detail-cell small { display: block; margin-bottom: 8px; color: #637189; font-size: 11px; }
.detail-cell strong { display: block; font-size: 18px; line-height: 1.2; }
.account-task-details { display: grid; gap: 10px; }
.account-task-details .task-card { border: 3px solid #b7b2a4; background: #fffdf6; box-shadow: 3px 3px 0 #c7c0af; }
.account-task-details .task-row { padding: 11px 12px; font-size: 12px; }
.account-task-details .checkpoint-list { padding: 0 9px 9px; }
.account-task-details .checkpoint-row { padding: 8px 9px; }




.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: min(420px, 90vw); padding: 12px 15px; border: 3px solid var(--line); background: var(--paper-2); box-shadow: var(--shadow); font-size: 12px; }
.scan-dialog { width: min(420px, 90vw); }

@media (min-width: 1400px) {
  .layout { width: min(1200px, 92vw); }
  h1 { font-size: clamp(30px, 3.2vw, 52px); }
  .activity-panel { padding: 22px; }
  .task-row { padding: 12px; font-size: 13px; }
  dialog.account-dialog { width: min(720px, 82vw); padding: 30px; }
  .detail-cell { min-height: 86px; padding: 14px; }
  .detail-cell strong { font-size: 19px; }
  .account-task-details .task-row { padding: 12px 14px; }
  .checkpoint-row { padding: 9px 10px; font-size: 11px; }
  .reward-name { font-size: 14px; }
}
.settings-toggle { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid #b7b2a4; background: #fffaf0; }.settings-toggle input { width: 18px; height: 18px; accent-color: var(--cyan); }.settings-toggle span { color: var(--ink); font-size: 11px; }.settings-toggle span small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 400; }.setting-state { color: var(--muted); font-size: 10px; white-space: nowrap; }.settings-toggle:has(input:checked) { border-color: #176c60; background: #e2f5e2; }.settings-toggle:has(input:checked) .setting-state { color: #176c60; }
