:root {
  --ink: #f5f5f5;
  --muted: rgba(245, 245, 245, 0.58);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.14);
  --fill: rgba(12, 12, 12, 0.55);
  --field: rgba(0, 0, 0, 0.35);
  --glow: rgba(255, 255, 255, 0.16);
  --paper: #f3efe6;
  --danger: #e8e8e8;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

body[data-theme="light"] {
  --ink: #161616;
  --muted: rgba(22, 22, 22, 0.55);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-2: rgba(255, 255, 255, 0.72);
  --line: rgba(0, 0, 0, 0.1);
  --fill: rgba(255, 255, 255, 0.46);
  --field: rgba(255, 255, 255, 0.72);
  --glow: rgba(255, 255, 255, 0.85);
  --paper: #f7f4ee;
  --danger: #1a1a1a;
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0;
  height: 100%;
  background: transparent;
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

body {
  padding: 0;
  background: #0a0a0a;
}
body[data-theme="light"] {
  background: #e7e7e7;
}

.window {
  height: calc(100% - 0px);
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  background: #0a0a0a;
  backdrop-filter: blur(28px) saturate(1.2);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.04) inset, 0 0 80px var(--glow);
}
body[data-theme="light"] .window { background: #e7e7e7; }

.top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--glass);
  -webkit-app-region: drag;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 165px; }
.brand strong { display: block; font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.brand small { color: var(--muted); font-size: 12px; }
.mark {
  width: 32px; height: 32px; border-radius: 50%;
  display: block; object-fit: cover;
  border: 1px solid var(--line);
  background: var(--glass-2);
  box-shadow: 0 0 24px var(--glow);
}
body[data-theme="dark"] .mark, body[data-theme="dark"] .tutorial-card > img { filter: invert(1); }
.aula-now { flex: 1; min-width: 170px; display: flex; flex-direction: column; gap: 4px; -webkit-app-region: no-drag; }
.aula-now span, .kicker {
  margin: 0;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.aula-now input, #search, .item-input, .cap, .note-text, .drawer textarea, .drawer input[type="text"] {
  width: 100%;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  backdrop-filter: blur(10px);
}
.aula-now input:focus, #search:focus, textarea:focus, .item-input:focus, .cap:focus, .note-text:focus {
  border-color: rgba(255,255,255,.45);
  box-shadow: 0 0 0 4px rgba(255,255,255,.06);
}
body[data-theme="light"] .aula-now input:focus,
body[data-theme="light"] textarea:focus,
body[data-theme="light"] .item-input:focus {
  border-color: rgba(0,0,0,.35);
  box-shadow: 0 0 0 4px rgba(0,0,0,.05);
}

.top-actions, .win-controls { display: flex; align-items: center; gap: 6px; -webkit-app-region: no-drag; }
.top-actions > .ghost { white-space: nowrap; }
.top-actions .icon-action { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; }
.theme-icon { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; }
body[data-theme="dark"] .theme-icon .moon-path, body[data-theme="light"] .theme-icon .sun-core, body[data-theme="light"] .theme-icon .sun-rays { display: none; }
.win-controls { margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--line); }
.ghost, .side-head button, .dock button, .menu button, .drawer header button, .win-controls button {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  backdrop-filter: blur(12px);
}
.ghost.theme-icon { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; padding: 0; line-height: 0; }
.theme-icon svg { display: block; width: 18px; height: 18px; }
.ghost:hover, .dock button:hover, .side-head button:hover, .win-controls button:hover {
  background: var(--glass-2);
  box-shadow: 0 0 18px var(--glow);
}
.win-controls button { width: 32px; height: 32px; padding: 0; }
#winClose:hover { background: rgba(255,255,255,.2); }

.shell { flex: 1; display: flex; min-height: 0; }
.books-home { width: 100%; padding: 32px 40px 110px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; align-content: start; overflow-y: auto; }
.shell.no-books .books-home { display: none; }
.book-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--tint, #fff) 22%, transparent); color: var(--tint, var(--ink)); overflow: hidden; }
.book-icon svg { width: 26px; height: 26px; }
.book-icon img { width: 100%; height: 100%; object-fit: cover; }
[data-color="violet"] { --tint: #a78bfa; }
[data-color="blue"] { --tint: #60a5fa; }
[data-color="green"] { --tint: #4ade80; }
[data-color="amber"] { --tint: #fbbf24; }
[data-color="rose"] { --tint: #fb7185; }
.workspace-launch[data-color]:not([data-color="default"]) { border-color: color-mix(in srgb, var(--tint) 55%, transparent); background: color-mix(in srgb, var(--tint) 12%, var(--glass)); }
.card[data-color]:not([data-color="default"]) { border-color: color-mix(in srgb, var(--tint) 60%, transparent); background: color-mix(in srgb, var(--tint) 16%, rgba(16,16,16,.85)); }
body[data-theme="light"] .card[data-color]:not([data-color="default"]) { background: color-mix(in srgb, var(--tint) 22%, rgba(255,255,255,.8)); }
.menu-heading { margin: 4px 10px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.color-options, .icon-options { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 10px; }
.color-choice { width: 26px !important; height: 26px; padding: 0 !important; border-radius: 50% !important; border: 2px solid var(--line) !important; background: var(--tint, #888) !important; }
.color-choice[data-color="default"] { background: linear-gradient(135deg, #fff 50%, #333 50%) !important; }
.icon-options button { width: 36px !important; height: 36px; padding: 6px !important; display: grid; place-items: center; }
.icon-options svg { width: 22px; height: 22px; }
.workspace-launch {
  position: relative;
  margin: 0; width: auto; min-height: 220px;
  display: flex; text-align: left; border: 1px solid var(--line); border-radius: 22px;
  color: var(--ink); background: var(--glass); box-shadow: 0 0 40px var(--glow);
}
.workspace-launch-main { width: 100%; min-height: 220px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; padding: 32px; text-align: left; border: 0; border-radius: 22px; background: transparent; color: inherit; }
.book-options { position: absolute; top: 18px; right: 18px; z-index: 1; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--glass-2); color: var(--ink); font-size: 20px; line-height: 1; }
.book-options:hover { background: var(--glass); }
.workspace-launch strong { font-size: clamp(24px, 4vw, 38px); font-weight: 560; }
.workspace-launch > span:last-child { color: var(--muted); }
.workspace-launch:hover { background: var(--glass-2); }
.quick-new-book { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); }
.shell.no-books .quick-new-book { top: 50%; bottom: auto; transform: translate(-50%, -50%); min-width: min(360px, calc(100% - 40px)); min-height: 110px; padding: 24px; border-radius: 22px; font-size: 22px; font-weight: 560; background: var(--glass-2); box-shadow: 0 0 40px var(--glow); }
.shell { position: relative; }
.workspace-pop { position: fixed; inset: 0; z-index: 50; display: flex; padding: 14px; background: #0a0a0a; }
body[data-theme="light"] .workspace-pop { background: #d9d9d9; }
.workspace-window { width: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #101010; box-shadow: var(--shadow); }
body[data-theme="light"] .workspace-window { background: #f4f4f4; }
.workspace-head { min-height: 50px; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: var(--glass); color: var(--muted); font-size: 12px; }
.workspace-head-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.workspace-window .stage { flex: 1; min-height: 0; overflow: hidden; touch-action: none; }
.side {
  padding: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  max-height: min(70vh, 640px);
}
.side, .drawer-body, .note-editor, .tutorial-card { scrollbar-width: thin; scrollbar-color: rgba(170,170,180,.48) transparent; }
.side::-webkit-scrollbar, .drawer-body::-webkit-scrollbar, .note-editor::-webkit-scrollbar, .tutorial-card::-webkit-scrollbar { width: 8px; }
.side::-webkit-scrollbar-track, .drawer-body::-webkit-scrollbar-track, .note-editor::-webkit-scrollbar-track, .tutorial-card::-webkit-scrollbar-track { background: transparent; }
.side::-webkit-scrollbar-thumb, .drawer-body::-webkit-scrollbar-thumb, .note-editor::-webkit-scrollbar-thumb, .tutorial-card::-webkit-scrollbar-thumb { background: rgba(170,170,180,.42); border: 2px solid transparent; background-clip: padding-box; border-radius: 999px; }
.side::-webkit-scrollbar-thumb:hover, .drawer-body::-webkit-scrollbar-thumb:hover, .note-editor::-webkit-scrollbar-thumb:hover, .tutorial-card::-webkit-scrollbar-thumb:hover { background-color: rgba(200,200,210,.68); }
.side::-webkit-scrollbar-button, .drawer-body::-webkit-scrollbar-button, .note-editor::-webkit-scrollbar-button, .tutorial-card::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.side-head, .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.side-head h2, .help h3 { margin: 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.side-head button { width: 32px; height: 32px; padding: 0; }
.book-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.new-book-form { display: flex; gap: 8px; }
.new-book-form input { min-width: 0; flex: 1; background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.new-book-form button { border: 1px solid var(--line); border-radius: 10px; background: var(--glass-2); padding: 8px 12px; }
.book-list button {
  width: 100%; text-align: left; background: transparent; border: 1px solid transparent;
  border-radius: 14px; padding: 10px 12px;
}
.book-list button.active {
  background: var(--glass-2);
  border-color: var(--line);
  box-shadow: 0 0 24px var(--glow);
}
.book-list small { display: block; color: var(--muted); font-size: 12px; }
.progress-card, .help, .card, .empty {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(16px);
}
.progress-card, .help { padding: 14px; }
.bar { height: 3px; background: rgba(127,127,127,.25); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.bar i { display: block; height: 100%; width: 0; background: var(--ink); box-shadow: 0 0 12px var(--glow); }
.progress-card p, .help p { margin: 6px 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.listen h3, .integration h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stack input { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); color: var(--ink); letter-spacing: normal; }
#btnListen { width: 100%; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-2); padding: 8px 12px; }
#btnListen.live { box-shadow: 0 0 22px var(--glow); }
#listenStatus { min-height: 1.4em; }
kbd {
  font-family: inherit; font-size: 11px; border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 5px; color: var(--ink); background: var(--glass-2);
}

.stage {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background-color: rgba(8, 8, 8, 0.35);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: 0 0;
}
body[data-theme="light"] .stage {
  background-color: rgba(255, 255, 255, 0.28);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.07) 1px, transparent 1px);
}
.stage-overlay {
  position: absolute; top: 14px; left: 18px; right: 18px; z-index: 3;
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-end;
  pointer-events: none;
}
.stage-overlay > * { pointer-events: auto; }
.board { position: absolute; inset: 0; transform-origin: 0 0; }
.connections { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.connection { fill: none; stroke: var(--ink); stroke-opacity: .6; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.connection.preview { stroke-dasharray: 8 5; stroke-opacity: .85; }
.zoom-bar {
  position: absolute; left: 16px; bottom: 16px; z-index: 4;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass-2); backdrop-filter: blur(16px);
}
.zoom-bar button {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: transparent;
}
.zoom-bar span { min-width: 48px; text-align: center; font-size: 12px; color: var(--muted); }
.fab {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 4; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--glass-2);
  font-size: 28px; line-height: 1;
  box-shadow: 0 0 28px var(--glow);
  backdrop-filter: blur(16px);
}
.popup {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.28);
}
.popup-card { width: min(760px, calc(100% - 48px)); }
.settings-card {
  width: min(420px, calc(100% - 40px));
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #171717;
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow), 0 0 40px var(--glow);
}
body[data-theme="light"] .settings-card { background: #f4f4f4; }
.settings-card h2 { margin: 0; font-size: 16px; font-weight: 560; }
.new-book-dialog { width: min(430px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 14px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #171717; box-shadow: var(--shadow); }
body[data-theme="light"] .new-book-dialog { background: #f4f4f4; }
.new-book-dialog h2 { margin: 0; font-size: 20px; font-weight: 560; }
.new-book-dialog label { color: var(--muted); font-size: 12px; }
.new-book-dialog input { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); outline: none; }
.new-book-dialog > button[type="submit"] { padding: 11px; background: var(--glass-2); }
.node-picker { width: min(420px, calc(100% - 32px)); padding: 24px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: 22px; background: #171717; box-shadow: var(--shadow); }
body[data-theme="light"] .node-picker { background: #f4f4f4; }
.node-picker h2 { margin: 0 0 8px; font-size: 20px; font-weight: 560; }
.node-picker button { display: flex; flex-direction: column; gap: 4px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); text-align: left; }
.node-picker button:hover { background: var(--glass-2); }
.node-picker button strong { font-size: 15px; }
.node-picker button span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.confirm-card { width: min(430px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #171717; box-shadow: var(--shadow); }
body[data-theme="light"] .confirm-card { background: #f4f4f4; }
.confirm-card h2 { margin: 8px 0; font-size: 21px; }
.confirm-card > p:not(.kicker) { color: var(--muted); line-height: 1.5; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.confirm-actions .danger { background: #9d2d35; color: white; border-color: #9d2d35; }
.tutorial-card { width: min(480px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: #171717; box-shadow: var(--shadow); }
body[data-theme="light"] .tutorial-card { background: #f4f4f4; }
.tutorial-card > img { width: 48px; height: 48px; margin-bottom: 20px; }
.tutorial-card h2 { margin: 8px 0 16px; font-size: 25px; font-weight: 560; }
.tutorial-card ol { margin: 0 0 24px; padding-left: 22px; color: var(--muted); line-height: 1.6; }
.tutorial-card li { padding-left: 3px; margin-bottom: 8px; }
.tutorial-card #tutorialDone { width: 100%; padding: 10px 14px; background: var(--glass-2); }
.settings-card > input { width: 100%; margin: 16px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.note-editor { width: min(680px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: #171717; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
body[data-theme="light"] .note-editor { background: #f4f4f4; }
.note-editor h2 { margin: 0; font-size: 18px; }
.note-editor textarea { width: 100%; resize: vertical; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--field); outline: none; }
.note-editor small, .note-checklist label { color: var(--muted); }
.note-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.note-actions button { border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; background: var(--glass-2); }
#noteSave { margin-left: auto; }
.note-attachments { display: flex; flex-wrap: wrap; gap: 8px; }
.note-attachments img { max-width: 130px; max-height: 100px; border-radius: 10px; object-fit: contain; }
.file-tile { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass-2); text-align: left; overflow: hidden; }
.file-tile span { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.file-tile strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 550; }
.note-attachments .file-tile { width: auto; max-width: 220px; margin: 0; }
.attachment-preview { cursor: pointer; }
.file-viewer { width: min(1040px, calc(100% - 40px)); height: min(760px, calc(100% - 40px)); display: flex; flex-direction: column; padding: 16px; gap: 12px; border: 1px solid var(--line); border-radius: 20px; background: #171717; box-shadow: var(--shadow); }
body[data-theme="light"] .file-viewer { background: #f4f4f4; }
.file-viewer h2 { max-width: calc(100% - 90px); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.file-viewer-body { flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--field); }
.pdf-frame { width: 100%; height: 100%; border: 0; background: white; }
.video-preview { width: 100%; height: 100%; object-fit: contain; background: black; }
.image-preview { display: block; max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; }
.sheet-tabs { display: flex; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); overflow: auto; }
.sheet-tabs button { flex: none; padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px; background: transparent; }
.sheet-tabs button.active { background: var(--glass-2); }
.sheet-scroll { overflow: auto; height: calc(100% - 52px); }
.sheet-scroll table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 12px; }
.sheet-scroll th, .sheet-scroll td { min-width: 90px; max-width: 280px; padding: 7px 9px; border: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-scroll th { position: sticky; top: 0; background: #272727; color: var(--muted); font-weight: 550; }
body[data-theme="light"] .sheet-scroll th { background: #e6e6e6; }
.sheet-hint { margin: 8px; color: var(--muted); font-size: 12px; }
#noteSketch { width: 100%; height: 220px; }
h1 { margin: 4px 0 0; font-size: 28px; font-weight: 560; letter-spacing: -0.03em; }
#search { max-width: 260px; }
.timeline { flex: 1; overflow: auto; padding: 8px 22px 118px; }
.group { margin: 22px 0 8px; }
.group h3 { margin: 0 0 10px; font-size: 13px; font-weight: 560; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.card {
  position: absolute;
  width: 340px;
  padding: 12px 12px 12px 16px;
  margin: 0;
  background: rgba(16, 16, 16, 0.82);
  cursor: grab;
}
.card-port { position: absolute; top: 50%; right: -12px; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: #202020; color: var(--ink); font-size: 17px; line-height: 1; cursor: crosshair; z-index: 2; touch-action: none; }
.card-port:hover { box-shadow: 0 0 0 6px var(--glow); }
.card-inlet { position: absolute; top: 50%; left: -9px; transform: translateY(-50%); width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 50%; background: #202020; z-index: 2; pointer-events: none; }
body[data-theme="light"] .card-port { background: #f4f4f4; }
body[data-theme="light"] .card-inlet { background: #f4f4f4; }
.summary-text { white-space: pre-wrap; line-height: 1.5; margin: 8px 0 12px; }
body[data-theme="light"] .card { background: rgba(255, 255, 255, 0.72); }
.card.selected { box-shadow: 0 0 0 1px rgba(255,255,255,.28), 0 0 32px var(--glow); }
body[data-theme="light"] .card.selected { box-shadow: 0 0 0 1px rgba(0,0,0,.2), 0 0 28px rgba(255,255,255,.8); }
.card-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 8px; }
.card.image-only .card-top { position: absolute; top: 8px; right: 8px; z-index: 1; margin: 0; }
.card.image-only .icon-btn { background: rgba(0,0,0,.65); color: #fff; }
.when { color: var(--muted); font-size: 12px; }
.card img.shot, .sketch-preview {
  width: 100%; border-radius: 14px; background: rgba(0,0,0,.25); max-height: 420px; object-fit: contain;
}
.cap, .note-text { margin-top: 8px; resize: vertical; min-height: 64px; }
.card .note-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; cursor: grab; min-height: 0; margin: 4px 0 10px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.check { list-style: none; margin: 8px 0 0; padding: 0; }
.check li { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.check li.done span { color: var(--muted); text-decoration: line-through; }
.add-row { display: flex; gap: 8px; margin-top: 8px; }
.add-row button, .mini {
  background: var(--glass-2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px;
}
.icon-btn { background: transparent; border: 0; color: var(--muted); padding: 4px 8px; border-radius: 999px; }
.icon-btn:hover { color: var(--ink); background: var(--glass-2); }

.empty { position: absolute; left: 80px; top: 80px; width: min(560px, 70vw); margin: 0; padding: 42px 28px; text-align: center; color: var(--muted); background: rgba(16, 16, 16, 0.55); }
body[data-theme="light"] .empty { background: rgba(255, 255, 255, 0.62); }
.empty strong { color: var(--ink); display: block; font-size: 18px; font-weight: 560; margin-bottom: 8px; }

.dock {
  position: relative; left: auto; right: auto; bottom: auto;
  display: flex; gap: 8px; align-items: center;
  background: var(--glass-2);
  border: 1px solid var(--line);
  backdrop-filter: blur(22px);
  border-radius: 999px;
  padding: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25), 0 0 30px var(--glow);
}
.dock-tip { margin-left: auto; color: var(--muted); font-size: 12px; padding-right: 10px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.5); }
.drawer {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(680px, calc(100% - 44px)); max-height: calc(100% - 44px);
  background: #171717;
  border: 1px solid var(--line);
  border-radius: 22px;
  backdrop-filter: blur(28px);
  box-shadow: var(--shadow), 0 0 40px var(--glow);
  z-index: 70;
  display: flex; flex-direction: column;
  overflow: hidden;
}
body[data-theme="light"] .drawer { background: #f4f4f4; }
.drawer header { display: flex; justify-content: space-between; gap: 8px; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer header h2 { margin: 0; font-size: 18px; font-weight: 560; }
.drawer-body { padding: 16px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.drawer label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tools input[type="color"] { width: 36px; height: 32px; border: 0; background: transparent; padding: 0; }
canvas.pad {
  width: 100%; height: 280px; border-radius: 16px; background: var(--paper); touch-action: none; cursor: crosshair;
  border: 1px solid var(--line);
}
canvas.pad.dark { background: #111; }
.danger { color: var(--danger); }

.menu {
  position: fixed; z-index: 90; min-width: 180px;
  background: var(--fill); border: 1px solid var(--line); border-radius: 16px;
  padding: 6px; box-shadow: var(--shadow); backdrop-filter: blur(20px);
}
.menu button { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 10px; padding: 8px 10px; }
.menu button:hover { background: var(--glass-2); }

.drop-hint {
  position: absolute; inset: 16px; border-radius: 20px;
  display: grid; place-items: center; font-size: 18px; letter-spacing: .08em; text-transform: uppercase;
  pointer-events: none;
  border: 1px solid var(--line);
  background: var(--glass-2);
  box-shadow: 0 0 40px var(--glow);
}
.toast {
  position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%);
  background: var(--glass-2); border: 1px solid var(--line); color: var(--ink);
  padding: 10px 16px; border-radius: 999px; z-index: 40; backdrop-filter: blur(16px);
  box-shadow: 0 0 24px var(--glow);
}
.stage { cursor: grab; }
.stage:active { cursor: grabbing; }

/* ---- Prévias de anexos dentro do card ---- */
.workspace-window { position: relative; }
.card:has(.inline-attachment) { width: 380px; }
.card.attachment-expanded { width: 680px; }
.inline-attachment { margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); overflow: hidden; cursor: default; }
.inline-attachment-title { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 12px; font-weight: 550; border-bottom: 1px solid var(--line); }
.inline-attachment-title { white-space: nowrap; }
.inline-attachment-title button { margin-left: auto; flex: none; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--glass-2); font-size: 12px; }
.inline-attachment-title button + button { margin-left: 0; }
.inline-attachment-content { padding: 8px; }
.inline-attachment-content video, .inline-attachment-content img { display: block; width: 100%; max-height: 360px; border-radius: 10px; background: #000; object-fit: contain; }
.inline-attachment-content audio { width: 100%; }
.card.attachment-expanded .inline-attachment-content { height: 460px; overflow: auto; }
.card:not(.attachment-expanded) .inline-attachment-content:has(.sheet-scroll) { height: 220px; padding: 0; }
.inline-attachment-content:has(.sheet-scroll) { padding: 0; }
.inline-attachment-content:has(.sheet-scroll) .sheet-scroll { height: calc(100% - 46px); }
.card:not(.attachment-expanded) .inline-attachment-content:has(.pdf-canvas) { max-height: 420px; overflow: auto; }
.pdf-toolbar { display: flex; align-items: center; justify-content: center; gap: 14px; padding-bottom: 8px; font-size: 12px; }
.pdf-toolbar button { width: 30px; height: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--glass-2); font-size: 16px; }
.pdf-canvas { display: block; margin: 0 auto; background: #fff; border-radius: 6px; }
.video-stage { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: #000; }
.video-stage[hidden] { display: none; }
.video-stage-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; color: #fff; background: #111; }
.video-stage video { flex: 1; min-height: 0; width: 100%; background: #000; }

/* Cartão de caderno: retângulo horizontal, ícone ao lado do texto */
.books-home { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.workspace-launch { min-height: 0; }
.workspace-launch-main { min-height: 0; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 16px; row-gap: 2px; align-items: center; align-content: center; padding: 18px 64px 18px 18px; }
.workspace-launch-main .book-icon { grid-row: 1 / span 3; width: 56px; height: 56px; }
.workspace-launch-main .kicker { font-size: 10px; margin: 0; align-self: end; }
.workspace-launch-main strong { font-size: 20px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-launch-main > span:last-child { font-size: 12px; color: var(--muted); align-self: start; }
.book-options { top: 50%; transform: translateY(-50%); right: 16px; width: 32px; height: 32px; }
.card { cursor: grab; }
body.ctrl-down .stage, body.ctrl-down .card { cursor: move; }
.marquee { position: absolute; z-index: 20; pointer-events: none; border: 1px solid #6ea8ff; background: rgba(110,168,255,.14); border-radius: 4px; }
.card.selected { outline: 2px solid #6ea8ff; outline-offset: 2px; }
.top-actions { margin-left: auto; }
.workspace-pop, .workspace-pop *, .popup, .popup *, .drawer, .drawer *, .drawer-backdrop, .menu, .menu *, .toast { -webkit-app-region: no-drag; }
.stage, .card, .board { user-select: none; -webkit-user-select: none; }
.card textarea, .card input, .drawer textarea, .drawer input { user-select: text; -webkit-user-select: text; }
.inline-attachment-content video, .inline-attachment-content img { width: auto; height: auto; max-width: 100%; max-height: 440px; margin: 0 auto; object-fit: contain; }
.card.attachment-expanded .inline-attachment-content video, .card.attachment-expanded .inline-attachment-content img { max-height: 440px; }
.inline-attachment-content video { background: #000; }
.preview-stage-body { flex: 1; min-height: 0; padding: 12px; overflow: auto; background: #101010; }
body[data-theme="light"] .preview-stage-body { background: #f4f4f4; }
.preview-stage-body .inline-attachment { margin: 0; height: 100%; display: flex; flex-direction: column; }
.preview-stage-body .inline-attachment-content { flex: 1; min-height: 0; height: auto; overflow: auto; }
.preview-stage-body .inline-attachment-content img { max-height: none; max-width: 100%; }
.preview-stage-body .inline-attachment-content:has(.sheet-scroll) { display: flex; flex-direction: column; }
.preview-stage-body .sheet-scroll { flex: 1; height: auto; min-height: 0; }
/* bordas finas e mídia na proporção */
.inline-attachment { border-radius: 10px; border-width: 1px; }
.inline-attachment-title { padding: 6px 8px; }
.inline-attachment-content:has(video), .inline-attachment-content:has(img) { padding: 3px; line-height: 0; }
.inline-attachment-content video, .inline-attachment-content img { border-radius: 6px; }
.card:has(video) { padding: 10px 10px 10px 14px; }
.inline-attachment-title .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-attachment-title button { margin-left: 0 !important; }

/* ---- Player personalizado ---- */
.player { position: relative; margin: 0 auto; line-height: normal; }
.player-video { overflow: hidden; border-radius: 6px; background: #000; }
.player-video video { display: block; cursor: pointer; }
.player-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; color: #fff; font-size: 11px; }
.player-video .player-bar { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.78)); padding-top: 22px; flex-wrap: wrap; row-gap: 2px; opacity: 0; transition: opacity .15s; }
.player-video:hover .player-bar, .player-video:not(.playing) .player-bar { opacity: 1; }
.player-audio { width: 100%; border-radius: 10px; background: var(--glass-2); }
.player-audio .player-bar { color: var(--ink); }
.player-btn { flex: none; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: inherit; font-size: 11px; font-weight: 600; }
.player-btn:hover { background: rgba(255,255,255,.26); }
.player-rate { width: auto; padding: 0 8px; border-radius: 999px; }
.player-time { flex: none; font-variant-numeric: tabular-nums; opacity: .85; white-space: nowrap; }
.player-range { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; outline: none; cursor: pointer; background: linear-gradient(to right, currentColor var(--p, 0%), rgba(128,128,128,.4) var(--p, 0%)); }
.player-range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(255,255,255,.15); }
.player-seek { flex: 1 1 90px; min-width: 70px; }
.player-vol { flex: none; width: 54px; }
.player-stage { flex: 1; min-height: 0; width: 100% !important; border-radius: 0; display: flex; }
.player-stage video { width: 100%; height: 100%; object-fit: contain; }
.video-stage > video { display: none; }

/* Layout da barra: progresso em linha própria, botões embaixo */
.player-video .player-bar { flex-wrap: wrap; row-gap: 4px; padding: 20px 8px 6px; }
.player-video .player-seek { order: -1; flex: 1 0 100%; margin: 0 2px 2px; }
.player-video .player-vol, .player-audio .player-vol { display: none; }
.player-video .player-time { margin-right: auto; }
.player-audio .player-bar { flex-wrap: nowrap; }
.player-btn { width: 26px; height: 26px; }
.player-stage .player-bar { flex-wrap: nowrap; padding: 14px 16px; gap: 10px; }
.player-stage .player-seek { order: 0; flex: 1 1 auto; margin: 0; }
.player-stage .player-vol { display: block; }
.player-stage .player-time { margin-right: 0; }

/* ================= Login / conta / sincronização ================= */
.auth-screen { position: fixed; left: 0; right: 0; bottom: 0; top: 58px; z-index: 400; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: auto; background: radial-gradient(1200px 600px at 50% -10%, rgba(255,255,255,.07), transparent 60%), #0a0a0a; }
.auth-screen[hidden] { display: none; }
body[data-theme="light"] .auth-screen { background: radial-gradient(1200px 600px at 50% -10%, rgba(255,255,255,.9), transparent 60%), #e7e7e7; }
.auth-screen, .auth-screen * { -webkit-app-region: no-drag; }
.auth-card { width: min(420px, 100%); margin: auto; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--glass); box-shadow: var(--shadow, 0 20px 60px rgba(0,0,0,.45)); backdrop-filter: blur(24px); color: var(--ink); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.auth-brand img { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass-2); padding: 4px; }
body[data-theme="dark"] .auth-brand img, .auth-screen .auth-brand img { filter: invert(1); }
body[data-theme="light"] .auth-brand img { filter: none; }
.auth-brand strong { display: block; font-size: 18px; }
.auth-brand small { color: var(--muted); font-size: 12px; }
.auth-card h2 { margin: 0 0 6px; font-size: 22px; font-weight: 580; }
.auth-sub { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.auth-card label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.auth-card label small { font-size: 11px; opacity: .8; }
.auth-card input[type="text"], .auth-card input[type="email"], .auth-card input[type="password"], .api-guide input { width: 100%; padding: 12px 13px; font-size: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--field, rgba(255,255,255,.06)); color: var(--ink); outline: none; }
.auth-card input:focus, .api-guide input:focus { border-color: rgba(255,255,255,.45); box-shadow: 0 0 0 4px rgba(255,255,255,.06); }
body[data-theme="light"] .auth-card input:focus { border-color: rgba(0,0,0,.4); box-shadow: 0 0 0 4px rgba(0,0,0,.05); }
.auth-primary { display: block; width: 100%; padding: 13px; text-align: center; border: 0; border-radius: 12px; background: var(--ink); color: var(--bg-contrast, #0a0a0a); font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; }
body[data-theme="light"] .auth-primary { color: #f4f4f4; }
.auth-primary:disabled { opacity: .6; cursor: wait; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.auth-links button { padding: 6px 2px; border: 0; background: transparent; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; }
.auth-links button:hover { color: var(--ink); }
.auth-msg { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; word-break: break-word; }
.auth-msg.error { background: rgba(220,70,80,.14); border: 1px solid rgba(220,70,80,.4); color: #ff9aa1; }
body[data-theme="light"] .auth-msg.error { color: #a01d28; }
.auth-msg.ok { background: rgba(70,190,120,.13); border: 1px solid rgba(70,190,120,.4); color: #7fe0a8; }
body[data-theme="light"] .auth-msg.ok { color: #12703b; }
.auth-msg.info { background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--ink); }
.auth-server { margin-top: 18px; font-size: 12px; color: var(--muted); }
.auth-server summary { cursor: pointer; }
.auth-server input { margin: 8px 0 4px; width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--field, rgba(255,255,255,.06)); color: var(--ink); }
body.auth-open .top-actions > :not(.win-controls) { display: none; }
body.auth-open .shell { visibility: hidden; }

/* cartão da conta (configurações) */
.account h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.acc-name { margin: 0 0 6px; font-size: 14px; }
.acc-name span { color: var(--muted); font-size: 12px; word-break: break-all; }
.acc-status { display: inline-block; margin: 0 0 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; background: var(--glass-2); border: 1px solid var(--line); }
.acc-status.trial { border-color: rgba(251,191,36,.5); color: #fbbf24; }
.acc-status.active, .acc-status.admin { border-color: rgba(74,222,128,.5); color: #4ade80; }
body[data-theme="light"] .acc-status.trial { color: #8a5a00; } body[data-theme="light"] .acc-status.active, body[data-theme="light"] .acc-status.admin { color: #12703b; }
.acc-sync { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.acc-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.acc-btn { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); color: var(--ink); font-size: 12px; text-decoration: none; cursor: pointer; }
.acc-btn:hover { background: var(--glass-2); }
.acc-btn.danger { color: #ff8c94; }
body[data-theme="light"] .acc-btn.danger { color: #a01d28; }
#accPassForm { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
#accPassForm[hidden] { display: none; }
#accPassForm input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--field, rgba(255,255,255,.06)); color: var(--ink); }

/* indicador de sincronização + aviso do teste */
.sync-chip { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.sync-chip[data-s="ok"] { color: #4ade80; } .sync-chip[data-s="offline"], .sync-chip[data-s="error"], .sync-chip[data-s="locked"] { color: #fbbf24; }
.sync-chip[data-s="syncing"] { opacity: .8; }
.trial-banner { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 7px 14px; font-size: 13px; background: rgba(251,191,36,.14); border-bottom: 1px solid rgba(251,191,36,.35); color: var(--ink); }
.trial-banner button { border: 0; background: transparent; color: inherit; font-size: 18px; cursor: pointer; }

/* guia da chave de API */
.api-guide { width: min(560px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #171717; box-shadow: var(--shadow); color: var(--ink); }
body[data-theme="light"] .api-guide { background: #f4f4f4; }
.api-guide h2 { margin: 0; font-size: 20px; font-weight: 580; }
.api-guide ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; line-height: 1.5; font-size: 14px; color: var(--muted); }
.api-guide ol strong { color: var(--ink); }
.api-guide li .acc-btn { margin-top: 6px; }
.api-guide code { padding: 1px 5px; border-radius: 6px; background: var(--glass-2); }
.api-guide small { color: var(--muted); }
.api-guide form { display: flex; flex-direction: column; gap: 10px; }

/* ================= Versão web / celular ================= */
.touch-tools { display: none; position: absolute; right: 14px; bottom: 14px; z-index: 5; flex-direction: column; align-items: center; gap: 10px; }
.touch-tools .fab { position: static; transform: none; width: 56px; height: 56px; }
.touch-tools .fab-small { width: 44px; height: 44px; font-size: 22px; }
html.is-web .win-controls, html.is-web .listen { display: none; }
html.is-web .top { -webkit-app-region: no-drag; }
html.is-web .window { height: 100dvh; }
.card { touch-action: none; }
.sheet-scroll, .inline-attachment-content { touch-action: pan-x pan-y; }
.card-port { width: 28px; height: 28px; right: -14px; }

@media (pointer: coarse), (max-width: 820px) {
  .touch-tools { display: flex; }
  .zoom-bar { bottom: 14px; }
  button, .acc-btn { min-height: 40px; }
  input, textarea, select { font-size: 16px !important; }
  .card-port { width: 34px; height: 34px; right: -17px; }
  .card-inlet { width: 22px; height: 22px; left: -11px; }
  .book-options { width: 40px; height: 40px; }
}

@media (max-width: 820px) {
  .top { padding: 8px 10px; gap: 8px; }
  .brand { min-width: 0; }
  .brand small, .sync-chip { display: none; }
  .brand strong { font-size: 14px; }
  .top-actions { gap: 6px; }
  .top-actions .ghost:not(.theme-icon) { padding: 6px 10px; font-size: 13px; }
  .workspace-pop { padding: 0; }
  .workspace-window { border-radius: 0; border: 0; }
  .workspace-head > span:first-child { display: none; }
  .workspace-head { justify-content: flex-end; min-height: 46px; padding: 6px 10px; }
  .stage-overlay { top: 8px; left: 10px; right: 10px; flex-direction: column; align-items: stretch; gap: 8px; }
  .stage-overlay h1 { font-size: 22px; margin: 0; }
  #search { width: 100%; }
  .zoom-bar { left: 10px; }
  .books-home { padding: 14px 12px 110px; grid-template-columns: 1fr; gap: 12px; }
  .quick-new-book { bottom: 22px; }
  .drawer { top: 0; left: 0; transform: none; width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .popup-card, .settings-card, .new-book-dialog, .confirm-card, .api-guide { width: calc(100% - 20px) !important; max-height: calc(100% - 20px); overflow: auto; }
  .tutorial-card, .note-editor { width: calc(100% - 20px); max-height: calc(100% - 20px); overflow: auto; }
  .auth-card { padding: 22px 18px; border-radius: 18px; }
  .menu { min-width: 190px; }
  .video-stage-head { padding: 8px 10px; }
  .card.attachment-expanded { width: 320px; }
}

/* ===== Tela de boas-vindas (app de computador e Android) ===== */
.welcome { width: min(560px, 100%); margin: auto; text-align: center; color: var(--ink); }
.welcome-mark { width: 74px; height: 74px; margin: 0 auto 18px; padding: 12px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); box-shadow: 0 0 60px var(--glow); filter: invert(1); }
body[data-theme="light"] .welcome-mark { filter: none; }
.welcome-pill { display: inline-block; margin: 0 0 16px; padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); font-size: 12px; color: var(--muted); }
.welcome h1 { margin: 0; font-size: clamp(38px, 7vw, 58px); line-height: 1.08; font-weight: 620; letter-spacing: -.02em; }
.welcome h1 span { background: linear-gradient(90deg, #fff, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
body[data-theme="light"] .welcome h1 span { background: linear-gradient(90deg, #161616, #6d4fd6); -webkit-background-clip: text; background-clip: text; }
.welcome-sub { margin: 18px auto 20px; max-width: 440px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.welcome-list { list-style: none; margin: 0 auto 26px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 460px; text-align: left; }
.welcome-list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.welcome-list b { color: var(--ink); font-size: 15px; width: 18px; text-align: center; }
.welcome-actions { display: flex; flex-direction: column; gap: 10px; max-width: 360px; margin: 0 auto; }
.auth-secondary { display: block; width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); color: var(--ink); font-size: 15px; font-weight: 560; cursor: pointer; }
.auth-secondary:hover { background: var(--glass-2); }
.auth-back { margin: -6px 0 10px -6px; padding: 6px 8px; border: 0; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; }
.auth-back:hover { color: var(--ink); }
@media (max-width: 520px) { .welcome-list { grid-template-columns: 1fr; } }
