/* Steady Desktop - large type, big targets, high contrast, calm motion. */

:root {
  --bg: #040a06;
  --panel: rgba(8, 22, 13, 0.95);
  --panel-2: #0d2416;
  --line: #2f6b44;
  --text: #f3fff5;
  --muted: #bcdcc5;
  --accent: #46f07f;
  --accent-ink: #032b12;
  --warn: #ffd166;
  --bad: #ff8a8a;
  --focus: #ffe066;
  --paper: #ffffff;
  --ink: #111111;
  --radius: 14px;
  color-scheme: dark;
}

html {
  font-size: 20px;
  background: var(--bg);
}

html[data-size="2"] { font-size: 23px; }
html[data-size="3"] { font-size: 27px; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

#matrix,
#fx {
  position: fixed;
  inset: 0;
  display: block;
  pointer-events: none;
}

#matrix { z-index: 0; }
#fx { z-index: 60; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

h1 { margin: 0 0 0.5rem; font-size: 1.7rem; line-height: 1.2; }
h2 { margin: 1.1rem 0 0.4rem; font-size: 1.2rem; color: var(--accent); }
h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
p { margin: 0.4rem 0; }
.muted { color: var(--muted); }

/* ---------- Header and footer ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  padding: 0.4rem 16px;
  background: rgba(2, 10, 5, 0.94);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 0.3rem;
  border: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
}

.brand img {
  width: 2rem;
  height: 2rem;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.tool-label {
  color: var(--muted);
  font-size: 0.75rem;
}

.seg {
  display: flex;
}

.size-btn,
.tool-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0.2rem 0.6rem;
  border: 2px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.size-btn { border-radius: 0; }
.size-btn:first-child { border-radius: 8px 0 0 8px; }
.size-btn:last-child { border-radius: 0 8px 8px 0; }
.tool-btn { border-radius: 8px; }

.size-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.site-foot {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 5rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.site-foot strong { color: var(--text); }

/* ---------- Layout ---------- */

main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.6rem 16px 1rem;
}

main:focus { outline: none; }

.hero,
.panel,
.group {
  margin: 1rem 0;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.lead { max-width: 46em; font-size: 1.1rem; }

.progress-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-top: 1rem;
  font-weight: 600;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro li,
.finish li { margin: 0.25rem 0; }

.tip {
  margin-top: 1rem;
  padding: 0.6rem 0.9rem;
  border-left: 5px solid var(--warn);
  background: rgba(255, 209, 102, 0.09);
}

/* ---------- Lesson cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
  gap: 0.8rem;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  min-height: 9rem;
  padding: 1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.card:hover { border-color: var(--accent); }
.card-icon { font-size: 1.8rem; line-height: 1; }
.card-title { font-size: 1.15rem; font-weight: 700; }
.card-blurb { color: var(--muted); font-size: 0.9rem; }
.card-meta { margin-top: auto; color: var(--warn); font-size: 0.8rem; font-weight: 600; }
.card-meta.done { color: var(--accent); }

/* ---------- Buttons ---------- */

.btn {
  min-height: 48px;
  padding: 0.45rem 1.1rem;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.btn:hover { background: rgba(70, 240, 127, 0.12); }
.btn.primary { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn.warn { border-color: var(--warn); }
.btn.small { min-height: 44px; padding: 0.25rem 0.8rem; font-size: 0.85rem; }
.btn:disabled { cursor: default; opacity: 0.5; }
.btn.next { margin-top: 1rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.linkish {
  min-height: 44px;
  padding: 0.2rem 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}

.rc-card .linkish,
.inv-card .linkish { color: #1a4fd8; }

/* ---------- Lesson runner ---------- */

.run-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.run-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.run-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
  margin: 0.4rem 0;
  color: var(--muted);
}

.dots { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.dots span {
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--line);
  border-radius: 50%;
}

.dots span.on { border-color: var(--accent); background: var(--accent); }

.instruction { margin: 0.6rem 0; font-size: 1.25rem; font-weight: 600; overflow-wrap: anywhere; }

.hint {
  margin-bottom: 0.8rem;
  padding: 0.4rem 1rem;
  border: 2px dashed var(--accent);
  border-radius: 10px;
  background: rgba(70, 240, 127, 0.08);
}

.hint[hidden] { display: none; }

.stage {
  position: relative;
  min-height: 16rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #06140b;
}

.stage.field {
  height: 22rem;
  padding: 0;
  overflow: hidden;
}

.finish .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  padding: 0;
  list-style: none;
  font-size: 1.1rem;
}

.finish .stats strong { color: var(--accent); font-size: 1.5rem; }

/* ---------- Toast, loader, document dialog ---------- */

#toast {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  z-index: 70;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  padding: 0.8rem 1.3rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 1rem);
  transition: opacity 0.2s, transform 0.2s;
}

#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.good { background: var(--accent); color: var(--accent-ink); }
#toast.try { background: var(--warn); color: #2b1d00; }

#loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
}

#loader[hidden] { display: none; }

.loader-box {
  width: min(560px, 100%);
  box-sizing: border-box;
  padding: 1.4rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 0 40px rgba(70, 240, 127, 0.35);
  font-family: "Courier New", Courier, monospace;
}

#loader-title { margin: 0 0 0.8rem; font-size: 1.3rem; font-weight: 700; }

.loader-bar {
  height: 1.4rem;
  overflow: hidden;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: #000;
}

#loader-fill {
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(45deg, #1fb655 0 12px, #46f07f 12px 24px);
}

#loader-status { min-height: 1.5em; margin-top: 0.6rem; color: var(--muted); }

dialog#doc {
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  box-sizing: border-box;
  padding: 0;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}

dialog#doc::backdrop { background: rgba(0, 0, 0, 0.65); }

.doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
}

.doc-head h2 { margin: 0; }
.doc-body { max-height: calc(100vh - 150px); overflow: auto; padding: 0 1rem 1rem; }

/* ---------- Mouse lessons ---------- */

.target {
  position: absolute;
  border: 4px solid #eafff0;
  border-radius: 50%;
  background: radial-gradient(circle, #8dffb6 0 35%, #1fb655 36% 100%);
  box-shadow: 0 0 18px rgba(70, 240, 127, 0.6);
  color: var(--accent-ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.dbl-folder {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 9rem;
  padding: 1rem 0.5rem;
  border: 2px solid transparent;
  border-radius: 12px;
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: default;
}

.dbl-folder.selected { border-color: #6ea8ff; background: rgba(60, 120, 255, 0.3); }

.folder-window {
  max-width: 28rem;
  margin: 1rem auto;
  overflow: hidden;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: var(--panel-2);
}

.folder-window .bar { padding: 0.3rem 0.8rem; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.folder-window ul { margin: 0.6rem 0; padding-left: 2.2rem; }

.folder-art {
  position: relative;
  display: block;
  width: 4rem;
  height: 2.9rem;
  margin-top: 0.6rem;
  border: 3px solid #f0c040;
  border-radius: 3px 8px 8px 8px;
  background: linear-gradient(#f6d36b, #d9a520);
}

.folder-art::before {
  content: "";
  position: absolute;
  top: -0.75rem;
  left: -3px;
  width: 1.7rem;
  height: 0.6rem;
  border: 3px solid #f0c040;
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  background: #f6d36b;
}

.file-art {
  position: relative;
  display: block;
  width: 3rem;
  height: 3.8rem;
  border: 3px solid #cfe9d6;
  border-radius: 3px 16px 3px 3px;
  background: repeating-linear-gradient(#ffffff 0 8px, #b8c9bd 8px 9px) 8px 12px / 60% 55% no-repeat, #ffffff;
}

.file-art .ext {
  position: absolute;
  bottom: 4px;
  left: 50%;
  padding: 0 4px;
  transform: translateX(-50%);
  background: #1fb655;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
}

.drag-stage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  gap: 1.5rem;
  min-height: 18rem;
}

.file-tray {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12rem;
  min-height: 10rem;
  border: 2px dashed var(--line);
  border-radius: 12px;
}

.folder-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

.folder-target {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 9rem;
  padding: 0.8rem 0.4rem;
  border: 3px solid transparent;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
}

.folder-target.over,
.inv-card.over { border-color: var(--accent); background-color: rgba(70, 240, 127, 0.18); }
.folder-target.got { border-color: var(--accent); }

.file-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 10rem;
  padding: 0.6rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  text-align: center;
  overflow-wrap: anywhere;
}

.draggable {
  position: relative;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.draggable.dragging { z-index: 30; cursor: grabbing; opacity: 0.95; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6); }
.draggable.snap { transition: transform 0.3s ease; }

.scroll-box {
  height: 15rem;
  overflow-y: scroll;
  border: 3px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  scrollbar-width: auto;
  scrollbar-color: #4a4a4a #dcdcdc;
}

.scroll-box::-webkit-scrollbar { width: 20px; }
.scroll-box::-webkit-scrollbar-track { background: #dcdcdc; }
.scroll-box::-webkit-scrollbar-thumb { border: 3px solid #dcdcdc; border-radius: 10px; background: #4a4a4a; }

.scroll-title { padding: 0.5rem 1rem; background: #eef6ef; font-weight: 700; }

.scroll-box button {
  display: block;
  width: 100%;
  padding: 0.55rem 1rem;
  border: 0;
  border-bottom: 1px solid #ddd;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.scroll-box button:hover { background: #e3f8e8; }

/* ---------- Keyboard and copy / paste ---------- */

.type-target,
.copy-source {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
  font-size: 1.7rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.type-target span.ok { color: #137a2a; }
.type-target span.bad { color: #c62828; text-decoration: underline wavy; }
.type-target span.todo { color: #666; }

.copy-source { font-size: 1.4rem; user-select: text; -webkit-user-select: text; cursor: text; }
.copy-source::selection { background: #1e6fff; color: #fff; }

.big-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0.8rem 0;
  padding: 0.6rem 0.8rem;
  border: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
  font-size: 1.5rem;
}

.field-label { display: block; margin-top: 1rem; font-weight: 600; }

/* ---------- Forms ---------- */

.form-wrap {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  gap: 1.2rem;
}

.practice-card {
  align-self: start;
  padding: 0.8rem 1rem;
  border: 3px dashed #c9a227;
  border-radius: 10px;
  background: #fffbe6;
  color: #222;
}

.practice-card .card-head { margin: 0 0 0.4rem; color: #7a5d00; font-size: 0.75rem; font-weight: 700; }
.practice-card dt { color: #665; font-size: 0.8rem; font-weight: 700; }
.practice-card dd { margin: 0 0 0.4rem; overflow-wrap: anywhere; }

.sd-form {
  padding: 1rem 1.2rem;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}

.field-row { margin: 0 0 0.8rem; padding: 0; border: 0; }
.field-row > label,
.field-row legend { display: block; margin-bottom: 0.2rem; padding: 0; font-weight: 600; }

.sd-form input[type="text"],
.sd-form input[type="email"],
.sd-form input[type="tel"],
.sd-form select {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  padding: 0.4rem 0.6rem;
  border: 2px solid #666;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.sd-form [aria-invalid="true"] { border-color: #c62828; outline: 2px solid #c62828; }
.err { margin: 0.2rem 0 0; color: #b00020; font-size: 0.9rem; font-weight: 600; }
.err:empty { display: none; }

.choice { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; font-weight: 400; cursor: pointer; }
.choice input { width: 1.4rem; height: 1.4rem; margin: 0; }

/* ---------- Scam emails ---------- */

.email { overflow: hidden; border-radius: 10px; background: var(--paper); color: var(--ink); }
.email-context { margin: 0; padding: 0.6rem 1rem; background: #fff6d6; color: #4a3b00; }
.email-head { padding: 0.6rem 1rem; border-bottom: 1px solid #ddd; overflow-wrap: anywhere; }
.email-head p { margin: 0.15rem 0; }
.from-addr { color: #444; }
.email-body { padding: 0.6rem 1rem 0.9rem; }
.fake-link { color: #1a4fd8; text-decoration: underline; }
.email .muted { color: #666; font-size: 0.8rem; }

.answer-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1rem; }

.explain {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border: 3px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}

.explain[hidden] { display: none; }
.explain.good { border-color: var(--accent); }
.explain.bad { border-color: var(--warn); }

/* ---------- Receipts and invoices ---------- */

.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.col h3 { color: var(--muted); }

.rc-card,
.inv-card {
  margin-bottom: 0.8rem;
  padding: 0.6rem 0.9rem;
  border: 3px solid transparent;
  border-radius: 8px;
  color: #222;
}

.rc-card { background: #fbfbf4; font-family: "Courier New", Courier, monospace; }
.inv-card { --brand: #1d4e89; border-top: 8px solid var(--brand); background: #fff; }
.rc-card p,
.inv-card p { margin: 0.15rem 0; }
.rc-card .co,
.inv-card .co { font-size: 1.05rem; font-weight: 700; }
.inv-card .co { color: var(--brand); }
.inv-card .status { font-weight: 700; }
.inv-card.done { border-color: #137a2a; }
.inv-card.done .status { color: #137a2a; }

/* Full invoice / receipt documents (shown in the dialog) */

.sheet {
  --brand: #1d4e89;
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 2px;
  background: #fff;
  color: #1b1b1b;
  font: 15px/1.4 Arial, Helvetica, sans-serif;
}

.sheet .inv-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--brand);
}

.sheet .vendor { color: var(--brand); font-size: 20px; font-weight: bold; }
.sheet .doc-title { color: #444; font-size: 28px; letter-spacing: 0.12em; text-align: right; }
.sheet .k { color: #666; font-size: 12px; font-weight: bold; text-transform: uppercase; }
.sheet .meta td { padding: 1px 0 1px 12px; border: none; }
.sheet .bill { margin: 14px 0; }
.sheet table { border-collapse: collapse; }
.sheet .lines { width: 100%; }
.sheet .lines th { padding: 6px 8px; background: var(--brand); color: #fff; font-size: 12px; text-align: left; text-transform: uppercase; }
.sheet .lines td { padding: 6px 8px; border-bottom: 1px solid #ddd; vertical-align: top; }
.sheet .num { text-align: right; white-space: nowrap; }
.sheet .nowrap { white-space: nowrap; }
.sheet .totals { width: min(300px, 100%); margin: 12px 0 0 auto; }
.sheet .totals td { padding: 4px 8px; }
.sheet .grand td { border-top: 2px solid #333; font-size: 16px; font-weight: bold; }
.sheet .ok { color: #137a2a; font-weight: bold; white-space: nowrap; }
.sheet .pending { color: #a35f00; white-space: nowrap; }
.sheet .fine { margin: 14px 0 0; color: #777; font-size: 11px; }

.sheet .stamp-big {
  position: absolute;
  top: 45%;
  left: 50%;
  padding: 4px 18px;
  border: 5px solid rgba(200, 20, 30, 0.7);
  border-radius: 8px;
  color: rgba(200, 20, 30, 0.7);
  font: bold 54px Arial, Helvetica, sans-serif;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-18deg);
}

.sheet .stamp-big.linked { border-color: rgba(19, 122, 42, 0.7); color: rgba(19, 122, 42, 0.7); font-size: 40px; }

.sheet.receipt {
  width: min(320px, 100%);
  box-sizing: border-box;
  margin: 0 auto;
  padding: 18px 16px 26px;
  background: #fbfbf4;
  font: 13px/1.35 "Courier New", Courier, monospace;
}

.receipt .center { text-align: center; }
.receipt .row { display: flex; justify-content: space-between; gap: 8px; white-space: pre; }
.receipt .rule { margin: 8px 0; border-top: 1px dashed #555; }
.receipt .big { font-size: 15px; font-weight: bold; }
.receipt .thanks { margin-top: 12px; }

.noscript { padding: 2rem 16px; font-size: 1.2rem; text-align: center; }

/* ---------- Small screens and reduced motion ---------- */

@media (max-width: 760px) {
  .form-wrap,
  .ledger { grid-template-columns: 1fr; }
  .stage { padding: 0.7rem; }
  .hero,
  .panel,
  .group { padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  #toast,
  .draggable.snap { transition: none; }
}

/* ---------- Sign-in practice ---------- */

.site-card {
  max-width: 26rem;
  margin: 0 auto;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}

.site-card .site-name { margin: 0; font-size: 1.3rem; font-weight: 700; }
.site-card .muted { color: #666; font-size: 0.8rem; }
.provider-list { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.8rem 0; }

.provider-btn {
  min-height: 52px;
  border: 2px solid #555;
  border-radius: 26px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.provider-btn:hover { background: #eef3ff; }

.popup-slot:not(:empty) { margin-top: 1rem; }

.popup {
  max-width: 30rem;
  margin: 0 auto;
  overflow: hidden;
  border: 3px solid #8a8a8a;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.pop-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.2rem 0.4rem 0.2rem 0.8rem;
  background: #e4e4e4;
  font-size: 0.85rem;
  font-weight: 600;
}

.pop-close {
  min-height: 44px;
  padding: 0 0.7rem;
  border: 2px solid #999;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.pop-url {
  padding: 0.4rem 0.8rem;
  border-bottom: 1px solid #ccc;
  background: #f6f6f6;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.pop-addr { font-weight: 700; }
.pop-body { padding: 0.8rem 1rem 1rem; }
.pop-brand { margin: 0 0 0.3rem; font-size: 1.2rem; font-weight: 700; }

.pop-account {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-height: 52px;
  margin-top: 0.5rem;
  padding: 0.4rem 0.8rem;
  border: 2px solid #ccc;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pop-account:hover { background: #eef3ff; }

.pop-input {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  margin: 0.4rem 0;
  padding: 0.4rem 0.6rem;
  border: 2px solid #999;
  border-radius: 8px;
  background: #f3f3f3;
  color: var(--ink);
  font: inherit;
}

.pop-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.6rem; margin-top: 0.6rem; }
.popup .btn { color: var(--ink); }
.popup .btn.primary { color: var(--accent-ink); }

/* ---------- Section switch (Learn / Work / Notepad) ---------- */

.modes { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.mode-btn {
  min-height: 44px;
  padding: 0.2rem 0.9rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.mode-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }

/* ---------- Shared pretend window (SD.win) ---------- */

.win {
  overflow: hidden;
  border: 3px solid #8a8a8a;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.win-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0.4rem 0.25rem 0.8rem;
  background: #e4e4e4;
  font-size: 0.9rem;
  font-weight: 700;
}

.win-close {
  min-height: 44px;
  padding: 0 0.7rem;
  border: 2px solid #999;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.win-addr {
  padding: 0.4rem 0.8rem;
  border-bottom: 1px solid #ccc;
  background: #f6f6f6;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.win-url { font-weight: 700; }
.win-body { padding: 0.8rem 1rem 1rem; }
.win .btn { color: var(--ink); }
.win .btn.primary { color: var(--accent-ink); }
.win input[type="text"],
.win input[type="email"],
.win input[type="password"],
.win textarea,
.win select {
  box-sizing: border-box;
  min-height: 48px;
  padding: 0.4rem 0.6rem;
  border: 2px solid #666;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

/* ---------- Help card set by a caregiver ---------- */

.help-card { border-color: var(--warn); background: rgba(255, 209, 102, 0.1); }
.help-line { margin: 0; font-size: 1.3rem; font-weight: 700; }
.help-note { margin: 0.3rem 0 0; font-size: 1.05rem; }
