:root {
  --editor-size: 18px;
}
body {
  font-size: 17px;
}
.notepad-page {
  max-width: 1440px;
  padding-top: 25px;
  padding-bottom: 36px;
}
.topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}
.topline > .text-button {
  font-size: 14px;
}
.tool-heading {
  margin-bottom: 25px;
}
.notes-workspace {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: 0 6px 30px #30244205;
  overflow: hidden;
  min-height: 690px;
}
.notes-sidebar {
  background: #fcfbfe;
  border-right: 1px solid var(--border);
  padding: 23px 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sidebar-head .eyebrow {
  font-size: 11px;
  margin-bottom: 15px;
}
.sidebar-head .button {
  width: 100%;
  justify-content: center;
  font-size: 16px;
  min-height: 46px;
}
.search-box {
  margin-top: 20px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}
.search-box span {
  font-size: 23px;
  color: #8c819b;
  line-height: 1;
}
.search-box input {
  border: 0;
  background: transparent;
  min-width: 0;
  width: 100%;
  font-size: 15px;
  color: var(--ink);
  outline-offset: 8px;
}
.filter-tabs {
  display: flex;
  margin: 20px 0 9px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.filter-tabs button {
  font-size: 14px;
  padding: 0 2px 11px;
  white-space: nowrap;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.filter-tabs button[aria-pressed="true"] {
  border-color: var(--purple);
  color: var(--purple);
  font-weight: 650;
}
.filter-tabs span {
  font-size: 11px;
  background: var(--purple-soft);
  border-radius: 4px;
  padding: 2px 4px;
  margin-left: 3px;
}
.list-options {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 10px;
}
.list-options select {
  font-size: 12px;
  border: 0;
  color: var(--muted);
  background: transparent;
  max-width: 50%;
  min-height: 32px;
}
.note-list {
  max-height: 360px;
  overflow: auto;
  min-height: 180px;
}
.note-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  padding: 14px 13px;
  border-radius: 10px;
  margin-bottom: 7px;
}
.note-item.active {
  background: #f0eafa;
  border-color: #e6dcf6;
}
.note-item:hover {
  background: #f5f2fa;
}
.note-item strong {
  font-size: 15px;
  font-weight: 650;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note-item p {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  margin: 5px 0 8px;
}
.note-item small {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: #64586e;
}
.note-item small b {
  font-weight: 500;
  color: var(--purple);
}
.sidebar-actions {
  display: grid;
  gap: 3px;
  border-top: 1px solid var(--border);
  padding: 13px 0;
  margin-top: auto;
}
.sidebar-actions button {
  text-align: left;
  font-size: 14px;
  color: #655b76;
  min-height: 38px;
  padding-left: 11px;
}
.account-card {
  background: #f3eefc;
  border: 1px solid #e6dcf6;
  border-radius: 12px;
  padding: 16px;
  margin-top: 6px;
}
.account-card strong {
  display: block;
  font-size: 15px;
  margin: 6px 0;
}
.account-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.account-card .button {
  width: 100%;
  font-size: 13px;
  margin-top: 12px;
  justify-content: center;
}
.nudge-symbol {
  font-size: 24px;
  color: var(--purple);
}
.sidebar-disclaimer {
  font-size: 11px;
  line-height: 1.7;
  color: #64586e;
  padding: 14px 3px 0;
}
.sidebar-disclaimer a {
  text-decoration: underline;
}
.note-editor {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.editor-top {
  padding: 18px 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.save-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  color: #5d7767;
}
.saved-dot {
  width: 6px;
  height: 6px;
  background: #4f9a73;
  border-radius: 50%;
  flex-shrink: 0;
}
.editor-actions {
  display: flex;
  gap: 13px;
  align-items: center;
}
.editor-actions > button {
  min-height: 40px;
  min-width: 34px;
  font-size: 21px;
  color: #92829f;
}
.editor-actions > .button {
  font-size: 14px;
  min-width: 95px;
  color: white;
  padding: 10px 15px;
}
.note-title {
  display: block;
  width: calc(100% - 76px);
  margin: 31px 38px 9px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -0.7px;
  outline-offset: 4px;
  line-height: 1.5;
}
.note-detail {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 38px 24px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #655a72;
}
.note-detail > .text-button {
  font-size: 12px;
}
.tag {
  display: inline-block;
  color: #8464ae;
  background: #f4effb;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 5px;
  margin-right: 5px;
}
.writing-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #f0edf5;
  border-bottom: 1px solid #f0edf5;
  padding: 10px 27px;
}
.segmented button {
  font-size: 13px;
  min-height: 34px;
  padding: 7px 12px;
}
.writing-tools {
  display: flex;
  gap: 12px;
  align-items: center;
}
.writing-tools button {
  font-size: 13px;
  min-height: 34px;
  color: var(--muted);
  padding: 3px;
}
.writing-tools button[aria-pressed="true"] {
  color: var(--purple);
  font-weight: 700;
}
#note-body {
  font-family: var(--font);
  font-size: var(--editor-size);
  line-height: 1.9;
  display: block;
  padding: 27px 38px;
  height: 410px;
  min-height: 350px;
  max-height: none;
  width: 100%;
  resize: vertical;
  white-space: pre-wrap;
  color: var(--ink);
  background: var(--surface);
}
#note-body.nowrap {
  white-space: pre;
  overflow-wrap: normal;
}
#note-body:focus-visible {
  outline: none;
  box-shadow: inset 3px 0 #bda5ec;
}
#note-body::placeholder {
  color: #aaa1b2;
}
.editor-bottom {
  border-top: 1px solid var(--border);
  padding: 12px 28px;
  display: flex;
  gap: 17px;
  align-items: center;
  color: #655a72;
  font-size: 12px;
}
.editor-bottom button {
  margin-left: auto;
  font-size: 12px;
}
.prose {
  font-size: var(--editor-size);
  line-height: 1.85;
  padding: 27px 38px;
  min-height: 410px;
  overflow-wrap: anywhere;
}
.prose h2 {
  font-size: 29px;
  margin: 12px 0 22px;
}
.prose h3 {
  font-size: 21px;
  margin: 25px 0 12px;
}
.prose h4 {
  font-size: 19px;
  margin: 20px 0 10px;
}
.prose p {
  margin: 5px 0 10px;
}
.prose code {
  background: #f0ebf5;
  color: #735a8c;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 0.88em;
}
.prose pre {
  overflow: auto;
  white-space: pre-wrap;
  background: #f7f4fb;
  padding: 17px;
  border-radius: 8px;
}
.prose pre code {
  background: none;
  padding: 0;
}
.task-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 9px 0;
}
.task-line input {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.task-line:has(input:checked) span {
  text-decoration: line-through;
  color: var(--muted);
}
.below-workspace {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 21px;
  font-size: 12px;
  color: var(--muted);
}
.below-workspace > div {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 720px;
}
.below-workspace > div > span {
  font-size: 25px;
  color: #a189c5;
}
.below-workspace strong {
  color: #73667f;
}
.below-workspace .text-button {
  font-size: 12px;
  white-space: nowrap;
}
.notice {
  border: 1px solid #dfd4f1;
  border-radius: 9px;
  background: #f7f3fe;
  color: #67517e;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 14px;
}
.notice.error {
  background: #fff2ee;
  color: #983d37;
  border-color: #efd0c6;
}
.notice button {
  margin-left: 12px;
}
.danger {
  color: #ad4259 !important;
}
#account-session {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  background: #eee8f9;
  padding: 11px 18px;
  border: 1px solid #e0d4f0;
  border-radius: 10px;
  margin-bottom: 16px;
}
#account-session > span {
  color: #6e548f;
}
#account-session label {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
#account-session select {
  font-size: 13px;
  padding: 6px;
  border: 1px solid #dbcee9;
  border-radius: 6px;
}
#account-session .text-button {
  font-size: 12px;
}
#mobile-notes {
  display: none;
}
.empty-editor {
  text-align: center;
  padding: 100px 25px;
}
.empty-editor > span {
  font-size: 45px;
  color: var(--purple);
}
.empty-editor h2 {
  font-size: 24px;
  margin: 20px 0 10px;
}
.empty-editor p {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 25px;
}
#find-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 27px;
  background: #f7f4fc;
  font-size: 13px;
}
#find-bar input {
  min-width: 80px;
  max-width: 250px;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 7px;
}
#find-bar button {
  color: var(--purple);
  white-space: nowrap;
}
.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.modal-actions .button {
  margin-top: 0 !important;
}
.form-field {
  display: grid;
  gap: 7px;
  margin: 17px 0;
  font-size: 14px;
}
.form-field input,
.form-field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px;
  background: var(--surface);
  color: var(--ink);
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 9px 0;
  font-size: 14px;
}
.check-row input {
  margin-top: 4px;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.choice-card {
  display: block;
  text-align: left;
  width: 100%;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 11px;
  margin: 12px 0;
  background: var(--surface);
}
.choice-card strong {
  font-size: 17px;
  display: block;
}
.choice-card span {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-top: 6px;
}
.choice-card:hover {
  border-color: var(--purple);
}
.mini-label {
  font-size: 11px;
  color: var(--purple);
  letter-spacing: 0.7px;
  font-weight: 700;
}
.preview-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px;
  background: #faf8fe;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.8;
  color: #5d536c;
}
.share-row,
.version-row {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.share-row strong,
.version-row strong {
  display: block;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.share-row small,
.version-row small {
  font-size: 12px;
  color: var(--muted);
}
.row-actions {
  display: flex;
  gap: 18px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.row-actions button {
  font-size: 13px;
  color: var(--purple);
  min-height: 30px;
}
.reader {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 900px;
  margin: 0 auto;
  padding: 35px;
}
.reader-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.reader h2 {
  font-size: 31px;
  margin: 25px 0 12px;
  overflow-wrap: anywhere;
}
.reader .prose {
  padding: 20px 0;
  min-height: 200px;
}
.reader-meta {
  font-size: 13px;
  color: var(--muted);
}
.reader-actions {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.reader-actions .button {
  font-size: 14px;
}
.reader-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--border);
  margin-top: 25px;
  padding-top: 20px;
  font-size: 13px;
  color: var(--muted);
}
.reader-footer button {
  font-size: 13px;
  color: var(--purple);
}
.plain-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.focus-mode .site-header,
.focus-mode .preview-banner,
.focus-mode .topline,
.focus-mode .tool-heading,
.focus-mode .notes-sidebar,
.focus-mode .below-workspace,
.focus-mode .site-footer {
  display: none;
}
.focus-mode .notes-workspace {
  grid-template-columns: 1fr;
  max-width: 1100px;
  margin: auto;
}
.focus-mode #note-body,
.focus-mode .prose {
  min-height: 60vh;
}
.dark {
  --surface: #272331;
  --bg: #1e1b25;
  --ink: #ece7f4;
  --muted: #b5aabd;
  --border: #403749;
  --purple: #bb9cf7;
  --purple-soft: #3a2b51;
}
.dark .notes-sidebar,
.dark .site-header,
.dark dialog,
.dark .reading {
  background: var(--surface);
}
.dark .note-item.active,
.dark .account-card,
.dark .preview-banner,
.dark #account-session,
.dark .segmented,
.dark .preview-box,
.dark #find-bar {
  background: #372c46;
  color: #ded2ed;
}
.dark .note-item:hover {
  background: #352c40;
}
.dark .button-primary {
  background: #7850c5;
  color: white;
}
.dark .button-secondary {
  background: #332c3d;
  color: var(--ink);
  border-color: var(--border);
}
.dark .note-item strong,
.dark .sidebar-actions button {
  color: var(--ink);
}
.dark .segmented button[aria-pressed="true"] {
  background: #534067;
  color: white;
}
.dark .prose code,
.dark .tag {
  background: #382d45;
  color: #d2bae9;
}
.dark .site-footer {
  background: var(--bg);
}
.dark .prose pre {
  background: #211c2a;
}
.dark .notice {
  background: #3a2d48;
  color: #ddd0e9;
}
.dark .writing-toolbar {
  border-color: var(--border);
}
#modal-error {
  color: #a13f45;
  margin-top: 16px;
  font-size: 14px;
}
.footer-inner {
  min-height: 100px;
}
@media (max-width: 1100px) {
  .main-nav {
    display: none;
  }
  .header-inner {
    gap: 20px;
  }
  .header-actions {
    gap: 12px;
  }
  .notes-workspace {
    grid-template-columns: 250px minmax(0, 1fr);
  }
  .notes-sidebar {
    padding: 18px 13px;
  }
  .editor-top {
    padding: 15px 18px;
  }
  .editor-actions {
    gap: 7px;
  }
  .note-title {
    margin: 25px 25px 9px;
    width: calc(100% - 50px);
  }
  .note-detail {
    margin: 0 25px 20px;
  }
  .writing-toolbar {
    padding: 10px 18px;
    flex-wrap: wrap;
  }
  #note-body,
  .prose {
    padding: 25px;
  }
  .below-workspace {
    flex-wrap: wrap;
  }
  .editor-bottom {
    flex-wrap: wrap;
  }
  .writing-tools {
    gap: 16px;
  }
}
@media (max-width: 760px) {
  .notepad-page {
    padding: 20px 14px 25px;
  }
  .topline > .text-button {
    font-size: 12px;
  }
  .breadcrumbs {
    margin-bottom: 20px;
  }
  .tool-heading {
    margin-bottom: 20px;
  }
  .tool-heading p {
    font-size: 14px;
  }
  .header-inner {
    padding: 0 14px;
  }
  .header-actions #install {
    display: none;
  }
  .header-actions .button {
    font-size: 12px;
    padding: 10px;
  }
  .notes-workspace {
    display: block;
    min-height: 620px;
  }
  .notes-sidebar {
    display: none;
    border-right: 0;
    padding: 20px;
  }
  .mobile-list .notes-sidebar {
    display: flex;
  }
  .mobile-list .note-editor {
    display: none;
  }
  .note-list {
    max-height: 420px;
  }
  .sidebar-actions {
    margin-top: 25px;
  }
  #mobile-notes {
    display: inline-flex;
    font-size: 13px;
  }
  .saved-dot {
    display: none;
  }
  .save-wrap {
    flex-wrap: wrap;
    gap: 4px;
    font-size: 10px;
    max-width: 160px;
  }
  .editor-top {
    padding: 12px;
    gap: 6px;
  }
  .editor-actions {
    gap: 4px;
  }
  .editor-actions > button {
    font-size: 19px;
    min-width: 28px;
  }
  .editor-actions .button {
    font-size: 12px;
    min-width: 75px;
    padding: 9px;
  }
  .note-title {
    font-size: 24px;
    margin: 24px 20px 9px;
    width: calc(100% - 40px);
  }
  .note-detail {
    margin: 0 20px 20px;
    font-size: 11px;
    gap: 10px;
  }
  .writing-toolbar {
    padding: 10px 15px;
    gap: 8px;
  }
  .segmented button {
    font-size: 12px;
    padding: 6px 10px;
  }
  .writing-tools {
    gap: 12px;
    flex-wrap: wrap;
  }
  .writing-tools button {
    font-size: 12px;
  }
  #note-body {
    padding: 22px 20px;
    min-height: 380px;
    height: 45vh;
    font-size: var(--editor-size);
  }
  .prose {
    padding: 22px 20px;
  }
  .editor-bottom {
    font-size: 11px;
    padding: 12px 17px;
    gap: 10px;
  }
  #word-wrap-label {
    display: none;
  }
  .below-workspace {
    font-size: 11px;
  }
  .below-workspace .text-button {
    font-size: 12px;
  }
  #account-session {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
  }
  #account-session label {
    margin-left: 0;
  }
  #account-session select {
    max-width: 155px;
  }
  #find-bar {
    padding: 10px;
    gap: 8px;
    flex-wrap: wrap;
  }
  #find-bar input {
    max-width: 160px;
  }
  .reader {
    padding: 22px 18px;
  }
  .reader h2 {
    font-size: 26px;
  }
  .reader-top,
  .reader-footer {
    flex-wrap: wrap;
  }
  .reader-actions .button {
    width: 100%;
    justify-content: center;
  }
  .modal-top h2 {
    font-size: 21px;
  }
  .preview-banner {
    font-size: 11px;
  }
  .focus-mode .notepad-page {
    padding-top: 10px;
  }
  .focus-mode #mobile-notes {
    display: none;
  }
}
.dark {
  color-scheme: dark;
}
.dark .save-wrap,
.dark .local-badge {
  color: #a4cbb4;
}
.dark .eyebrow,
.dark .note-item small,
.dark .sidebar-disclaimer {
  color: #b6a5c5;
}
#scope-label {
  color: #675876;
}
.dark #scope-label {
  color: #b6a5c5;
}
@media print {
  body > * {
    display: none !important;
  }
  body .print-sheet {
    display: block !important;
    white-space: pre-wrap;
    font: 12pt/1.6 serif;
    padding: 20px;
    color: #000;
    background: #fff;
  }
  .print-sheet h1 {
    font-size: 22pt;
    margin-bottom: 20px;
  }
}
/* Production dialogs: readable controls and explicit review before upload. */
#modal-body > label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  font-size: 14px;
  font-weight: 600;
}
#modal-body > label:has(input[type="checkbox"]) {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
}
#modal-body input:not([type="checkbox"]),
#modal-body select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
#modal-body input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--purple);
}
.selection-list,
.action-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  margin: 15px 0;
}
.selection-list > button,
.selection-list > label,
.action-list > button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  text-align: left;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.selection-list > label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.selection-list > button:hover,
.action-list > button:hover {
  border-color: var(--purple);
}
.selection-list .share-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.selection-list .share-row span {
  overflow-wrap: anywhere;
}
.selection-list .share-row button {
  color: var(--purple);
  min-width: 70px;
  min-height: 44px;
}
#modal-body :is(button, input, select):focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}
.template-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}
.template-row button:first-child {
  flex: 1;
  min-height: 44px;
  padding: 10px 13px;
  text-align: left;
  overflow-wrap: anywhere;
}
.template-row button:last-child:not(:first-child) {
  min-height: 44px;
  padding: 9px 13px;
  color: var(--purple);
}
