* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    color: #1a2332;
    background: linear-gradient(135deg, #f0f6ff 0%, #e3edf7 40%, #f5f8ff 100%);
    background-attachment: fixed;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: #1a73e8;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: #1557b0; }

/* ── Topbar ── */
.topbar {
    min-height: 64px;
    padding: 0 28px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(26,115,232,0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    font-size: 22px;
    font-weight: 700;
    color: #1a73e8;
    letter-spacing: 0.5px;
}

.brand::before { content: '✉ '; }

.nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.nav-user {
    color: #6b8fb5;
    font-size: 14px;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px;
}

.install-wrap {
    max-width: 880px;
    margin: 36px auto;
    padding: 0 20px;
}

/* ── Shared panels (login / register / admin) ── */
.panel {
    background: #ffffff;
    border: 1px solid #e3ecf5;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(26,115,232,0.08);
}

h1 {
    margin: 0 0 16px;
    font-size: 24px;
    line-height: 1.3;
    color: #1a2332;
}

h2 {
    margin: 20px 0 10px;
    font-size: 18px;
}

.muted,
.empty {
    color: #8aabca;
}

.stack {
    display: grid;
    gap: 16px;
    position: relative;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
    position: relative;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #2c5282;
}

input,
textarea {
    width: 100%;
    border: 2px solid #e3ecf5;
    border-radius: 10px;
    padding: 10px 14px;
    font: inherit;
    background: #f8faff;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 4px rgba(26,115,232,0.1);
    background: #ffffff;
}

textarea {
    resize: vertical;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    padding: 0 22px;
    background: linear-gradient(135deg, #1a73e8, #1565C0);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(26,115,232,0.25);
}
.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26,115,232,0.35);
}
.button:active { transform: translateY(0); }

.button.secondary {
    background: #6b8fb5;
    box-shadow: none;
}
.button.secondary:hover {
    box-shadow: 0 4px 12px rgba(107,143,181,0.3);
}

.button.danger {
    background: #c62828;
    box-shadow: 0 4px 12px rgba(198,40,40,0.22);
}

.button.danger:hover {
    box-shadow: 0 6px 18px rgba(198,40,40,0.32);
}

.auth {
    max-width: 460px;
    margin: 48px auto;
}

.alert {
    margin: 0 0 16px;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14px;
}

.alert-error {
    background: #fff5f5;
    border-color: #ffcdd2;
    color: #c62828;
}

.alert-success {
    background: #f0fff4;
    border-color: #b2f5d0;
    color: #276749;
}

/* ── Cloud Bubbles (云朵提示) ── */
.flash-bubbles {
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
    margin: 0;
}

/* Floating version — used by JS showToast, appended to body */
.flash-bubbles-floating {
    position: fixed;
    top: 80px;
    right: 28px;
}

/* In-page version — used by render_flash_bubbles('page-flash-bubbles') */
.page-flash-bubbles {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
}

.flash-bubble {
    position: relative;
    width: 100%;
    padding: 16px 24px 18px 24px;
    border: none;
    border-radius: 24px 24px 24px 10px;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    filter: drop-shadow(0 6px 24px rgba(26,115,232,0.08)) drop-shadow(0 2px 8px rgba(0,0,0,0.04));
    animation: cloudDriftIn 0.6s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

/* ── Cloud bumps ── */
.flash-bubble::before,
.flash-bubble::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
    z-index: -1;
}

.flash-bubble::before {
    top: -12px;
    left: 20px;
    width: 28px;
    height: 18px;
}

.flash-bubble::after {
    top: -18px;
    left: 40px;
    width: 38px;
    height: 26px;
}

/* Hiding state — apply to the container */
.flash-bubbles.is-hiding .flash-bubble {
    animation: cloudDriftOut 0.5s ease-in forwards;
    pointer-events: none;
}

.flash-bubble-error {
    background: #fff5f5;
    color: #b71c1c;
}

.flash-bubble-success {
    background: #f0fff4;
    color: #1b5e20;
}

@keyframes cloudDriftIn {
    0% {
        opacity: 0;
        transform: translateX(80px) translateY(12px) scale(0.88);
    }
    55% {
        opacity: 1;
        transform: translateX(-5px) translateY(-2px) scale(1.03);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
    }
}

@keyframes cloudDriftOut {
    0% {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(50px) translateY(-30px) scale(0.85);
    }
}

/* ── Admin / legacy captcha ── */
.captcha-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    align-items: end;
}

.captcha-code {
    min-height: 44px;
    border: 1px dashed #b0c4de;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 2px;
    background: #f0f6ff;
    color: #1a73e8;
    user-select: none;
    font-family: 'Courier New', monospace;
}

/* ── Legacy message list (admin pages) ── */
.message-list {
    display: grid;
    gap: 16px;
}

.message-item {
    border: 1px solid #e3ecf5;
    border-radius: 12px;
    padding: 18px;
    background: #ffffff;
}

.message-item-unread {
    border-color: #ffcdd2;
    background: #fffafa;
}

.message-meta {
    color: #8aabca;
    font-size: 14px;
    margin-bottom: 8px;
}

.message-meta .badge {
    margin-left: 8px;
    vertical-align: middle;
}

.message-content {
    white-space: normal;
    word-break: break-word;
}

.message-content-admin {
    color: #c62828;
    font-weight: 700;
}

.reply {
    margin-top: 14px;
    padding: 14px 16px;
    border-left: 4px solid #1a73e8;
    background: #f0f7ff;
    border-radius: 0 8px 8px 0;
}

.reply strong {
    margin-right: 8px;
    color: #1a73e8;
}

.reply span,
.pending {
    color: #8aabca;
    font-size: 14px;
}

.reply p {
    margin: 8px 0 0;
}

.reply-form {
    margin-top: 14px;
}

.admin-note-info {
    margin-top: 14px;
    padding: 10px 14px;
    border-left: 3px solid #6b8fb5;
    background: #f7fbff;
    border-radius: 0 8px 8px 0;
    color: #6b8fb5;
    font-size: 13px;
}

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-head h1 {
    margin-bottom: 4px;
}

.admin-head .muted {
    margin: 0;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.workbench-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e3ecf5;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 4px 18px rgba(26,115,232,0.06);
}

.stat-card span {
    display: block;
    color: #6b8fb5;
    font-size: 13px;
    margin-bottom: 6px;
}

.stat-card strong {
    display: block;
    color: #1a2332;
    font-size: 28px;
    line-height: 1;
}

.workbench-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.section-title h2 {
    margin: 0;
}

.section-title .muted {
    font-size: 13px;
}

.action-row,
.user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inline-form {
    display: inline-flex;
    flex: 0 0 auto;
    margin: 0;
}

.inline-form .button,
.action-row .button,
.message-actions .button,
.user-actions .button {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 13px;
}

.message-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    gap: 8px;
    justify-content: start;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    margin-top: 10px;
    padding-bottom: 2px;
    white-space: nowrap;
}

.message-action-form {
    display: inline-flex;
    width: auto;
    flex: 0 0 auto;
    min-width: max-content;
    margin: 0;
}

.message-actions .button,
.message-actions > button {
    display: inline-flex;
    flex: 0 0 auto;
    min-width: max-content;
    white-space: nowrap;
}

.message-item .inline-form,
.message-item .message-action-form {
    margin-right: 0;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
    color: #6b8fb5;
    font-size: 13px;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #e3ecf5;
    border-radius: 8px;
    background: #ffffff;
    color: #1a73e8;
    font-weight: 700;
}

.pagination a.disabled {
    color: #b0c4de;
    pointer-events: none;
    background: #f8faff;
}

.user-list {
    display: grid;
    gap: 12px;
}

.user-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #e3ecf5;
}

.user-item:last-child {
    border-bottom: 0;
}

.user-main {
    min-width: 0;
}

.user-main strong {
    display: block;
    color: #1a2332;
    overflow-wrap: anywhere;
}

.user-status {
    justify-self: end;
}

.user-actions {
    grid-column: 1 / -1;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-ok {
    background: #f0fff4;
    color: #276749;
}

.badge-danger {
    background: #fff5f5;
    color: #c62828;
}

.badge-admin {
    background: #e8f0fe;
    color: #1a73e8;
}

.check-list {
    padding-left: 18px;
}

.check-list .ok {
    color: #276749;
}

.check-list .bad {
    color: #c62828;
}

.check-list code {
    background: #f0f4ff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
}

/* ===================================================
   ✨ NOTEPAD REDESIGN — 便签主题
   =================================================== */

/* ── Main wrapper ── */
.note-app {
    display: flex;
    gap: 48px;
    align-items: flex-start;
    padding-top: 16px;
    position: relative;
    max-width: 100%;
}

/* ── Left: Notepad Scene ── */
.note-scene {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.note-stack {
    position: relative;
    width: 100%;
    max-width: 420px;
}

/* ── Individual notes ── */
.note {
    width: 100%;
    border-radius: 3px;
    position: relative;
}

.note-back-2 {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 100%;
    min-height: 420px;
    background: linear-gradient(135deg, #d0ddf0, #dce6f5);
    transform: rotate(2deg);
    z-index: 0;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(26,115,232,0.06);
}

.note-back-1 {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 100%;
    min-height: 420px;
    background: linear-gradient(135deg, #e3ecf8, #e8f0fe);
    transform: rotate(-1.2deg);
    z-index: 1;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(26,115,232,0.08);
}

/* ── Extra thickness layers (generated by PHP based on history count) ── */
.note-thickness {
    position: absolute;
    width: 100%;
    min-height: 420px;
    background: linear-gradient(135deg, #c8d8ea, #d0ddf0);
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(26,115,232,0.04);
    pointer-events: none;
}

/* ── Active note (the one being typed on) ── */
.note-active {
    background: #ffffff;
    min-height: 400px;
    z-index: 2;
    box-shadow:
        0 4px 20px rgba(26,115,232,0.12),
        0 1px 4px rgba(0,0,0,0.04);
    transform: rotate(-0.6deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease, min-height 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: noteBob 6s ease-in-out infinite;
}

.note-active:hover {
    transform: rotate(-0.2deg);
    box-shadow:
        0 8px 32px rgba(26,115,232,0.16),
        0 2px 8px rgba(0,0,0,0.06);
}

@keyframes noteBob {
    0%, 100% { transform: rotate(-0.6deg) translateY(0); }
    50%      { transform: rotate(-0.3deg) translateY(-3px); }
}

/* ── Perforated top edge ── */
.note-active::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 0;
    right: 0;
    height: 14px;
    background: radial-gradient(circle at 12px 7px, #f0f6ff 3.5px, transparent 4px);
    background-size: 24px 14px;
    z-index: 5;
    pointer-events: none;
}

/* ── Note header (blue strip) ── */
.note-header {
    background: linear-gradient(135deg, #1a73e8 0%, #4a90d9 100%);
    padding: 14px 20px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.note-header-dots {
    display: flex;
    gap: 5px;
}

.note-header-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.55);
}

.note-header-label {
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ── Note mode toggle (mobile only) ── */
.note-mode-btn {
    display: none;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    line-height: 1;
    padding: 3px 8px;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: auto;
}
.note-mode-btn:hover {
    background: rgba(255,255,255,0.35);
}
.note-mode-btn:active {
    background: rgba(255,255,255,0.15);
}

/* ── Note body: lined paper ── */
.note-body {
    padding: 20px 24px 24px;
    min-height: 320px;
    position: relative;
    background:
        repeating-linear-gradient(
            transparent,
            transparent 31px,
            #e8f0fe 31px,
            #e8f0fe 32px
        ),
        #ffffff;
    line-height: 32px;
}

/* Red margin line */
.note-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    bottom: 0;
    width: 1.5px;
    background: #ffcdd2;
    opacity: 0.5;
    z-index: 1;
}

/* ── Content text on the note ── */
.note-content {
    position: relative;
    z-index: 2;
    padding-left: 28px;
    font-size: 16px;
    color: #1a2332;
    min-height: 280px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-y: auto;
    max-height: 320px;
}

.note-content .placeholder {
    color: #b0c4de;
    font-style: italic;
    font-size: 15px;
}

/* ── Tear-off note (clone for animation) ── */
.note-torn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 3;
    pointer-events: none;
}

/* ── Mobile composer (inside note body, hidden on desktop) ── */
.mobile-composer {
    display: none;
    position: relative;
    z-index: 5;
    padding: 0;
    animation: composerSlideIn 0.35s ease;
}

@keyframes composerSlideIn {
    0%   { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

.mobile-input-wrap {
    position: relative;
    margin-bottom: 12px;
}

.mobile-textarea {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 12px 14px 28px;
    font-size: 15px;
    line-height: 1.7;
    resize: none;
    font-family: inherit;
    background: none;
    color: #1a2332;
    transition: none;
    box-shadow: none;
    outline: none;
    min-height: 140px;
}

.mobile-textarea:focus {
    outline: none;
    box-shadow: none;
}

.mobile-charcount {
    position: absolute;
    bottom: 6px;
    right: 12px;
    font-size: 11px;
    color: #b0c4de;
    font-variant-numeric: tabular-nums;
}

.mobile-captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.mobile-captcha-left {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0f6ff;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1.5px dashed #b0c4de;
    flex-shrink: 0;
}

.mobile-captcha-left .captcha-label {
    font-size: 14px;
    color: #6b8fb5;
    font-weight: 600;
}

.mobile-captcha-left .captcha-code-text {
    font-size: 20px;
    letter-spacing: 3px;
}

.mobile-captcha-input {
    flex: 1;
    min-width: 0;
    border: 2px solid #e3ecf5;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    background: #f8faff;
    font-family: inherit;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.mobile-captcha-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}

.mobile-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1a73e8 0%, #1565C0 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.3s, opacity 0.3s;
    box-shadow: 0 4px 14px rgba(26,115,232,0.3);
}
.mobile-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,115,232,0.4);
}
.mobile-submit:active {
    transform: translateY(0);
}
.mobile-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.mobile-submit span {
    font-size: 20px;
}

/* ── Browsing mode (hide composer, show content with red margin line) ── */
.note-active.is-browsing .note-content {
    display: block;
    padding-left: 28px;
}
.note-active.is-browsing .mobile-composer {
    display: none !important;
}
.note-footer-corner {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, transparent 50%, #e3ecf5 50%);
    z-index: 3;
}

/* ── Page Navigation (below the notepad, outside the note) ── */
.note-page-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid #e3ecf5;
    border-radius: 10px;
    padding: 4px 12px;
    box-shadow: 0 2px 8px rgba(26,115,232,0.10);
    margin: 16px auto 0;
    width: fit-content;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    user-select: none;
}

.note-page-nav.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.note-page-nav:hover {
    box-shadow: 0 4px 14px rgba(26,115,232,0.16);
}

.page-indicator {
    font-size: 12px;
    color: #4a6fa5;
    font-weight: 600;
    padding: 0 5px;
    min-width: 34px;
    text-align: center;
    user-select: none;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #6b8fb5;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 0;
    transition: background 0.2s, color 0.2s;
}

.page-btn:hover {
    background: #e8f0fe;
    color: #1a73e8;
}

.page-btn:active {
    background: #d0ddf0;
}

.page-btn:disabled {
    opacity: 0.25;
    cursor: default;
    background: transparent !important;
    color: #b0c4de !important;
}

/* ── History message displayed inside the note (browsing mode) ── */
.page-time {
    font-size: 12px;
    color: #8aabca;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #e3ecf5;
    line-height: 1.4;
}

.note-reply {
    margin-top: 14px;
    padding: 10px 14px;
    background: #f0f7ff;
    border-left: 3px solid #1a73e8;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #2c5282;
    line-height: 1.5;
}

.note-reply strong {
    color: #1a73e8;
}

.note-reply-time {
    font-size: 12px;
    color: #8aabca;
    margin-left: 4px;
}

.note-reply p {
    margin: 6px 0 0;
}

.note-pending {
    margin-top: 12px;
    font-size: 12px;
    color: #b0c4de;
    font-style: italic;
    line-height: 1.4;
}

.note-admin-public {
    margin-top: 12px;
    padding: 8px 12px;
    border-left: 3px solid #6b8fb5;
    background: rgba(240, 247, 255, 0.76);
    border-radius: 0 8px 8px 0;
    color: #6b8fb5;
    font-size: 12px;
    line-height: 1.4;
}

.note-admin-content {
    color: #c62828;
    font-weight: 700;
}

/* ── Tear-off animation ── */
.note-active.tearing {
    animation: tearNote 0.9s cubic-bezier(0.55, 0, 0.55, 0.4) forwards;
    pointer-events: none;
}

@keyframes tearNote {
    0%   { transform: rotate(-0.8deg) translateY(0); opacity: 1; }
    10%  { transform: rotate(-2deg) translateX(-4px) translateY(-2px); }
    25%  { transform: rotate(-4deg) translateX(-10px) translateY(-8px) skewX(-0.5deg); }
    45%  { transform: rotate(-6deg) translateX(-8px) translateY(-22px) scale(0.95); opacity: 0.9; }
    65%  { transform: rotate(-8deg) translateX(2px) translateY(-40px) scale(0.85); opacity: 0.6; }
    85%  { transform: rotate(-10deg) translateX(14px) translateY(-60px) scale(0.7); opacity: 0.3; }
    100% { transform: rotate(-12deg) translateX(28px) translateY(-80px) scale(0.5); opacity: 0; }
}

/* ── Paper Airplane ── */
.plane-container {
    position: absolute;
    width: 60px;
    height: 50px;
    z-index: 50;
    display: none;
    pointer-events: none;
}

.plane-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 3px 6px rgba(26,115,232,0.25));
    overflow: visible;
}

/* Launch / unfold from the note */
.plane-container.launching {
    display: block;
    animation: planeUnfold 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes planeUnfold {
    0% {
        transform: translate(0, 50px) scale(0.05) rotate(45deg);
        opacity: 0;
    }
    40% {
        opacity: 0.6;
    }
    70% {
        transform: translate(-20px, -10px) scale(0.7) rotate(-3deg);
        opacity: 0.9;
    }
    100% {
        transform: translate(-10px, 0) scale(1) rotate(-12deg);
        opacity: 1;
    }
}

/* Flying away */
.plane-container.flying {
    animation: planeFly 2.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes planeFly {
    0%   {
        transform: translate(-10px, 0) scale(1) rotate(-12deg);
        opacity: 1;
    }
    20%  {
        transform: translate(80px, -50px) scale(0.9) rotate(-8deg);
        opacity: 1;
    }
    45%  {
        transform: translate(220px, -100px) scale(0.75) rotate(2deg);
        opacity: 0.85;
    }
    70%  {
        transform: translate(380px, -80px) scale(0.5) rotate(8deg);
        opacity: 0.6;
    }
    100% {
        transform: translate(550px, -20px) scale(0.2) rotate(18deg);
        opacity: 0;
    }
}

/* Launch ripple effect */
.plane-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(26,115,232,0.06);
    opacity: 0;
    pointer-events: none;
}

.plane-container.flying::after {
    animation: launchRipple 0.8s ease-out forwards;
}

@keyframes launchRipple {
    0%   { width: 10px; height: 10px; opacity: 0.5; }
    100% { width: 240px; height: 240px; opacity: 0; }
}

/* Sparkle trail */
.plane-container.flying::before {
    content: '✦';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 14px;
    color: #4a90d9;
    opacity: 0;
    animation: sparkleTrail 0.6s ease-out 0.4s 3;
}

@keyframes sparkleTrail {
    0%   { transform: translate(0, 0) scale(0); opacity: 0.8; }
    100% { transform: translate(30px, -20px) scale(1.2); opacity: 0; }
}

/* ── Right: Editor Section ── */
.editor-section {
    width: 400px;
    flex-shrink: 0;
    position: sticky;
    top: 96px;
}

.editor-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    box-shadow:
        0 8px 32px rgba(26,115,232,0.10),
        0 2px 8px rgba(0,0,0,0.02);
    border: 1px solid #e3ecf5;
    position: relative;
    overflow: hidden;
}

/* Subtle card decoration */
.editor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1a73e8, #4a90d9, #7ab3e8);
    border-radius: 20px 20px 0 0;
}

.editor-header {
    margin-bottom: 24px;
}

.editor-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
    color: #1a2332;
    font-weight: 700;
}

.editor-hint {
    color: #8aabca;
    font-size: 14px;
    margin: 0;
}

.editor-form {
    display: grid;
    gap: 18px;
    position: relative;
}

.input-area {
    position: relative;
}

.input-area textarea {
    width: 100%;
    border: 2px solid #e3ecf5;
    border-radius: 14px;
    padding: 16px 18px 32px;
    font-size: 15px;
    line-height: 1.7;
    resize: vertical;
    background: #f8faff;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    font-family: inherit;
    min-height: 140px;
}

.input-area textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 4px rgba(26,115,232,0.1);
    background: #ffffff;
}

.char-count {
    position: absolute;
    bottom: 10px;
    right: 14px;
    font-size: 12px;
    color: #b0c4de;
    font-variant-numeric: tabular-nums;
}

/* ── Captcha ── */
.captcha-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.captcha-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0f6ff;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1.5px dashed #b0c4de;
    flex-shrink: 0;
}

.captcha-label {
    font-size: 12px;
    color: #6b8fb5;
    font-weight: 600;
}

.captcha-code-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 4px;
    color: #1a73e8;
    user-select: none;
    font-family: 'Courier New', 'Consolas', monospace;
}

.captcha-input {
    flex: 1;
    min-width: 100px;
    border: 2px solid #e3ecf5;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 15px;
    background: #f8faff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.captcha-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 4px rgba(26,115,232,0.1);
}

/* ── Submit button ── */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #1a73e8 0%, #1565C0 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.3s, opacity 0.3s;
    box-shadow: 0 4px 16px rgba(26,115,232,0.3);
    position: relative;
    overflow: hidden;
}

.btn-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.1) 100%);
    pointer-events: none;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(26,115,232,0.4);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-icon {
    font-size: 22px;
    position: relative;
    z-index: 1;
}

.btn-text {
    position: relative;
    z-index: 1;
}

/* ── Legacy history list (no longer used on main page, kept for admin compat) ── */
.history-section {
    margin-top: 44px;
    padding-right: 8px;
}

.history-title {
    font-size: 15px;
    color: #4a6fa5;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e3ecf5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #e3ecf5, transparent);
}

.empty-history {
    text-align: center;
    color: #b0c4de;
    font-size: 14px;
    padding: 24px;
    background: rgba(255,255,255,0.5);
    border-radius: 12px;
    border: 1px dashed #d0ddf0;
}

.history-list {
    display: grid;
    gap: 12px;
    max-height: 440px;
    overflow-y: auto;
    padding-right: 4px;
}

.history-list::-webkit-scrollbar {
    width: 4px;
}
.history-list::-webkit-scrollbar-track {
    background: transparent;
}
.history-list::-webkit-scrollbar-thumb {
    background: #d0ddf0;
    border-radius: 4px;
}
.history-list::-webkit-scrollbar-thumb:hover {
    background: #b0c4de;
}

.history-item {
    background: #ffffff;
    border: 1px solid #e3ecf5;
    border-radius: 12px;
    padding: 16px 18px;
    transition: box-shadow 0.25s, transform 0.25s;
    position: relative;
}

.history-item:hover {
    box-shadow: 0 4px 16px rgba(26,115,232,0.08);
    transform: translateY(-1px);
}

.history-item:active {
    transform: translateY(0);
}

.history-meta {
    font-size: 12px;
    color: #8aabca;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-meta .history-id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8f0fe;
    color: #1a73e8;
    font-weight: 700;
    font-size: 11px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

.history-text {
    font-size: 14px;
    color: #1a2332;
    line-height: 1.6;
    word-break: break-word;
}

.history-reply {
    margin-top: 10px;
    padding: 10px 14px;
    background: #f0f7ff;
    border-left: 3px solid #1a73e8;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #2c5282;
}

.history-reply strong {
    color: #1a73e8;
}

.history-pending {
    margin-top: 8px;
    font-size: 12px;
    color: #b0c4de;
    font-style: italic;
}

/* ── Decorative floating elements ── */
.deco-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.deco-circle-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(26,115,232,0.04) 0%, transparent 70%);
    top: -60px;
    right: -80px;
}

.deco-circle-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(74,144,217,0.05) 0%, transparent 70%);
    bottom: 40px;
    left: -40px;
}

/* Floating background dots */
.deco-dots {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}
.deco-dots::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, #d0ddf0 1.5px, transparent 1.5px);
    background-size: 16px 16px;
    opacity: 0.5;
}

/* ── Responsive ── */

/* ── Tablet & below: switch to column ── */
@media (max-width: 1100px) {
    .workbench-stats {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .workbench-grid {
        grid-template-columns: 1fr;
    }

    .note-app {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    .note-scene {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .note-stack {
        width: 100%;
        max-width: 460px;
    }

    .editor-section {
        width: 100%;
        max-width: 540px;
        position: static;
    }

    /* Tablet: reduce rotation so it's less jarring */
    .note-back-2 {
        transform: rotate(1.2deg);
    }
    .note-back-1 {
        transform: rotate(-0.6deg);
    }
    .note-active {
        transform: rotate(-0.3deg);
    }
    .note-thickness {
        transform: rotate(0.5deg) !important;
    }
    @keyframes noteBob {
        0%, 100% { transform: rotate(-0.3deg) translateY(0); }
        50%      { transform: rotate(-0.1deg) translateY(-2px); }
    }
    .note-active:hover {
        transform: rotate(-0.1deg);
    }

    @keyframes tearNote {
        0%   { transform: rotate(-0.3deg) translateY(0); opacity: 1; }
        10%  { transform: rotate(-1.2deg) translateX(-3px) translateY(-2px); }
        25%  { transform: rotate(-2.5deg) translateX(-6px) translateY(-5px); }
        45%  { transform: rotate(-4deg) translateX(-5px) translateY(-14px) scale(0.95); opacity: 0.9; }
        65%  { transform: rotate(-6deg) translateX(2px) translateY(-28px) scale(0.85); opacity: 0.6; }
        85%  { transform: rotate(-7deg) translateX(8px) translateY(-42px) scale(0.7); opacity: 0.3; }
        100% { transform: rotate(-8deg) translateX(16px) translateY(-60px) scale(0.5); opacity: 0; }
    }

    @keyframes planeFly {
        0%   { transform: translate(-10px, 0) scale(1) rotate(-12deg); opacity: 1; }
        25%  { transform: translate(80px, -40px) scale(0.85) rotate(-5deg); opacity: 1; }
        50%  { transform: translate(180px, -70px) scale(0.65) rotate(3deg); opacity: 0.8; }
        75%  { transform: translate(280px, -50px) scale(0.4) rotate(10deg); opacity: 0.5; }
        100% { transform: translate(380px, -10px) scale(0.15) rotate(18deg); opacity: 0; }
    }

}

/* ── Small tablet & large phone: flatten stack, fluid heights ── */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .admin-head,
    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .workbench-stats {
        grid-template-columns: 1fr 1fr;
    }

    .note-app {
        gap: 12px;
        padding-top: 4px;
    }

    .note-stack {
        width: 100%;
        max-width: 100%;
        /* Let the note fill viewport height nicely */
        min-height: calc(100vh - 120px);
        display: flex;
        flex-direction: column;
    }

    /* Flatten all rotations */
    .note-back-2,
    .note-back-1,
    .note-active,
    .note-thickness {
        transform: none !important;
    }

    /* Background layers: match active note height, just decorative offset */
    .note-back-2 {
        top: 5px;
        left: 5px;
        bottom: 0;
        height: auto !important;
        min-height: 0 !important;
    }
    .note-back-1 {
        top: 2px;
        left: 2px;
        bottom: 0;
        height: auto !important;
        min-height: 0 !important;
    }
    .note-thickness {
        top: 6px !important;
        left: 6px !important;
        bottom: 0 !important;
        height: auto !important;
        min-height: 0 !important;
    }
    .note-thickness ~ .note-thickness {
        top: 8px !important;
        left: 8px !important;
    }

    .note-active:hover {
        transform: none !important;
        box-shadow: 0 8px 32px rgba(26,115,232,0.16), 0 2px 8px rgba(0,0,0,0.06);
    }
    .note-active {
        animation: none !important;
        /* Fill remaining space inside .note-stack */
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    /* All note layers (absolute) fill the same space */
    .note-back-1,
    .note-back-2,
    .note-thickness,
    .note-torn {
        height: auto !important;
        min-height: 0 !important;
    }

    .note-body {
        padding: 16px 16px 20px;
        min-height: 0;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .flash-bubble {
        font-size: 13px;
        padding: 14px 18px 16px 18px;
    }

    .flash-bubble::before {
        top: -10px;
        left: 18px;
        width: 22px;
        height: 14px;
    }

    .flash-bubble::after {
        top: -14px;
        left: 34px;
        width: 30px;
        height: 20px;
    }

    .flash-bubbles-floating {
        top: 60px;
        right: 12px;
        width: calc(100vw - 24px);
    }

    .note-body::before {
        left: 32px;
    }

    .note-content {
        position: relative;
        z-index: 2;
        padding-left: 24px;
        font-size: 15px;
        line-height: 32px;
        min-height: 0;
        max-height: none;
        flex: 1;
        overflow-y: auto;
    }

    /* When browsing — content fills the body */
    .note-active.is-browsing .note-content {
        flex: 1;
        min-height: 0;
    }

    /* Mobile composer — fill remaining space */
    .mobile-composer {
        flex: 1;
        display: none;
        flex-direction: column;
        justify-content: space-between;
        min-height: 0;
    }

    .mobile-input-wrap {
        position: relative;
        flex: 1;
        min-height: 60px;
        margin-bottom: 8px;
    }

    .mobile-textarea {
        padding: 6px 8px 22px;
        font-size: 15px;
        line-height: 1.6;
        resize: none;
        font-family: inherit;
        background: none;
        border: none;
        outline: none;
        box-shadow: none;
        width: 100%;
        height: 100%;
        min-height: 60px;
    }

    .mobile-textarea:focus {
        outline: none;
        box-shadow: none;
    }

    .mobile-charcount {
        position: absolute;
        bottom: 3px;
        right: 8px;
        font-size: 11px;
        color: #b0c4de;
    }

    .mobile-captcha-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 6px 0 10px;
        flex-shrink: 0;
    }

    .mobile-captcha-left {
        display: flex;
        align-items: center;
        gap: 5px;
        background: #f0f6ff;
        padding: 5px 10px;
        border-radius: 8px;
        border: 1.5px dashed #b0c4de;
        flex-shrink: 0;
    }

    .mobile-captcha-left .captcha-label {
        font-size: 13px;
        color: #6b8fb5;
        font-weight: 600;
    }

    .mobile-captcha-left .captcha-code-text {
        font-size: 18px;
        letter-spacing: 2px;
    }

    .mobile-captcha-input {
        flex: 1;
        min-width: 0;
        border: 2px solid #e3ecf5;
        border-radius: 8px;
        padding: 8px 10px;
        font-size: 14px;
        background: #f8faff;
        font-family: inherit;
    }

    .mobile-captcha-input:focus {
        outline: none;
        border-color: #1a73e8;
        box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
    }

    .mobile-submit {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        padding: 12px 16px;
        background: linear-gradient(135deg, #1a73e8 0%, #1565C0 100%);
        color: #fff;
        border: none;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
        box-shadow: 0 4px 14px rgba(26,115,232,0.3);
        flex-shrink: 0;
    }
    .mobile-submit:active {
        transform: scale(0.98);
    }
    .mobile-submit:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
    .mobile-submit span {
        font-size: 18px;
    }

    /* ── Hide desktop editor ── */
    .editor-section { display: none; }
    .note-mode-btn { display: inline-flex; }

    /* Footer corner — smaller */
    .note-footer-corner {
        width: 18px;
        height: 18px;
    }

    /* Page nav adjustments (now outside the note) */
    .note-page-nav {
        padding: 4px 10px;
        border-radius: 8px;
        margin-top: 12px;
    }
    .page-btn {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }
    .page-indicator {
        font-size: 11px;
        min-width: 30px;
    }

    /* History text inside note */
    .note-reply {
        padding: 8px 12px;
        font-size: 13px;
    }
    .page-time {
        font-size: 12px;
    }
    .note-pending {
        font-size: 12px;
    }

    /* Tear animation without rotation */
    @keyframes tearNote {
        0%   { transform: translateY(0) scale(1); opacity: 1; }
        20%  { transform: translateX(-4px) translateY(-6px); }
        40%  { transform: translateX(-3px) translateY(-16px) scale(0.96); opacity: 0.95; }
        60%  { transform: translateX(4px) translateY(-32px) scale(0.88); opacity: 0.7; }
        80%  { transform: translateX(12px) translateY(-50px) scale(0.72); opacity: 0.4; }
        100% { transform: translateX(22px) translateY(-70px) scale(0.5); opacity: 0; }
    }

    @keyframes planeFly {
        0%   { transform: translate(-10px, 0) scale(0.9) rotate(-12deg); opacity: 1; }
        20%  { transform: translate(40px, -25px) scale(0.75) rotate(-5deg); opacity: 1; }
        45%  { transform: translate(100px, -45px) scale(0.55) rotate(3deg); opacity: 0.8; }
        70%  { transform: translate(160px, -35px) scale(0.35) rotate(10deg); opacity: 0.5; }
        100% { transform: translate(220px, -5px) scale(0.12) rotate(18deg); opacity: 0; }
    }
}

/* ── Small phones ── */
@media (max-width: 480px) {
    .topbar {
        padding: 0 10px;
        min-height: 48px;
        gap: 6px;
    }
    .brand {
        font-size: 16px;
    }
    .brand::before {
        content: '';
    }
    .nav {
        gap: 6px;
        font-size: 12px;
    }
    .nav-user {
        display: none;
    }

    .container {
        padding: 10px;
    }

    .panel {
        padding: 20px;
    }

    .workbench-stats {
        grid-template-columns: 1fr;
    }

    .user-item {
        grid-template-columns: 1fr;
    }

    .user-status {
        justify-self: start;
    }

    .note-app {
        gap: 8px;
        padding-top: 2px;
    }

    .note-stack {
        min-height: calc(100vh - 90px);
    }

    .note-header {
        padding: 9px 12px 7px;
    }
    .note-header-label {
        font-size: 10px;
        letter-spacing: 1px;
    }
    .note-mode-btn {
        font-size: 14px;
        padding: 2px 6px;
    }

    .note-body {
        padding: 12px 12px 16px;
    }
    .note-body::before {
        left: 24px;
    }
    .note-content {
        padding-left: 20px;
        font-size: 14px;
        line-height: 30px;
    }

    .note-footer-corner {
        width: 14px;
        height: 14px;
    }

    /* Mobile composer */
    .mobile-textarea {
        padding: 4px 6px 20px;
        font-size: 14px;
        min-height: 50px;
    }
    .mobile-charcount {
        font-size: 10px;
        bottom: 2px;
        right: 6px;
    }
    .mobile-captcha-row {
        gap: 6px;
        margin: 4px 0 8px;
    }
    .mobile-captcha-left {
        padding: 4px 8px;
    }
    .mobile-captcha-left .captcha-code-text {
        font-size: 16px;
        letter-spacing: 1.5px;
    }
    .mobile-captcha-input {
        padding: 7px 8px;
        font-size: 13px;
    }
    .mobile-submit {
        padding: 10px 14px;
        font-size: 14px;
        border-radius: 8px;
    }
    .mobile-submit span {
        font-size: 16px;
    }

    /* Page nav */
    .note-page-nav {
        padding: 3px 8px;
        border-radius: 6px;
        margin-top: 10px;
    }
    .page-btn {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
    .page-indicator {
        font-size: 10px;
        min-width: 26px;
        padding: 0 3px;
    }

    .note-reply {
        padding: 6px 10px;
        font-size: 12px;
    }
    .page-time {
        font-size: 11px;
    }

    @keyframes planeFly {
        0%   { transform: translate(-5px, 0) scale(0.7) rotate(-12deg); opacity: 1; }
        20%  { transform: translate(30px, -20px) scale(0.6) rotate(-5deg); opacity: 0.9; }
        45%  { transform: translate(70px, -35px) scale(0.45) rotate(3deg); opacity: 0.7; }
        70%  { transform: translate(120px, -25px) scale(0.25) rotate(10deg); opacity: 0.4; }
        100% { transform: translate(160px, -5px) scale(0.08) rotate(18deg); opacity: 0; }
    }
}

/* ── Tiny screens (iPhone SE / old small phones) ── */
@media (max-width: 380px) {
    .container {
        padding: 6px;
    }

    .note-stack {
        min-height: calc(100vh - 76px);
    }

    .note-body {
        padding: 10px 8px 12px;
    }
    .note-body::before {
        left: 20px;
    }
    .note-content {
        padding-left: 16px;
        font-size: 13px;
        line-height: 28px;
    }

    .mobile-textarea {
        font-size: 13px;
        min-height: 40px;
    }
    .mobile-charcount {
        font-size: 9px;
    }
    .mobile-captcha-left .captcha-code-text {
        font-size: 14px;
    }
    .mobile-submit {
        font-size: 13px;
        padding: 9px 12px;
    }
    .mobile-submit span {
        font-size: 14px;
    }
}
.message-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    max-width: 100% !important;
    margin-top: 10px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
}

.message-actions form,
.message-actions .inline-form {
    display: inline-flex !important;
    width: auto !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
}

.message-actions .button,
.message-actions button {
    display: inline-flex !important;
    width: auto !important;
    min-width: max-content !important;
    white-space: nowrap !important;
}