:root {
    --bg: #f7f9fb;
    --card: #ffffff;
    --line: #dce6ee;
    --text: #163042;
    --muted: #5f7282;
    --primary: #2f8f79;
    --primary-dark: #24715f;
    --blue: #4f7ee8;
    --danger: #cc5b5b;
    --soft: #eef5f8;
    --shadow: 0 8px 24px rgba(18, 48, 66, .06);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1100px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
}
.brand-wrap { display: flex; flex-direction: column; gap: 4px; }
.brand {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}
.tagline { color: var(--muted); font-size: 14px; }
.nav-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.main-space { padding: 28px 0 50px; }
.hero-grid, .two-col {
    display: grid;
    grid-template-columns: 1.6fr .9fr;
    gap: 24px;
}
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 22px;
}
.card h1, .card h2, .card h3 { margin-top: 0; }
.muted { color: var(--muted); }
.label { display: block; font-weight: 700; margin-bottom: 8px; }
.input, .textarea, .select {
    width: 100%;
    border: 1px solid #cfdde7;
    border-radius: 12px;
    background: #fff;
    padding: 12px 14px;
    font-size: 15px;
    color: var(--text);
}
.textarea {
    min-height: 300px;
    resize: vertical;
    font-family: Consolas, Monaco, monospace;
    line-height: 1.5;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    box-shadow: none;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn-secondary { background: #eff6ff; color: var(--blue); border: 1px solid #d7e5ff; }
.btn-danger { background: #fff1f1; color: var(--danger); border: 1px solid #f2caca; }
.btn-small { padding: 9px 12px; font-size: 14px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.help-list { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.7; }
.access-box {
    background: var(--soft);
    border: 1px dashed #bdd1dc;
    border-radius: 14px;
    padding: 14px;
}
.alert {
    padding: 13px 15px;
    border-radius: 12px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}
.alert-success { background: #eef9f4; border-color: #c9ead8; color: #1f6c54; }
.alert-error { background: #fff2f2; border-color: #f3d0d0; color: #9b4040; }
.note-list { display: grid; gap: 12px; }
.note-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.note-meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 10px; }
.note-title { font-weight: 700; margin-bottom: 5px; }
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef6ee;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
}
.code-wrap {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfdff;
    overflow: auto;
}
pre {
    margin: 0;
    padding: 18px;
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}
.copy-top { position: absolute; top: 12px; right: 12px; }
.share-box {
    display: grid;
    gap: 10px;
    background: #f7fbf9;
    border: 1px solid #d6ebe1;
    padding: 16px;
    border-radius: 14px;
}
.kv {
    display: grid;
    gap: 6px;
}
.kv label { font-size: 13px; color: var(--muted); }
.inline-inputs { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.site-footer {
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 28px 0;
    color: var(--muted);
}
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.auth-box { max-width: 500px; margin: 0 auto; }
.center { text-align: center; }
.small { font-size: 13px; }
@media (max-width: 860px) {
    .hero-grid, .two-col, .footer-grid, .form-grid { grid-template-columns: 1fr; }
    .note-item { grid-template-columns: 1fr; }
    .nav-wrap { align-items: flex-start; flex-direction: column; }
}

.hero-banner { display:grid; gap:16px; margin-bottom:24px; }
.hero-points { display:flex; flex-wrap:wrap; gap:10px; }
.hero-points span { background:#f0f7f4; color:var(--primary-dark); border:1px solid #d8ebe3; border-radius:999px; padding:8px 12px; font-size:13px; font-weight:700; }
.sidebar-stack { display:grid; gap:24px; }
.panel-note { margin-bottom:16px; background:var(--soft); border:1px solid #d7e6ee; border-radius:14px; padding:14px; }
.mini-help { min-height:46px; background:#fafcff; border:1px dashed #d7e3eb; border-radius:12px; padding:12px 14px; color:var(--muted); font-size:14px; line-height:1.5; }
.search-bar { display:grid; grid-template-columns:1fr auto auto; gap:10px; margin-bottom:16px; }
@media (max-width: 860px) { .search-bar { grid-template-columns:1fr; } }


.note-snippet {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}
.note-actions {
    justify-content: flex-end;
}
.note-item .btn {
    min-width: 72px;
}
@media (max-width: 860px) {
    .note-actions {
        justify-content: flex-start;
    }
}


.side-info-card,
.seo-card {
    min-height: 0;
}
.copyright-bar {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}
.hero-banner h1 {
    margin-bottom: 10px;
}
.code-wrap pre[class*="language-"] {
    margin: 0;
    background: transparent;
}
pre code[class*="language-"] {
    white-space: pre-wrap;
    word-break: break-word;
}

.share-warning {
    margin-bottom: 16px;
    background: #fff8e8;
    border: 1px solid #f0dfb2;
    border-radius: 14px;
    padding: 14px;
}


.code-editor-shell {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfdff;
    overflow: hidden;
}
.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f5fafc;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}
.code-editor {
    position: relative;
    display: grid;
    grid-template-columns: 56px 1fr;
    min-height: 420px;
    background: #fbfdff;
}
.editor-gutter {
    margin: 0;
    padding: 16px 10px 16px 0;
    background: #f2f7fa;
    border-right: 1px solid #e1eaf0;
    color: #8ca0ae;
    text-align: right;
    overflow: hidden;
    user-select: none;
}
.editor-gutter span {
    display: block;
    height: 22.4px;
    line-height: 22.4px;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
}
.editor-code,
.editor-input {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    padding: 16px 18px;
    min-height: 420px;
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
    line-height: 1.6;
    tab-size: 4;
    white-space: pre;
    overflow: auto;
}
.editor-code {
    pointer-events: none;
    background: transparent;
}
.editor-code code {
    display: block;
    min-height: 100%;
    white-space: pre;
}
.editor-input {
    width: 100%;
    border: 0;
    resize: vertical;
    background: transparent;
    color: transparent;
    caret-color: #163042;
    outline: none;
}
.editor-input::selection {
    background: rgba(79, 126, 232, .20);
}
.editor-input::-webkit-scrollbar,
.editor-code::-webkit-scrollbar,
.editor-gutter::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.editor-input::-webkit-scrollbar-thumb,
.editor-code::-webkit-scrollbar-thumb,
.editor-gutter::-webkit-scrollbar-thumb {
    background: #cfdae3;
    border-radius: 999px;
}
.editor-input,
.editor-code,
.editor-gutter {
    scrollbar-color: #cfdae3 transparent;
}
.editor-note {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}
@media (max-width: 860px) {
    .code-editor {
        grid-template-columns: 46px 1fr;
        min-height: 340px;
    }
    .editor-code,
    .editor-input {
        min-height: 340px;
        padding: 14px 14px;
        font-size: 13px;
    }
    .editor-gutter {
        padding-top: 14px;
    }
}


.ace-editor-shell {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfdff;
    overflow: hidden;
}
.ace-editor-box {
    position: relative;
}
.ace-editor {
    width: 100%;
    min-height: 420px;
    border: 0;
}
.ace-input {
    position: absolute;
    left: -99999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.ace_editor {
    font-family: Consolas, Monaco, monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}
.ace_gutter {
    background: #f2f7fa !important;
    color: #8ca0ae !important;
}
.ace_print-margin {
    width: 0 !important;
}

.nav-wrap {
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.nav-links {
    display:flex;
    gap:12px;
}

.menu-toggle {
    display:none;
    font-size:20px;
    cursor:pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display:none;
        flex-direction:column;
        background:#fff;
        position:absolute;
        top:60px;
        right:10px;
        border:1px solid #ddd;
        padding:10px;
        border-radius:10px;
    }

    .nav-links.active {
        display:flex;
    }

    .menu-toggle {
        display:block;
    }
}
