
    *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
    body { font-family: 'Roboto', sans-serif; background: #f7f7f7; color: #111; min-height: 100vh; }

    .topbar {
      position: fixed; top: 0; left: 0; right: 0; height: 48px;
      background: #fff; border-bottom: 1px solid #e0e0e0;
      display: flex; align-items: center; padding: 0 16px; gap: 6px; z-index: 200;
    }
    .topbar-left { display: flex; align-items: center; gap: 4px; flex: 1; }
    .topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

    .btn-back { background: none; border: none; cursor: pointer; padding: 5px 7px; border-radius: 4px; display: flex; align-items: center; text-decoration: none; }
    .btn-back:hover { background: #f0f0f0; }
    .btn-back svg { width: 18px; height: 18px; stroke: #555; fill: none; stroke-width: 2; stroke-linecap: round; }

    .sep { width: 1px; height: 20px; background: #ddd; margin: 0 4px; flex-shrink: 0; }

    .format-select {
      font-family: 'Roboto', sans-serif; font-size: 13px; font-weight: 500;
      border: 1px solid #e0e0e0; border-radius: 4px; padding: 4px 24px 4px 8px;
      outline: none; background: #fff; color: #333; cursor: pointer; appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 6px center;
      height: 30px; flex-shrink: 0;
    }
    .format-select:hover { border-color: #bbb; }
    .format-select:focus { border-color: #1a73e8; }

    .fmt-btn {
      background: none; border: none; cursor: pointer; color: #333;
      font-size: 14px; padding: 5px 8px; border-radius: 4px;
      font-weight: 700; display: flex; align-items: center;
      font-family: 'Roboto', sans-serif; line-height: 1; flex-shrink: 0;
    }
    .fmt-btn:hover { background: #f0f0f0; }
    .fmt-btn.active { background: #e0e0e0; }
    .fmt-btn svg { width: 15px; height: 15px; stroke: #333; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

    .topbar-acct{position:relative;}
    .acct-btn{display:flex;align-items:center;gap:8px;padding:6px 12px 6px 8px;background:#f5f5f5;border:1px solid #e0e0e0;border-radius:6px;cursor:pointer;font-family:'Roboto',sans-serif;font-size:13px;font-weight:500;color:#333;transition:background .15s;}
    .acct-btn:hover{background:#ececec;}
    .acct-avatar{width:26px;height:26px;border-radius:50%;background:#e03131;color:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;flex-shrink:0;overflow:hidden;}
    .acct-avatar img{width:100%;height:100%;object-fit:cover;}
    .acct-name{max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
    .acct-dropdown{display:none;position:absolute;right:0;top:calc(100% + 6px);background:#fff;border:1px solid #e5e5e5;border-radius:8px;min-width:160px;box-shadow:0 8px 24px rgba(0,0,0,.12);z-index:900;padding:4px 0;}
    .acct-dropdown a,.acct-dropdown button{display:flex;align-items:center;gap:8px;width:100%;padding:10px 16px;font-size:13px;color:#333;text-decoration:none;background:none;border:none;font-family:'Roboto',sans-serif;cursor:pointer;text-align:left;transition:background .1s;}
    .acct-dropdown a:hover,.acct-dropdown button:hover{background:#f5f5f5;color:#e03131;}
    .acct-dropdown .acct-sep{height:1px;background:#f0f0f0;margin:4px 0;}
    .topbar-acct.open .acct-dropdown{display:block;}
    .unverified-notice{background:#fff3e0;border:1px solid #ffe0b2;border-radius:6px;padding:10px 14px;font-size:12px;color:#e65100;margin-bottom:8px;display:none;}
    .unverified-notice b{display:block;margin-bottom:4px;}

    .btn-submit {
      background: #1a73e8; color: #fff; border: none; border-radius: 4px;
      padding: 7px 18px; font-size: 13px; font-weight: 700;
      font-family: 'Roboto', sans-serif; cursor: pointer;
    }
    .btn-submit:hover { background: #1558c0; }
    .btn-submit:disabled { background: #93b8f0; cursor: not-allowed; }

    .btn-icon { background: none; border: none; cursor: pointer; padding: 5px; border-radius: 4px; display: flex; align-items: center; }
    .btn-icon:hover { background: #f0f0f0; }
    .btn-icon svg { width: 16px; height: 16px; stroke: #555; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

    .layout { display: flex; padding-top: 48px; min-height: 100vh; }
    .editor-wrap { flex: 1; padding: 48px 60px; max-width: calc(100% - 300px); transition: max-width 0.2s; }
    .editor-wrap.full { max-width: 100%; }

    #article-title {
      width: 100%; font-size: 28px; font-weight: 700;
      font-family: 'Roboto', sans-serif; border: none; outline: none;
      background: transparent; color: #ccc; margin-bottom: 20px;
      resize: none; line-height: 1.35; overflow: hidden;
    }
    #article-title:focus { color: #111; }
    #article-title::placeholder { color: #ccc; }

    #editor {
      width: 100%; min-height: 500px; font-size: 15px;
      font-family: 'Roboto', sans-serif; outline: none;
      background: transparent; color: #111; line-height: 1.75; word-break: break-word;
    }
    #editor:empty::before { content: attr(data-placeholder); color: #ccc; pointer-events: none; }
    #editor blockquote {
      border-left: none; margin: 28px 0; padding: 0 8px 0 54px; position: relative;
      font-family: 'Source Serif 4', Georgia, serif; font-style: italic;
      font-size: 23px; line-height: 1.35; color: #111;
    }
    #editor blockquote::before {
      content: '\201C'; position: absolute; left: -6px; top: -22px;
      font-family: Georgia, serif; font-style: normal; font-weight: 700;
      font-size: 68px; color: #111; line-height: 1;
    }
    #editor blockquote::after {
      content: '\201D'; display: block; text-align: right;
      font-family: Georgia, serif; font-style: normal; font-weight: 700;
      font-size: 68px; color: #111; line-height: 1; margin: -18px -4px -8px 0;
    }
    #editor h1 { font-size: 26px; font-weight: 700; line-height: 1.3; margin: 20px 0 8px; color: #111; }
    #editor h2 { font-size: 20px; font-weight: 700; line-height: 1.4; margin: 16px 0 6px; color: #111; }
    #editor ul { margin: 8px 0; padding-left: 28px; }
    #editor ul li { margin: 2px 0; }

    /* ── Embed card & modal ── */
    .embed-figure { display: block; margin: 16px 0; position: relative; user-select: none; }
    .embed-figure.selected .embed-card,
    .embed-figure.selected .embed-code-box { outline: 2px solid #1a73e8; border-radius: 8px; }
    .embed-figure .img-delete-btn { display: none; }
    .embed-figure.selected .img-delete-btn { display: flex; }

    .embed-card {
      display: block; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden;
      text-decoration: none; color: #111; background: #fff;
    }
    .embed-card img { width: 100%; max-height: 320px; object-fit: cover; display: block; }
    .embed-card-cover {
      width: 100%; padding-top: 52%; background-size: cover; background-position: center;
      background-color: #eee; background-repeat: no-repeat;
    }
    .embed-card .embed-body { padding: 10px 14px 12px; }
    .embed-card .embed-title { font-size: 15px; font-weight: 700; line-height: 1.35; margin-bottom: 4px; color: #111; }
    .embed-card .embed-desc { font-size: 13px; color: #666; line-height: 1.4; margin-bottom: 6px; }
    .embed-card .embed-source { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: .03em; }

    .embed-code-box {
      border: 1px dashed #ccc; border-radius: 6px; padding: 10px 12px;
      font-size: 12px; color: #888; background: #fafafa; font-family: monospace;
      max-height: 160px; overflow: auto; white-space: pre-wrap; word-break: break-all;
    }

    .embed-modal-overlay {
      display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35);
      z-index: 800; align-items: center; justify-content: center;
    }
    .embed-modal-overlay.show { display: flex; }
    .embed-modal {
      background: #fff; border-radius: 8px; width: 420px; max-width: 90vw;
      padding: 20px; box-shadow: 0 12px 32px rgba(0,0,0,.2);
    }
    .embed-modal h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: #111; }
    .embed-modal textarea {
      width: 100%; font-family: 'Roboto', sans-serif; font-size: 13px;
      border: 1px solid #ddd; border-radius: 4px; padding: 8px 10px;
      resize: vertical; outline: none; min-height: 90px;
    }
    .embed-modal textarea:focus { border-color: #1a73e8; }
    .embed-modal .embed-hint { font-size: 11px; color: #999; margin-top: 6px; line-height: 1.5; }
    .embed-modal .embed-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
    .embed-modal .embed-actions button {
      font-family: 'Roboto', sans-serif; font-size: 13px; font-weight: 700;
      border-radius: 4px; padding: 7px 16px; cursor: pointer;
    }
    .embed-modal .btn-cancel { background: #f0f0f0; border: none; color: #333; }
    .embed-modal .btn-confirm { background: #1a73e8; border: none; color: #fff; }
    .embed-modal .btn-confirm:disabled { background: #93b8f0; cursor: not-allowed; }
    .embed-status { font-size: 12px; margin-top: 8px; }
    .embed-status.error { color: #c62828; }
    .embed-status.loading { color: #888; }

    /* ── Baca Juga ── */
    .bj-modal { width: 480px; max-height: 78vh; display: flex; flex-direction: column; }
    .bj-modal input[type="text"] {
      width: 100%; font-family: 'Roboto', sans-serif; font-size: 13px;
      border: 1px solid #ddd; border-radius: 4px; padding: 8px 10px; outline: none; margin-bottom: 10px;
    }
    .bj-modal input[type="text"]:focus { border-color: #1a73e8; }
    .bj-list { overflow-y: auto; flex: 1; min-height: 120px; border: 1px solid #eee; border-radius: 6px; }
    .bj-item {
      display: flex; gap: 10px; padding: 9px 10px; cursor: pointer; border-bottom: 1px solid #f0f0f0;
      align-items: center;
    }
    .bj-item:last-child { border-bottom: none; }
    .bj-item:hover { background: #f5f8ff; }
    .bj-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: #eee; }
    .bj-item .bj-item-title { font-size: 13px; font-weight: 500; color: #111; line-height: 1.35; }
    .bj-item .bj-item-sub { font-size: 11px; color: #999; margin-top: 2px; }
    .bj-empty { padding: 20px; text-align: center; font-size: 12px; color: #999; }

    .bacajuga-card {
      display: flex; align-items: center; gap: 12px; border: 1px solid #e0e0e0;
      border-radius: 8px; padding: 12px 14px; text-decoration: none; background: #fff;
    }
    .bacajuga-card .bj-body { flex: 1; min-width: 0; }
    .bacajuga-card .bj-title { font-size: 14px; font-weight: 700; color: #111; line-height: 1.4; margin-bottom: 6px; }
    .bacajuga-card .bj-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #666; }
    .bacajuga-card .bj-channel-badge {
      width: 16px; height: 16px; border-radius: 50%; background: #1a73e8; color: #fff;
      display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; flex-shrink: 0;
    }
    .bacajuga-card .bj-dot { color: #ccc; }
    .bacajuga-card .bj-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: #eee; }

    .img-figure {
      display: block; margin: 16px 0; position: relative; user-select: none;
    }
    .img-figure img {
      max-width: 100%; height: auto; display: block; border-radius: 4px; cursor: pointer;
    }
    .img-figure.selected img { outline: 2px solid #1a73e8; border-radius: 4px; }

    .img-delete-btn {
      display: none; position: absolute; top: 8px; right: 8px;
      background: rgba(0,0,0,0.65); color: #fff; border: none; border-radius: 4px;
      padding: 4px 10px; font-size: 12px; font-weight: 700;
      font-family: 'Roboto', sans-serif; cursor: pointer; gap: 4px; align-items: center; z-index: 10;
    }
    .img-delete-btn:hover { background: #c62828; }
    .img-figure.selected .img-delete-btn { display: flex; }

    /* ── Tombol "Tentukan Cover" — DITUMPUK VERTIKAL di atas tombol Hapus Foto.
       Sengaja masing-masing pakai position:absolute independen (bukan wrapper
       flex) supaya nggak ada celah cascade CSS yang bisa bikin tombolnya
       "lepas" dan jatuh ke bawah foto. ── */
    .img-cover-btn {
      display: none; position: absolute; top: 8px; right: 8px;
      background: rgba(26,115,232,0.9); color: #fff; border: none; border-radius: 4px;
      padding: 4px 10px; font-size: 12px; font-weight: 700;
      font-family: 'Roboto', sans-serif; cursor: pointer; white-space: nowrap;
      align-items: center; gap: 4px; z-index: 10;
    }
    .img-figure.selected .img-cover-btn { display: flex; }
    .img-cover-btn:hover { background: #1558c0; }
    .img-cover-btn.is-cover { background: #2e7d32; }
    .img-cover-btn.is-cover:hover { background: #256428; }
    /* Foto (bukan embed) yang punya tombol cover: geser tombol Hapus Foto ke bawah tombol cover */
    .img-figure:not(.embed-figure) .img-delete-btn { top: 44px; }
    .img-figure.is-cover-photo img { outline: 2px solid #2e7d32; }

    .img-caption {
      width: 100%; font-family: 'Roboto', sans-serif; font-size: 13px;
      color: #777; font-style: italic; border: none; border-bottom: 1px dashed #ddd;
      outline: none; background: transparent; padding: 5px 2px; margin-top: 4px;
      resize: none; overflow: hidden;
    }
    .img-caption::placeholder { color: #bbb; }
    .img-caption:focus { border-bottom-color: #1a73e8; color: #333; }

    .sidebar {
      width: 300px; background: #fff; border-left: 1px solid #e0e0e0;
      padding: 16px; overflow-y: auto;
      position: fixed; top: 48px; right: 0; bottom: 0;
      transition: transform 0.2s; z-index: 100;
    }
    .sidebar.hidden { transform: translateX(300px); }

    .draft-status { font-size: 12px; color: #555; margin-bottom: 4px; }
    .draft-status span { color: #e53935; font-weight: 700; }
    .draft-time { font-size: 12px; color: #888; margin-bottom: 14px; }
    .stats-row { font-size: 12px; color: #555; margin-bottom: 3px; }
    .sidebar-divider { height: 1px; background: #e8e8e8; margin: 14px 0; }
    .sidebar-section { margin-bottom: 4px; }

    .section-header { display: flex; align-items: center; justify-content: space-between; cursor: pointer; padding: 6px 0; user-select: none; }
    .section-title { font-size: 12px; font-weight: 700; color: #111; letter-spacing: 0.04em; text-transform: uppercase; }
    .section-required { color: #e53935; margin-left: 2px; }
    .section-toggle { color: #555; font-size: 13px; }
    .section-body { padding-bottom: 8px; }

    .section-body textarea,
    .section-body input[type="text"],
    .section-body input[type="datetime-local"] {
      width: 100%; font-family: 'Roboto', sans-serif; font-size: 13px;
      border: 1px solid #ddd; border-radius: 4px; padding: 7px 9px;
      resize: vertical; outline: none; background: #fff; color: #111;
    }
    .section-body textarea:focus, .section-body input:focus { border-color: #1a73e8; }
    .char-count { font-size: 11px; color: #aaa; text-align: right; margin-top: 4px; }

    .section-body select {
      width: 100%; font-family: 'Roboto', sans-serif; font-size: 13px;
      border: 1px solid #ddd; border-radius: 4px; padding: 7px 28px 7px 9px;
      outline: none; background: #fff; color: #111; cursor: pointer; appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 10px center;
    }
    .section-body select:focus { border-color: #1a73e8; }
    .section-body select:disabled { background-color: #f5f5f5; color: #aaa; cursor: not-allowed; }

    .checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #333; cursor: pointer; }
    .checkbox-row input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; }
    .loc-label { font-size: 12px; color: #555; margin-bottom: 5px; margin-top: 10px; }

    .submit-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(255,255,255,0.88); z-index: 500;
      align-items: center; justify-content: center; flex-direction: column; gap: 16px;
    }
    .submit-overlay.show { display: flex; }
    .spinner { width: 36px; height: 36px; border: 3px solid #e0e0e0; border-top-color: #1a73e8; border-radius: 50%; animation: spin 0.8s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .submit-overlay p { font-size: 14px; color: #555; }

    .thankyou-page {
      display: none; position: fixed; inset: 0; background: #fff; z-index: 600;
      flex-direction: column; align-items: center; justify-content: center;
      text-align: center; padding: 24px;
    }
    .thankyou-page.show { display: flex; }
    .ty-icon { width: 80px; height: 80px; background: #e8f5e9; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 28px; }
    .ty-icon svg { width: 40px; height: 40px; stroke: #2e7d32; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
    .ty-title { font-size: 22px; font-weight: 700; color: #111; margin-bottom: 12px; max-width: 420px; line-height: 1.4; }
    .ty-desc { font-size: 14px; color: #666; margin-bottom: 36px; line-height: 1.6; max-width: 340px; }
    .ty-btn { display: inline-block; background: #1a73e8; color: #fff; text-decoration: none; font-family: 'Roboto', sans-serif; font-size: 14px; font-weight: 700; padding: 12px 32px; border-radius: 6px; border: none; cursor: pointer; }
    .ty-btn:hover { background: #1558c0; }

    #img-upload { display: none; }

    /* show-desc toggle */
    .show-desc-toggle {
      padding: 8px 0 10px;
    }
    .show-desc-toggle label {
      display: flex; align-items: flex-start; gap: 8px; cursor: pointer;
    }
    .show-desc-toggle input[type="checkbox"] {
      width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; cursor: pointer;
    }
    .show-desc-toggle .toggle-label {
      font-size: 12px; font-weight: 700; color: #111;
      letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.3;
    }
    .show-desc-toggle .toggle-hint {
      font-size: 11px; color: #aaa; margin-top: 4px; padding-left: 23px; line-height: 1.4;
    }
