:root {
    color-scheme: dark;
    --bg: #04080f;
    --panel: rgba(7, 14, 24, 0.96);
    --panel-soft: rgba(12, 22, 34, 0.9);
    --text: #edf7f9;
    --muted: #8fa8b1;
    --mint: #5fcaba;
    --amber: #c5a35a;
    --danger: #e85d72;
    --border: rgba(95, 202, 186, 0.2);
    --shadow: rgba(0, 0, 0, 0.5);
    --radius: 8px;
    font-family: Inter, Roboto, "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

.visually-hidden {
    width: 1px;
    height: 1px;
    position: absolute;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

body {
    min-height: 100vh;
    margin: 0;
    padding-bottom: 78px;
    color: var(--text);
    background:
        linear-gradient(rgba(95, 202, 186, 0.016) 1px, transparent 1px),
        linear-gradient(90deg, rgba(95, 202, 186, 0.014) 1px, transparent 1px),
        linear-gradient(135deg, rgba(95, 202, 186, 0.035), transparent 34%),
        linear-gradient(315deg, rgba(197, 163, 90, 0.032), transparent 38%),
        var(--bg);
    background-size: 34px 34px, 34px 34px, auto, auto, auto;
    line-height: 1.5;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: var(--mint);
    text-decoration: none;
}

.app-header {
    border-bottom: 1px solid rgba(95, 202, 186, 0.16);
    background: linear-gradient(90deg, rgba(95, 202, 186, 0.05), rgba(197, 163, 90, 0.032)), rgba(4, 8, 15, 0.94);
    box-shadow: 0 12px 30px var(--shadow);
}

h1 {
    margin: 0;
    font-family: "Cascadia Mono", "Segoe UI", monospace;
    font-size: clamp(1.55rem, 4vw, 2.65rem);
    line-height: 1.05;
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(95, 202, 186, 0.12);
}

h1 a,
h1 a:hover {
    color: inherit;
    text-decoration: none;
}

.header-tagline.is-typing {
    min-width: var(--typing-width, auto);
}

.header-tagline.is-typing::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 1em;
    margin-left: 4px;
    vertical-align: -2px;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
    animation: cursor-blink 800ms steps(2, start) infinite;
}

.header-tagline {
    max-width: 620px;
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.notepad-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 56px;
}

.notepad-panel,
.info-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 0 14px rgba(95, 202, 186, 0.035), 0 14px 34px var(--shadow);
}

.notepad-panel {
    height: clamp(620px, calc(100vh - 170px), 720px);
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    overflow: hidden;
}

.notepad-panel > *,
.notes-sidebar > *,
.editor-panel > *,
.editor-toolbar > *,
.editor-actions > *,
.body-field > *,
.body-field__header > *,
.notepad-dialog__actions > * {
    min-width: 0;
}

.notes-sidebar {
    min-height: 0;
    padding: 18px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
    overflow: hidden;
    border-right: 1px solid rgba(95, 202, 186, 0.14);
    background: rgba(0, 0, 0, 0.16);
}

.notes-sidebar__header,
.editor-toolbar,
.editor-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.notes-sidebar h2 {
    margin: 0;
    color: var(--mint);
    font-size: 1rem;
    text-transform: uppercase;
}

.note-list {
    min-height: 0;
    max-height: 100%;
    padding-bottom: 2px;
    display: grid;
    align-content: start;
    gap: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.note-list.is-over-desktop-limit {
    max-height: 548px;
    padding-right: 4px;
    border-top: 1px solid rgba(95, 202, 186, 0.16);
    border-bottom: 1px solid rgba(95, 202, 186, 0.16);
}

.note-tab {
    width: 100%;
    padding: 10px 11px;
    display: grid;
    gap: 4px;
    text-align: left;
    color: var(--text);
    border: 1px solid rgba(95, 202, 186, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
}

.note-tab:hover,
.note-tab:focus-visible,
.note-tab.is-active {
    border-color: var(--mint);
    background: rgba(95, 202, 186, 0.065);
    outline: none;
}

.note-tab strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-tab span {
    color: var(--muted);
    font-size: 0.82rem;
}

.editor-panel {
    min-width: 0;
    min-height: 0;
    padding: clamp(16px, 3vw, 26px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 16px;
}

.editor-toolbar {
    align-items: end;
}

.import-limits {
    width: min(50%, 590px);
    margin: 10px auto 12px;
    padding: 8px 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 14px;
    color: #f1d58a;
    border: 1px solid color-mix(in srgb, var(--mint) 28%, transparent);
    border-left: 3px solid color-mix(in srgb, var(--mint) 78%, var(--amber));
    border-right: 3px solid color-mix(in srgb, var(--mint) 78%, var(--amber));
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(95, 202, 186, 0.075), rgba(197, 163, 90, 0.035)),
        rgba(7, 14, 24, 0.62);
    font-size: 0.84rem;
    font-weight: 800;
}

.editor-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.field {
    display: grid;
    gap: 8px;
}

.field span,
.body-field__header label {
    color: var(--mint);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.title-field {
    flex: 1 1 260px;
}

.body-field {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.body-field:focus-within textarea {
    box-shadow: 0 0 0 3px rgba(95, 202, 186, 0.085);
}

.body-field__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.body-field__tools {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.spellcheck-toggle {
    min-height: 30px;
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #f7fbff;
    border: 1px solid rgba(142, 168, 255, 0.48);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(142, 168, 255, 0.94), rgba(172, 127, 255, 0.82));
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.32);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.spellcheck-toggle.is-off {
    color: var(--muted);
    border-color: rgba(142, 168, 255, 0.24);
    background: rgba(10, 15, 28, 0.78);
    text-shadow: none;
}

.spellcheck-toggle i {
    font-size: 0.8rem;
}

.body-focus-button {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    color: #06131c;
    border: 1px solid rgba(95, 202, 186, 0.42);
    border-radius: 6px;
    background:
        linear-gradient(135deg, rgba(95, 202, 186, 0.9), rgba(71, 174, 166, 0.86)),
        #10212c;
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.24),
        0 4px 0 rgba(0, 44, 56, 0.4);
}

.body-focus-button:active {
    box-shadow:
        inset 0 -1px 0 rgba(0, 0, 0, 0.24),
        0 2px 0 rgba(0, 44, 56, 0.4);
    transform: translateY(2px);
}

body.is-writing-focus {
    overflow: hidden;
}

body.is-writing-focus .app-header,
body.is-writing-focus .notes-sidebar,
body.is-writing-focus .editor-toolbar,
body.is-writing-focus .editor-status,
body.is-writing-focus .info-panel,
body.is-writing-focus .utility-feedback,
body.is-writing-focus .ad-support-strip,
body.is-writing-focus .nexus-footer {
    opacity: 0.18;
    pointer-events: none;
    user-select: none;
}

body.is-writing-focus .body-field {
    position: fixed;
    inset: 18px;
    z-index: 80;
    padding: 12px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid rgba(95, 202, 186, 0.26);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(95, 202, 186, 0.055), rgba(197, 163, 90, 0.032)),
        var(--panel);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.64);
}

body.is-writing-focus .body-field textarea {
    min-height: 0;
    resize: none;
}

body.is-writing-focus .body-focus-button {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.82);
    background:
        linear-gradient(135deg, rgba(207, 56, 80, 0.94), rgba(142, 31, 48, 0.92)),
        #210a12;
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.28),
        0 4px 0 rgba(54, 14, 22, 0.58);
}

body.is-writing-focus .body-focus-button:active {
    box-shadow:
        inset 0 -1px 0 rgba(0, 0, 0, 0.26),
        0 2px 0 rgba(54, 14, 22, 0.58);
    transform: translateY(2px);
}

input,
textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    color: var(--text);
    border: 1px solid rgba(95, 202, 186, 0.22);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.24);
    outline: none;
}

input {
    min-height: 46px;
    padding: 10px 12px;
}

textarea {
    min-height: 0;
    height: auto;
    padding: 14px 14px 18px;
    display: block;
    border-color: rgba(95, 202, 186, 0.22);
    border-bottom-color: rgba(95, 202, 186, 0.22);
    border-radius: 6px;
    resize: none;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: break-word;
    line-height: 1.6;
    scrollbar-gutter: stable;
}

input:focus,
textarea:focus {
    border-color: var(--mint);
}

.button-secondary,
.button-import,
.button-export,
.button-danger,
.icon-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 900;
    text-transform: uppercase;
}

.button-secondary,
.button-import,
.button-export,
.button-danger {
    padding: 9px 13px;
}

.icon-button {
    width: 42px;
    padding: 0;
    color: #071018;
    border: 1px solid rgba(197, 163, 90, 0.28);
    background: linear-gradient(135deg, var(--mint), var(--amber));
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.26),
        0 4px 0 rgba(0, 0, 0, 0.34);
}

.button-secondary {
    color: #071018;
    border: 1px solid rgba(197, 163, 90, 0.28);
    background: linear-gradient(135deg, var(--mint), var(--amber));
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.26),
        0 4px 0 rgba(0, 0, 0, 0.34);
}

.button-import {
    color: #06131c;
    border: 1px solid rgba(95, 202, 186, 0.42);
    background:
        linear-gradient(135deg, rgba(95, 202, 186, 0.9), rgba(88, 178, 206, 0.84)),
        #10212c;
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.24),
        0 4px 0 rgba(0, 44, 56, 0.4);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button-import:hover {
    border-color: rgba(95, 202, 186, 0.62);
    background:
        linear-gradient(135deg, rgba(107, 216, 199, 0.92), rgba(100, 194, 220, 0.88)),
        #10212c;
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.22),
        0 4px 0 rgba(0, 44, 56, 0.44);
}

.button-import:active {
    box-shadow:
        inset 0 -1px 0 rgba(0, 0, 0, 0.24),
        0 2px 0 rgba(0, 44, 56, 0.42);
    transform: scaleY(0.92);
    transform-origin: bottom;
}

.button-export {
    color: #10091d;
    border: 1px solid rgba(167, 139, 250, 0.55);
    background:
        linear-gradient(135deg, #a78bfa, #c5a35a),
        #1a1228;
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.24),
        0 4px 0 rgba(45, 31, 72, 0.56);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button-export:hover {
    color: #080511;
    border-color: rgba(197, 163, 90, 0.66);
    background:
        linear-gradient(135deg, #a995e6, #d9b76f),
        #1a1228;
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.22),
        0 4px 0 rgba(45, 31, 72, 0.56);
}

.button-export:active {
    box-shadow:
        inset 0 -1px 0 rgba(0, 0, 0, 0.24),
        0 2px 0 rgba(45, 31, 72, 0.58);
    transform: translateY(2px);
}

.button-danger {
    color: #ffe7ec;
    border: 1px solid rgba(232, 93, 114, 0.3);
    background: rgba(232, 93, 114, 0.1);
}

.button-delete-note {
    width: 42px;
    padding: 0;
    color: #fff;
    border-color: rgba(232, 93, 114, 0.44);
    background:
        linear-gradient(135deg, rgba(160, 42, 62, 0.34), rgba(232, 93, 114, 0.16)),
        rgba(18, 8, 16, 0.94);
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.24),
        0 4px 0 rgba(54, 14, 22, 0.48);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button-delete-note:hover {
    border-color: rgba(232, 93, 114, 0.56);
    background:
        linear-gradient(135deg, rgba(160, 42, 62, 0.4), rgba(232, 93, 114, 0.2)),
        rgba(18, 8, 16, 0.96);
}

.button-delete-note:active {
    box-shadow:
        inset 0 -1px 0 rgba(0, 0, 0, 0.24),
        0 2px 0 rgba(54, 14, 22, 0.48);
    transform: translateY(2px);
}

.button-delete-note .bi {
    font-size: 1.08rem;
}

.button-secondary:active,
.icon-button:active {
    transform: scaleY(0.92);
    transform-origin: bottom;
}

.editor-status {
    margin-top: 20px;
    padding-top: 0;
    color: var(--muted);
    font-family: "Cascadia Mono", "Segoe UI", monospace;
    font-size: 0.86rem;
    font-weight: 800;
}

#saveStatus.is-warning {
    color: #ffe3a3;
    text-shadow: 0 0 10px rgba(197, 163, 90, 0.12);
}

.info-panel {
    margin-top: 18px;
    padding: clamp(18px, 4vw, 30px);
}

.info-panel h2 {
    margin: 0 0 12px;
    color: var(--mint);
}

.info-panel p {
    margin: 10px 0 0;
    color: var(--muted);
}

.privacy-note {
    padding: 10px 12px;
    border-left: 3px solid var(--mint);
    background: rgba(95, 202, 186, 0.045);
    border-radius: 6px;
}

.notepad-dialog {
    width: min(460px, calc(100% - 32px));
    padding: 0;
    color: var(--text);
    border: 1px solid rgba(95, 202, 186, 0.24);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(95, 202, 186, 0.065), rgba(197, 163, 90, 0.04)),
        var(--panel);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.58);
}

.notepad-dialog::backdrop {
    background: rgba(2, 5, 12, 0.72);
}

.notepad-dialog__panel {
    padding: 20px;
    display: grid;
    gap: 14px;
}

.notepad-dialog__header,
.notepad-dialog__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.notepad-dialog h2 {
    margin: 0;
    color: var(--mint);
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.notepad-dialog p {
    margin: 0;
    color: var(--muted);
}

.notepad-dialog__field {
    display: grid;
    gap: 8px;
}

.notepad-dialog__field[hidden] {
    display: none;
}

.notepad-dialog__field span {
    color: var(--mint);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.notepad-dialog .notepad-dialog__error {
    min-height: 1.2em;
    color: var(--danger);
    font-weight: 800;
}

.notepad-dialog__close {
    width: 34px;
    height: 34px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 6px;
    background: #b92f46;
    font-weight: 900;
}

.notepad-dialog__actions .button-danger {
    color: #ffe7ec;
    border-color: rgba(232, 93, 114, 0.32);
    background: linear-gradient(135deg, rgba(232, 93, 114, 0.18), rgba(160, 42, 62, 0.18));
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.22),
        0 4px 0 rgba(54, 14, 22, 0.46);
}

.notepad-dialog__actions .button-danger:hover {
    border-color: rgba(232, 93, 114, 0.44);
    background: linear-gradient(135deg, rgba(232, 93, 114, 0.23), rgba(160, 42, 62, 0.22));
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.22),
        0 4px 0 rgba(54, 14, 22, 0.5);
}

.notepad-dialog__actions .button-dialog-import {
    color: #eaf8ff;
    border-color: rgba(88, 178, 206, 0.38);
    background:
        linear-gradient(135deg, rgba(34, 116, 168, 0.28), rgba(17, 58, 105, 0.3)),
        rgba(7, 18, 34, 0.92);
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.22),
        0 4px 0 rgba(6, 28, 52, 0.54);
}

.notepad-dialog__actions .button-dialog-import:hover {
    border-color: rgba(88, 178, 206, 0.56);
    background:
        linear-gradient(135deg, rgba(43, 137, 194, 0.34), rgba(22, 73, 126, 0.34)),
        rgba(7, 18, 34, 0.96);
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.22),
        0 4px 0 rgba(6, 28, 52, 0.58);
}

.notepad-dialog__close:active,
.notepad-dialog__actions .button-secondary:active {
    transform: scale(0.97);
}

.notepad-dialog__actions .button-danger:active {
    box-shadow:
        inset 0 -1px 0 rgba(0, 0, 0, 0.24),
        0 2px 0 rgba(54, 14, 22, 0.46);
    transform: translateY(2px);
}

.notepad-dialog__actions .button-dialog-import:active {
    box-shadow:
        inset 0 -1px 0 rgba(0, 0, 0, 0.22),
        0 2px 0 rgba(6, 28, 52, 0.54);
    transform: translateY(2px);
}

.notepad-dialog__actions {
    justify-content: flex-end;
}

.notepad-dialog__actions [hidden] {
    display: none;
}

#notepadDialogCancel {
    width: 104px;
    min-width: 104px;
    max-width: 104px;
    flex: 0 0 104px;
    padding-right: 0;
    padding-left: 0;
}

.notepad-dialog.is-export-dialog .notepad-dialog__panel {
    gap: 9px;
}

.notepad-dialog.is-export-dialog .notepad-dialog__error {
    display: none;
}

.notepad-dialog.is-export-dialog .notepad-dialog__actions {
    margin-top: 2px;
    gap: 8px;
}

.notepad-dialog.is-export-dialog .button-secondary,
.notepad-dialog.is-export-dialog .button-export {
    color: #06131c;
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.24),
        0 4px 0 rgba(0, 44, 56, 0.4);
}

.notepad-dialog.is-export-dialog .button-dialog-cancel {
    color: #fff;
    border-color: rgba(232, 93, 114, 0.52);
    background:
        linear-gradient(135deg, rgba(185, 47, 70, 0.82), rgba(142, 31, 48, 0.86)),
        #210a12;
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.24),
        0 4px 0 rgba(54, 14, 22, 0.48);
}

.notepad-dialog.is-export-dialog .button-dialog-cancel:hover {
    border-color: rgba(232, 110, 130, 0.62);
    background:
        linear-gradient(135deg, rgba(207, 56, 80, 0.9), rgba(158, 38, 56, 0.9)),
        #210a12;
}

.notepad-dialog.is-export-dialog .button-dialog-cancel:active {
    box-shadow:
        inset 0 -1px 0 rgba(0, 0, 0, 0.24),
        0 2px 0 rgba(54, 14, 22, 0.48);
    transform: translateY(2px);
}

.notepad-dialog.is-export-dialog .button-secondary:not(.button-dialog-cancel) {
    border-color: rgba(95, 202, 186, 0.42);
    background:
        linear-gradient(135deg, rgba(95, 202, 186, 0.9), rgba(71, 174, 166, 0.86)),
        #10212c;
}

.notepad-dialog.is-export-dialog .button-export {
    border-color: rgba(197, 163, 90, 0.5);
    background:
        linear-gradient(135deg, rgba(197, 163, 90, 0.88), rgba(176, 133, 62, 0.84)),
        #21190e;
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.24),
        0 4px 0 rgba(78, 54, 20, 0.48);
}

.notepad-dialog.is-export-dialog .button-secondary:not(.button-dialog-cancel):hover,
.notepad-dialog.is-export-dialog .button-export:hover {
    color: #041019;
}

.notepad-dialog.is-export-dialog .button-secondary:not(.button-dialog-cancel):hover {
    border-color: rgba(95, 202, 186, 0.62);
    background:
        linear-gradient(135deg, rgba(107, 216, 199, 0.92), rgba(82, 191, 178, 0.88)),
        #10212c;
}

.notepad-dialog.is-export-dialog .button-export:hover {
    border-color: rgba(217, 183, 111, 0.66);
    background:
        linear-gradient(135deg, rgba(217, 183, 111, 0.9), rgba(188, 143, 67, 0.86)),
        #21190e;
}

.notepad-dialog.is-export-dialog .button-secondary:not(.button-dialog-cancel):active,
.notepad-dialog.is-export-dialog .button-export:active {
    transform: translateY(2px);
}

.notepad-dialog.is-export-dialog .button-secondary:not(.button-dialog-cancel):active {
    box-shadow:
        inset 0 -1px 0 rgba(0, 0, 0, 0.24),
        0 2px 0 rgba(0, 44, 56, 0.4);
}

.notepad-dialog.is-export-dialog .button-export:active {
    box-shadow:
        inset 0 -1px 0 rgba(0, 0, 0, 0.24),
        0 2px 0 rgba(78, 54, 20, 0.48);
}

.noscript-alert {
    width: min(1080px, calc(100% - 32px));
    margin: 16px auto 0;
    padding: 12px 14px;
    color: #ffe1e8;
    border: 1px solid rgba(255, 116, 137, 0.36);
    border-radius: var(--radius);
    background: rgba(255, 79, 109, 0.12);
}

@keyframes cursor-blink {
    50% {
        opacity: 0;
    }
}

@media (max-width: 820px) {
    .notepad-shell {
        width: calc(100% - 20px);
    }

    .notepad-panel {
        height: auto;
        max-height: none;
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .notes-sidebar {
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid rgba(95, 202, 186, 0.14);
    }

    .note-list.is-over-mobile-limit {
        max-height: 228px;
        padding-right: 4px;
        border-top: 1px solid rgba(95, 202, 186, 0.16);
        border-bottom: 1px solid rgba(95, 202, 186, 0.16);
    }

    .editor-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .editor-panel .title-field {
        flex: 0 0 auto;
    }

    .editor-actions {
        width: 100%;
    }

    .body-field {
        grid-template-rows: auto minmax(420px, 1fr);
    }

    .notepad-dialog__actions .button-secondary {
        width: auto;
        min-width: 104px;
        flex: 0 0 auto;
    }

    .button-delete-note {
        width: 42px;
        flex: 0 0 42px;
    }

    body {
        padding-bottom: 0;
    }
}

@media (min-width: 768px) and (max-width: 820px) {
    .import-limits {
        width: min(76%, 590px);
        display: flex;
        justify-content: space-between;
        text-align: initial;
    }

    .editor-toolbar {
        align-items: end;
        flex-direction: row;
    }

    .editor-panel .title-field {
        flex: 1 1 auto;
    }

    .editor-actions {
        width: auto;
        flex: 0 0 auto;
        justify-content: flex-end;
    }
}

@media (max-width: 425px) {
    .import-limits {
        width: min(84%, 29ch);
        display: grid;
        grid-template-columns: 1fr 1fr;
        text-align: center;
    }

    .import-limits span:first-child {
        grid-column: 1 / -1;
    }

    .import-limits span:nth-child(2) {
        text-align: left;
    }

    .import-limits span:nth-child(3) {
        text-align: right;
    }

    .editor-toolbar {
        gap: 14px;
    }

    .editor-panel .title-field {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 6px;
    }

    .editor-panel .title-field span {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .editor-panel .title-field input {
        min-width: 0;
        min-height: 34px;
        width: auto;
        flex: 1 1 auto;
        padding: 5px 8px;
    }

    .editor-actions {
        margin: 4px 0;
        justify-content: center;
        gap: 7px;
    }

    body.is-writing-focus .body-field {
        inset: 4px;
        padding: 8px;
    }
}

.note-meta,
.storage-alert,
.status-message {
    font-family: var(--font-data), "Cascadia Mono", "Segoe UI", monospace;
}
