/* =========================================================
   GLOBAL
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    background: #f7f8fc;
    color: #172033;
}


/* =========================================================
   HEADER
========================================================= */

.header {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e5e7eb;
    backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    font-size: 19px;
    box-shadow: 0 5px 12px rgba(79, 70, 229, 0.2);
}

.brand h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 750;
}

.brand p {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 13px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.note-count {
    margin-right: 6px;
    color: #64748b;
    font-size: 12px;
}

.header-button,
.view-toggle {
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}

.header-button {
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
    font-size: 12px;
}

.header-button:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.clear-button:hover {
    color: #dc2626;
    background: #fff1f2;
    border-color: #fecaca;
}


/* =========================================================
   MAIN
========================================================= */

main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 26px 32px 0;
  box-sizing: border-box;
}



/* =========================================================
   HERO
========================================================= */

.hero {
    margin-bottom: 20px;
    text-align: center;
}

.hero h2 {
    margin: 0 0 6px;
    font-size: 25px;
    letter-spacing: -0.6px;
}

.hero p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}


/* =========================================================
   INFORMATION PANEL
========================================================= */

.info-panel {
    width: 50%;
    margin: 0 auto 28px;
    overflow: hidden;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.info-tabs {
    height: 54px;
    display: flex;
    background: #fafbff;
}

.info-tab {
    position: relative;
    flex: 1;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: none;
    background: transparent;
    color: #475569;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.info-tab:hover {
    background: #f1f5f9;
    color: #334155;
}

.info-tab.active {
    background: white;
    color: #4f46e5;
}

.info-tab.active::after {
    content: "";
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: 0;
    height: 3px;
    background: #4f46e5;
    border-radius: 3px 3px 0 0;
}

.tab-icon {
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 14px;
}

.info-panel-content {
    min-height: 230px;
    display: flex;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.18s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   HOW / WHY CONTENT
========================================================= */

.steps,
.advantages {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.step {
    min-height: 82px;
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: center;
    column-gap: 11px;
    padding: 13px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
}

.step-number {
    width: 36px;
    height: 36px;
    grid-row: span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #4f46e5;
    color: white;
    font-size: 13px;
    font-weight: 800;
}

.step strong,
.advantage strong {
    display: block;
    margin-bottom: 3px;
    color: #1e293b;
    font-size: 13px;
    font-weight: 750;
}

.step span,
.advantage span {
    display: block;
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}

.advantage {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
}

.advantage-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #eef2ff;
    font-size: 17px;
}


/* =========================================================
   WORKSPACE
========================================================= */

.workspace-area {
    width: 100%;
    display: flex;
    gap: 16px;
}

.workspace-column {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
}

.workspace-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.workspace-title {
    margin: 0;
    font-size: 16px;
    font-weight: 750;
}


/* =========================================================
   OPTIONAL AD COLUMN
========================================================= */

.ad-column {
    width: 100%;
    position: sticky;
    top: 90px;
}

.ad-label {
    margin-bottom: 7px;
    text-align: center;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.ad-box {
    width: 100%;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    color: #94a3b8;
    font-size: 11px;
    text-align: center;
}

.ad-box span {
    padding: 20px;
}


/* =========================================================
   LEADERBOARD AD
========================================================= */

.leaderboard-ad {
    width: 100%;
    max-width: 970px;
    height: 90px;
    margin: 40px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
}

.leaderboard-ad .ad-label {
    margin: 0;
    color: #999;
    font-size: 11px;
}


/* =========================================================
   NOTES CONTAINER
========================================================= */

#notes {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
}


/* =========================================================
   PASTE BOX
========================================================= */

.paste-box {
    width: 290px;
    min-width: 250px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    padding: 18px;
    background: white;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
}

.paste-box:hover {
    border-color: #a5b4fc;
}

.paste-box:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
}

.paste-label {
    margin-bottom: 10px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.paste-box textarea {
    flex: 1;
    width: 100%;
    min-height: 210px;
    resize: none;
    border: none;
    outline: none;
    background: transparent;
    color: #334155;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
}

.paste-box textarea::placeholder {
    color: #94a3b8;
}

.paste-hint {
    margin-top: 8px;
    color: #94a3b8;
    font-size: 12px;
}


/* =========================================================
   STICKY NOTE
========================================================= */

.sticky-note {
    width: 290px;
    height: 300px;
    min-width: 250px;
    min-height: 220px;
    max-width: none;
    max-height: 750px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 16px;
    overflow: hidden;
    resize: both;
    background: var(--note-bg);
    border: 1px solid var(--note-border);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    cursor: default;
    transition:
        box-shadow 0.15s ease,
        opacity 0.15s ease,
        transform 0.15s ease;
}

.sticky-note:hover {
    box-shadow: 0 15px 32px rgba(15, 23, 42, 0.12);
}

.sticky-note.dragging {
    opacity: 0.45;
    transform: scale(0.98);
}

.sticky-note.drag-over {
    box-shadow:
        0 0 0 3px var(--note-accent),
        0 15px 32px rgba(15, 23, 42, 0.15);
}


/* =========================================================
   NOTE COLORS
========================================================= */

.color-indigo {
    --note-bg: #eef2ff;
    --note-border: #c7d2fe;
    --note-accent: #4f46e5;
}

.color-blue {
    --note-bg: #eff6ff;
    --note-border: #bfdbfe;
    --note-accent: #2563eb;
}

.color-green {
    --note-bg: #ecfdf5;
    --note-border: #a7f3d0;
    --note-accent: #059669;
}

.color-pink {
    --note-bg: #fdf2f8;
    --note-border: #fbcfe8;
    --note-accent: #db2777;
}

.color-orange {
    --note-bg: #fff7ed;
    --note-border: #fed7aa;
    --note-accent: #ea580c;
}


/* =========================================================
   NOTE HEADER
========================================================= */

.note-header {
    width: 100%;
    min-height: 32px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    position: relative;
    padding-right: 38px;
}

.note-title-area {
    flex: 1;
    min-width: 0;
}

.note-title {
    min-width: 0;
    max-width: 150px;

    overflow: hidden;

    color: var(--note-accent);

    text-overflow: ellipsis;
    white-space: nowrap;

    font-weight: 750;
}

.note-title.editing-title {
    max-width: 180px;

    padding: 3px 6px;

    overflow: visible;

    white-space: normal;

    outline: none;

    background: rgba(255, 255, 255, 0.55);

    border: 1px dashed var(--note-accent);
    border-radius: 5px;

    color: var(--note-accent);
}


.note-title-input {
    width: 100%;
    max-width: 180px;
    padding: 3px 6px;
    outline: none;
    background: rgba(255, 255, 255, 0.55);
    border: 1px dashed var(--note-accent);
    border-radius: 5px;
    color: inherit;
    font: inherit;
}

.note-drag-handle {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    cursor: grab;
    user-select: none;
    z-index: 10;
}

.note-drag-handle:hover {
    background: rgba(100, 116, 139, 0.1);
    color: var(--note-accent);
}

.note-drag-handle:active {
    cursor: grabbing;
}


/* =========================================================
   NOTE OPTIONS
========================================================= */

.note-options {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.color-select {
    padding: 4px 5px;
    outline: none;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--note-border);
    border-radius: 7px;
    color: #475569;
    font-size: 11px;
    cursor: pointer;
}


/* =========================================================
   NOTE TEXT
========================================================= */

.sticky-text {
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    padding: 7px 7px 14px;
    border-radius: 8px;
    outline: none;
    color: #1e293b;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    scrollbar-gutter: stable;
}

.sticky-text.editing {
    background: rgba(255, 255, 255, 0.6);
    border: 1px dashed var(--note-accent);
}


/* =========================================================
   LINE / SENTENCE / PARAGRAPH COPY
========================================================= */

.line-row,
.paragraph-row {
    min-width: 0;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid rgba(100, 116, 139, 0.12);
}

.line-row {
    align-items: center;
    padding: 5px 4px;
}

.paragraph-row {
    align-items: flex-start;
    padding: 6px 4px;
    margin-bottom: 6px;
}

.line-row:last-child,
.paragraph-row:last-child {
    border-bottom: none;
}

.line-text,
.paragraph-text {
    flex: 1;
    min-width: 0;
    padding-bottom: 2px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.line-copy,
.paragraph-copy {
    flex-shrink: 0;
    padding: 5px 9px;
    border: 1px solid var(--note-border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--note-accent);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.line-copy {
    margin-right: 4px;
}

.line-copy:hover,
.paragraph-copy:hover {
    background: white;
}


/* =========================================================
   NOTE ACTIONS
========================================================= */

.note-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 9px;
}

.action-button {
    height: 36px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.copy-all {
    flex: 1;
    background: var(--note-accent);
    color: white;
}

.copy-all:hover {
    filter: brightness(0.92);
}

.copy-all.copied {
    background: #16a34a;
}

.edit-button {
    background: rgba(255, 255, 255, 0.7);
    border-color: var(--note-border);
    color: var(--note-accent);
}

.delete-button {
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        transform 0.15s ease;
}

.delete-button:hover {
    background: #dc2626;
    transform: scale(1.08);
}

.delete-button:active {
    transform: scale(0.94);
}

.delete-button:focus-visible {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}


/* =========================================================
   SELECTION POPUP
========================================================= */

.selection-popup {
    position: fixed;
    z-index: 9999;
    padding: 0;
}

.selection-create-button {
    padding: 8px 12px;
    border: 1px solid var(--note-border, #c7d2fe);
    border-radius: 8px;
    background: #4f46e5;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
    transition:
        background-color 0.15s ease,
        transform 0.15s ease;
}

.selection-create-button:hover {
    filter: brightness(0.92);
}

.selection-create-button:active {
    transform: scale(0.97);
}


/* =========================================================
   PLUS BUTTON
========================================================= */

.plus-button {
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #10b981;
    color: white;
    font-size: 27px;
    font-weight: 300;
    cursor: pointer;
    transition: 0.15s;
}

.plus-button:hover {
    background: #059669;
    transform: scale(1.06);
}


/* =========================================================
   SHARE BUTTON
========================================================= */

#shareButton {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    color: #172033;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

#shareButton:hover {
    background: #f5f5f5;
}


/* =========================================================
   VIEW / FOCUS MODE BUTTON
========================================================= */

.view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid #ccc;
    background: white;
    color: #475569;
    font-size: 0.7rem;
}

.view-toggle:hover {
    background: #f5f5f5;
}

.view-icon {
    display: inline-block;
    line-height: 1;
}


/* =========================================================
   FOCUS MODE
========================================================= */

body.focus-mode > *:not(.header):not(main):not(#selectionPopup) {
    display: none !important;
}

body.focus-mode main > *:not(.workspace-area):not(.leaderboard-ad) {
    display: none !important;
}

#viewToggle {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* =========================================================
   FAQ
========================================================= */

.faq-section {
    width: 100%;
    max-width: 900px;
    margin: 60px auto 0;
}

.faq-main-toggle {
    width: 100%;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: white;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
}

.faq-main-toggle:hover {
    background: #fafbff;
    border-color: #c7d2fe;
}

.faq-main-toggle h2 {
    margin: 0 0 4px;
    color: #1e293b;
    font-size: 18px;
}

.faq-main-toggle p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.faq-main-arrow {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 18px;
    transition: transform 0.25s;
}

.faq-content {
    display: none;
    margin-top: 10px;
}

.faq-section.open .faq-content {
    display: block;
    animation: faqOpen 0.2s ease;
}

.faq-section.open .faq-main-arrow {
    transform: rotate(180deg);
}

@keyframes faqOpen {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    overflow: hidden;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
}

.faq-question {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 13px 16px;
    border: none;
    background: white;
    color: #1e293b;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.faq-question:hover {
    background: #f8fafc;
}

.faq-arrow {
    width: 25px;
    height: 25px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #f1f5f9;
    color: #64748b;
    transition: transform 0.2s;
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 16px 15px;
    background: white;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.faq-item.open .faq-answer {
    display: block;
}


/* =========================================================
   FOOTER
========================================================= */

.footer {
    margin-top: 70px;
    padding: 28px 30px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.footer-inner {
    max-width: 1400px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: 12px;
    font-weight: 750;
}

.footer-brand-icon {
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
}

.footer-text {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.footer-links a:hover {
    color: #4f46e5;
}


/* =========================================================
   TOAST
========================================================= */

#toast {
    position: fixed;
    left: 50%;
    bottom: 25px;
    z-index: 999;
    padding: 10px 16px;
    background: #0f172a;
    color: white;
    border-radius: 9px;
    font-size: 11px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 20px);
    transition: 0.25s;
}

#toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}


/* =========================================================
   DARK MODE
========================================================= */

body.dark {
    background: #0b1120;
    color: #e2e8f0;
}

body.dark .header {
    background: rgba(15, 23, 42, 0.94);
    border-color: #1e293b;
}

body.dark .header-button,
body.dark .view-toggle {
    background: #111827;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark .info-panel,
body.dark .faq-main-toggle,
body.dark .faq-item,
body.dark .ad-box,
body.dark .footer {
    background: #111827;
    border-color: #334155;
}

body.dark .info-tabs {
    background: #0f172a;
}

body.dark .info-tab {
    color: #94a3b8;
}

body.dark .info-tab.active {
    background: #111827;
    color: #818cf8;
}

body.dark .info-tab:hover,
body.dark .faq-main-toggle:hover,
body.dark .faq-question:hover {
    background: #172033;
}

body.dark .step,
body.dark .advantage {
    background: #0f172a;
    border-color: #334155;
}

body.dark .step strong,
body.dark .advantage strong,
body.dark .faq-main-toggle h2,
body.dark .faq-question,
body.dark .footer-brand {
    color: #e2e8f0;
}

body.dark .step span,
body.dark .advantage span,
body.dark .faq-main-toggle p,
body.dark .faq-answer,
body.dark .hero p,
body.dark .footer-text,
body.dark .footer-links a {
    color: #94a3b8;
}

body.dark .paste-box {
    background: #111827;
    border-color: #334155;
}

body.dark .paste-box textarea {
    color: #e2e8f0;
}

body.dark .faq-question,
body.dark .faq-answer {
    background: #111827;
}

body.dark .faq-main-arrow,
body.dark .faq-arrow {
    background: #1e293b;
    color: #818cf8;
}

body.dark .faq-arrow {
    color: #94a3b8;
}

body.dark .note-title-input {
    background: rgba(15, 23, 42, 0.6);
    color: #e2e8f0;
}

body.dark .paragraph-copy,
body.dark .line-copy {
    background: rgba(15, 23, 42, 0.55);
    color: var(--note-accent);
}

body.dark .paragraph-copy:hover,
body.dark .line-copy:hover {
    background: rgba(15, 23, 42, 0.8);
}

body.dark .view-toggle:hover {
    background: #172033;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {
    .info-panel {
        width: 65%;
    }

    .workspace-area {
        gap: 14px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 800px) {
    .header {
        padding: 0 16px;
    }

    .brand p,
    .note-count {
        display: none;
    }

    main {
        padding: 22px 16px 35px;
    }

    .hero h2 {
        font-size: 23px;
    }

    .info-panel {
        width: 100%;
    }

    .info-panel-content {
        padding: 14px;
    }

    .workspace-area {
        flex-direction: column;
        gap: 35px;
    }

    .ad-column {
        position: static;
        order: 2;
    }

    .ad-box {
        min-height: 180px;
    }

    #notes {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
    }

    .sticky-note,
    .paste-box {
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
    }

    .faq-section {
        margin-top: 45px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .note-options {
        justify-content: flex-end;
    }

    .note-title {
        max-width: 120px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 500px) {
    .steps,
    .advantages {
        grid-template-columns: 1fr;
    }

    .info-panel-content {
        min-height: 330px;
    }

    .step,
    .advantage {
        min-height: 65px;
        padding: 10px;
    }

    .brand h1 {
        font-size: 16px;
    }

    .header-button.clear-button {
        display: none;
    }

    .info-tab {
        font-size: 11px;
    }

    .footer {
        padding: 24px 16px;
    }

    .note-header {
        padding-right: 34px;
    }

    .note-drag-handle {
        width: 26px;
        height: 26px;
    }
}


/* =========================================================
   NOTE HEADER OVERRIDE
   Keeps title and drag handle on the top row
========================================================= */

.note-header {
    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 7px;

    position: relative;

    padding-right: 0;
}

.note-title-area {
    width: 100%;
    min-width: 0;

    display: flex;
    align-items: center;

    padding-right: 36px;
}

.note-title {
    min-width: 0;
    max-width: calc(100% - 36px);

    overflow: hidden;

    color: var(--note-accent);

    text-overflow: ellipsis;
    white-space: nowrap;

    font-weight: 750;
}

.note-title.editing-title {
    max-width: calc(100% - 36px);

    padding: 3px 6px;

    overflow: visible;

    white-space: normal;

    outline: none;

    background: rgba(255, 255, 255, 0.55);

    border: 1px dashed var(--note-accent);
    border-radius: 5px;

    color: var(--note-accent);
}

.note-drag-handle {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    position: absolute;
    top: 0;
    right: 0;

    margin: 0;

    border-radius: 6px;

    color: #94a3b8;

    font-size: 13px;

    cursor: grab;

    user-select: none;

    z-index: 10;
}

.note-drag-handle:hover {
    background: rgba(100, 116, 139, 0.1);
    color: var(--note-accent);
}

.note-drag-handle:active {
    cursor: grabbing;
}

.note-options {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 6px;

    flex-wrap: wrap;
}

/* =========================================================
   DRAG PLACEHOLDER
========================================================= */

.drag-placeholder {
    display: block;
    box-sizing: border-box;

    min-width: 250px;
    min-height: 220px;

    border: 2px dashed rgba(100, 100, 100, 0.35);
    border-radius: 12px;

    background: rgba(100, 100, 100, 0.06);

    pointer-events: none;
}


/* =========================================================
   DRAGGING NOTE
========================================================= */

.sticky-note.dragging {
    opacity: 0.85;
    cursor: grabbing;

    pointer-events: none;

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.22);
}


.note-drag-handle {
    cursor: grab;
    touch-action: none;
}


.note-drag-handle:active {
    cursor: grabbing;
}




