/* Optional EventFlow portal controls; the diagram/export geometry is unchanged. */
.ef-cloud-trigger {position:relative;min-width:84px;flex-shrink:0}
.ef-cloud-trigger-status {position:absolute;right:4px;top:4px;display:block;width:5px;height:5px;border-radius:50%;overflow:hidden;font-size:0;background:var(--muted,#80917c)}
.ef-cloud-trigger[data-state="saved"] .ef-cloud-trigger-status {background:#72a547}
.ef-cloud-trigger[data-state="dirty"] .ef-cloud-trigger-status {background:#d6a145}
.ef-cloud-trigger[data-state="saving"] .ef-cloud-trigger-status {background:#97b467;animation:ef-cloud-pulse 1.1s ease-in-out infinite alternate}
@keyframes ef-cloud-pulse {to{opacity:.35}}
.ef-cloud-dialog {box-sizing:border-box;position:fixed;inset:0;width:min(540px,calc(100vw - 28px));max-width:none;max-height:calc(100dvh - 32px);margin:auto;padding:0;border:1px solid #bfcbb5;border-radius:18px;color:#273125;background:#f7f9f3;box-shadow:0 28px 90px #0005;font:14px/1.65 Inter,'IBM Plex Sans Thai',system-ui,sans-serif;overflow:auto;overscroll-behavior:contain}
.ef-cloud-dialog::backdrop {background:#061008b8;backdrop-filter:blur(5px)}
.ef-cloud-content {padding:26px}
.ef-cloud-head {display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}
.ef-cloud-head h2 {font-size:23px;line-height:1.3;letter-spacing:-.6px;margin:7px 0 0}
.ef-cloud-eyebrow {font-size:9px;font-weight:650;letter-spacing:2px;color:#7d8d70}
.ef-cloud-close {flex-shrink:0;font:inherit;background:transparent;border:1px solid #c4cebb;border-radius:10px;padding:9px 13px;min-height:44px}
.ef-cloud-dialog h3 {font-size:17px;line-height:1.45;margin:20px 0 10px}
.ef-cloud-dialog p {margin:12px 0;overflow-wrap:anywhere}
.ef-cloud-muted {color:#738168}
.ef-cloud-account {font-weight:600;overflow-wrap:anywhere}
.ef-cloud-status {font-size:12px;font-weight:600;color:#61803a;min-height:20px}
.ef-cloud-record {display:flex;flex-direction:column;gap:5px;padding:17px 18px;border:1px solid #d3ddc8;border-radius:12px;background:#eef3e7;margin:16px 0;overflow-wrap:anywhere}
.ef-cloud-record-heading {display:flex;justify-content:space-between;align-items:center;gap:10px}
.ef-cloud-record-heading>strong {min-width:0}
.ef-cloud-record-heading .ef-cloud-action {flex-shrink:0;max-width:60%;padding:7px 10px;font-size:12px}
.ef-cloud-notice {padding:14px 16px;border:1px solid #c8dab4;background:#eaf3df;border-radius:11px;font-size:13px;color:#4b6634}
.ef-cloud-notice.error {border-color:#c6a364;background:#fff0d8;color:#80632e}
.ef-cloud-actions {display:flex;flex-wrap:wrap;gap:9px;margin-top:22px}
.ef-cloud-action {box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;padding:11px 15px;border:1px solid #bfcbb5;border-radius:9px;background:transparent;font:inherit;font-size:13px;line-height:1.45;text-align:center;text-decoration:none;color:inherit;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
.ef-cloud-action.primary {background:#bedb86;border-color:#adc775;color:#26351b;font-weight:650}
.ef-cloud-action.danger {border-color:#ae6860;color:#9d3029}
.ef-cloud-action:disabled {opacity:.5;cursor:wait}
.ef-cloud-action:hover:not(:disabled),.ef-cloud-close:hover {border-color:#859e66;background:#edf3e3}
.ef-cloud-action.primary:hover:not(:disabled) {background:#cbe69a}
.ef-cloud-action:focus-visible,.ef-cloud-close:focus-visible {outline:3px solid #75984b;outline-offset:3px}
html[data-theme="dark"] .ef-cloud-dialog {color:#eef3e6;background:#1a251c;border-color:#516346}
html[data-theme="dark"] .ef-cloud-muted {color:#a2b094}
html[data-theme="dark"] .ef-cloud-eyebrow {color:#9aaa8d}
html[data-theme="dark"] .ef-cloud-status {color:#c0d993}
html[data-theme="dark"] .ef-cloud-close,html[data-theme="dark"] .ef-cloud-action {border-color:#526448}
html[data-theme="dark"] .ef-cloud-action.danger {border-color:#b0786c;color:#f3afa1}
html[data-theme="dark"] .ef-cloud-record {background:#182219;border-color:#46563d}
html[data-theme="dark"] .ef-cloud-notice {background:#263720;border-color:#526d3c;color:#d2e8b5}
html[data-theme="dark"] .ef-cloud-notice.error {background:#443721;border-color:#8f7445;color:#e9c890}
html[data-theme="dark"] .ef-cloud-action:hover:not(:disabled),html[data-theme="dark"] .ef-cloud-close:hover {background:#2d3d27;border-color:#97b36a}
html[data-theme="dark"] .ef-cloud-action.primary:hover:not(:disabled) {background:#cbe69a}
@media (max-width:850px) {
  .project-actions {flex-wrap:wrap}
  .project-actions .ef-cloud-trigger {min-width:72px;min-height:44px;flex:0 0 auto;padding-inline:10px;gap:6px}
  .ef-cloud-content {padding:22px}
}
@media (max-width:440px) {
  .project-actions .ef-cloud-trigger {min-width:64px;padding-inline:7px;gap:4px}
  .project-actions .ef-cloud-trigger svg {width:16px;height:16px}
  .ef-cloud-content {padding:21px 18px}
  .ef-cloud-head {gap:12px}
  .ef-cloud-head h2 {font-size:21px}
  .ef-cloud-actions {display:grid;grid-template-columns:1fr}
  .ef-cloud-dialog {width:calc(100vw - 20px);max-height:calc(100dvh - 22px)}
}
@media (prefers-reduced-motion:reduce) {.ef-cloud-trigger-status {animation:none!important}}
@media print {.ef-cloud-trigger,.ef-cloud-dialog {display:none!important}}
/* Four project actions fit the existing mobile toolbar without a second row. */
@media (max-width:560px) {
  .project-actions {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;align-items:stretch}
  .project-actions>.btn,.project-actions .export-wrap>.btn {height:44px;min-height:44px;min-width:0;width:100%;padding:4px 5px;white-space:normal;gap:4px;line-height:1.2;text-align:center}
  .project-actions .export-wrap {min-width:0;margin-left:0}
  .project-actions>#import-btn svg,.project-actions>#new-btn svg,.project-actions .ef-cloud-trigger svg,.project-actions #export-btn svg:first-child {display:none}
}
@media (max-width:360px) {
  .topbar .brand {font-size:20px}
  .sb-eventflow-account>a[title="SB Developer TH"] {display:none}
}
.sb-eventflow-account>a[href^="/signout-with-chatgpt"] {display:inline-flex;min-width:44px;min-height:44px;align-items:center;justify-content:center}
@media (max-width:360px) {
  .topbar {gap:3px}
  .top-right {gap:2px}
  .top-right>.status-dot {display:none}
}
@media (max-width:360px) {.topbar {padding-inline:8px}}
@media (max-width:360px) {.topbar {gap:3px!important;padding-inline:8px!important}.top-right {gap:2px!important}}
