/* Captain's Log — decorative shell + real Waypoint UI overlay
 *
 * Architecture:
 *   .ej-shell-art     → decorative image only (pointer-events: none)
 *   .ej-shell-content → real DOM controls (header, tabs, editor, footer)
 *
 * Clean shell assets (when supplied):
 *   /assets/captains-log/captains-log-full-shell.png
 *   /assets/captains-log/captains-log-mini-shell.png
 *
 * CSS leather/parchment fallback remains if PNGs fail to load.
 * Do NOT point at baked-UI PNGs (old captains-log-expanded/mini).
 */

:root {
  --ej-leather: #132433;
  --ej-leather-deep: #0a1420;
  --ej-leather-mid: #1a2f42;
  --ej-gold: #c5a059;
  --ej-gold-soft: #e8d5a3;
  --ej-brass: rgba(197, 160, 89, 0.55);
  --ej-parchment: #e8d7b4;
  --ej-parchment-soft: #f2e6cc;
  --ej-ink: #2a1c12;
  --ej-ink-muted: rgba(42, 28, 18, 0.62);
  /* Clean decorative shells (no baked UI) */
  --ej-shell-full: url("/assets/captains-log/captains-log-full-shell.png");
  --ej-shell-mini: url("/assets/captains-log/captains-log-mini-shell.png");
  /* Safe content insets relative to shell art (full ≈ 1024×768).
     Top is shallow so title/tabs sit on the leather header; sides/bottom
     clear brass corners and keep editor/footer in parchment. */
  --ej-inset-top: 4%;
  --ej-inset-side: 5.2%;
  --ej-inset-bottom: 10.5%;
  /* Mini square shell — top/sides/bottom differ slightly */
  --ej-mini-inset-top: 11%;
  --ej-mini-inset-side: 11%;
  --ej-mini-inset-bottom: 12%;
}

#executionJournalWindow {
  position: fixed;
  z-index: 9200;
  display: flex;
  flex-direction: column;
  min-width: 280px;
  min-height: 220px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(197, 160, 89, 0.28);
  /* CSS leather fallback if shell PNG missing */
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(197, 160, 89, 0.08), transparent 55%),
    linear-gradient(165deg, var(--ej-leather-mid) 0%, var(--ej-leather-deep) 48%, #070f18 100%);
  color: var(--ej-gold-soft);
  font-family: "Cinzel", "Libre Baskerville", Georgia, serif;
  padding: 0;
}

#executionJournalWindow[hidden] {
  display: none !important;
}

/* Decorative artwork layer — never captures clicks */
.ej-shell-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image: var(--ej-shell-full);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

/* Real controls sit above art, inset into parchment / leather zones */
.ej-shell-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  padding: var(--ej-inset-top) var(--ej-inset-side) var(--ej-inset-bottom);
  pointer-events: auto;
}

/* —— Header —— */
.ej-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 4px 8px;
  cursor: grab;
  user-select: none;
  /* Sit on leather — keep translucent so ship/compass etch shows through */
  background: rgba(8, 16, 28, 0.28);
  border: 1px solid rgba(197, 160, 89, 0.22);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 230, 180, 0.05);
}

.ej-titlebar:active {
  cursor: grabbing;
}

.ej-title-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(197, 160, 89, 0.4);
  flex: 0 0 auto;
}

.ej-title-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.ej-title-copy strong {
  display: block;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--ej-gold-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ej-title-copy span {
  display: block;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 213, 163, 0.58);
}

.ej-pete-btn {
  appearance: none;
  border: 1px solid rgba(197, 160, 89, 0.5);
  background: linear-gradient(180deg, rgba(197, 160, 89, 0.38), rgba(90, 60, 28, 0.55));
  color: #fff4d8;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.ej-pete-btn:hover {
  filter: brightness(1.08);
}

.ej-win-actions {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}

.ej-win-actions button {
  appearance: none;
  border: 1px solid rgba(197, 160, 89, 0.3);
  background: rgba(0, 0, 0, 0.32);
  color: var(--ej-gold-soft);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.ej-win-actions button[data-ej-popout] {
  font-size: 0.85rem;
  font-weight: 700;
}

.ej-win-actions button[hidden] {
  display: none !important;
}

.ej-win-actions button:hover {
  background: rgba(197, 160, 89, 0.2);
}

/* Standalone / maximize */
body.ej-standalone {
  overflow: hidden;
}

body.ej-standalone #executionJournalWindow.ej-standalone-shell,
#executionJournalWindow.ej-standalone-shell {
  inset: 0 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.ej-standalone #executionJournalWindow .ej-titlebar {
  cursor: default;
}

body.ej-standalone #executionJournalWindow .ej-resize {
  display: none !important;
}

#executionJournalWindow.ej-maximized {
  max-width: none;
  max-height: none;
}

/* —— Notebook body —— */
.ej-notebook {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 6px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
}

/* Tabs as notebook markers */
.ej-tabs {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
  padding: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: transparent;
  border-bottom: 1px solid rgba(197, 160, 89, 0.22);
}

.ej-tab {
  appearance: none;
  border: 1px solid rgba(197, 160, 89, 0.22);
  background: linear-gradient(180deg, rgba(20, 36, 52, 0.95), rgba(10, 18, 28, 0.95));
  color: rgba(232, 213, 163, 0.7);
  padding: 8px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  border-bottom: none;
  margin-bottom: -1px;
}

.ej-tab:hover {
  color: var(--ej-gold-soft);
  border-color: rgba(197, 160, 89, 0.4);
}

.ej-tab.active {
  color: var(--ej-ink);
  background: linear-gradient(180deg, var(--ej-parchment-soft), var(--ej-parchment));
  border-color: rgba(140, 110, 60, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Metadata — parchment inset fields */
.ej-meta-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0 4px;
  font-family: "Inter", system-ui, sans-serif;
}

.ej-meta-row label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ej-ink-muted);
}

.ej-meta-row input {
  border: 1px solid rgba(197, 160, 89, 0.4);
  background: linear-gradient(180deg, rgba(242, 230, 204, 0.96), rgba(224, 206, 168, 0.94));
  color: var(--ej-ink);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 0.82rem;
  font-family: inherit;
  box-shadow: inset 0 1px 3px rgba(60, 40, 20, 0.18);
}

.ej-meta-row input:focus {
  outline: none;
  border-color: rgba(197, 160, 89, 0.75);
  box-shadow:
    inset 0 1px 3px rgba(60, 40, 20, 0.16),
    0 0 0 2px rgba(197, 160, 89, 0.22);
}

.ej-grow {
  min-width: 0;
}

/* Page / parchment writing surface */
.ej-page {
  flex: 1 1 auto;
  min-height: 0;
  margin: 4px 0 0;
  border-radius: 6px;
  border: 1px solid rgba(90, 58, 36, 0.18);
  /* Let shell parchment show through */
  background: rgba(242, 230, 204, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ej-page[hidden] {
  display: none !important;
}

/* Slim Waypoint format toolbar */
.ej-format-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(90, 58, 36, 0.16);
  background: linear-gradient(180deg, rgba(22, 36, 52, 0.92), rgba(12, 22, 34, 0.94));
  font-family: "Inter", system-ui, sans-serif;
}

.ej-format-bar .ej-format-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(232, 213, 163, 0.7);
}

.ej-format-bar select {
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 5px;
  background: rgba(8, 14, 22, 0.85);
  color: var(--ej-gold-soft);
  font-size: 0.7rem;
  padding: 3px 5px;
  max-width: 140px;
  text-transform: none;
  letter-spacing: 0;
}

.ej-format-bar select[data-ej-font] {
  max-width: 160px;
}

.ej-format-bar button {
  appearance: none;
  border: 1px solid rgba(197, 160, 89, 0.32);
  border-radius: 5px;
  background: rgba(8, 14, 22, 0.75);
  color: var(--ej-gold-soft);
  min-width: 28px;
  height: 26px;
  padding: 0 7px;
  font-size: 0.74rem;
  cursor: pointer;
  line-height: 1;
}

.ej-format-bar button:hover {
  border-color: rgba(197, 160, 89, 0.55);
  background: rgba(197, 160, 89, 0.14);
}

.ej-format-bar button.is-active {
  background: rgba(197, 160, 89, 0.28);
  border-color: rgba(197, 160, 89, 0.7);
}

.ej-page .ej-editor {
  flex: 1 1 auto;
  min-height: 180px;
  width: 100%;
  border: none;
  resize: none;
  padding: 14px 16px;
  background: transparent;
  color: var(--ej-ink);
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.55;
  overflow: auto;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
}

.ej-page .ej-editor:empty:before {
  content: attr(data-placeholder);
  color: var(--ej-ink-muted);
  pointer-events: none;
}

.ej-page .ej-editor ul {
  margin: 0.35em 0 0.35em 1.25em;
  padding: 0;
}

.ej-page .ej-editor li {
  margin: 0.15em 0;
}

.ej-page-review {
  background: rgba(10, 16, 24, 0.72);
  border-color: rgba(197, 160, 89, 0.22);
  overflow: auto;
  padding: 8px;
}

.ej-review-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-family: "Inter", system-ui, sans-serif;
}

.ej-search {
  flex: 1 1 auto;
  border: 1px solid rgba(197, 160, 89, 0.28);
  background: rgba(0, 0, 0, 0.35);
  color: #f0e6d2;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 0.78rem;
}

.ej-new-btn,
.ej-toolbar .btn,
.ej-attach-bar .btn {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ej-review-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ej-review-card {
  appearance: none;
  text-align: left;
  border: 1px solid rgba(197, 160, 89, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #f0e6d2;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: "Inter", system-ui, sans-serif;
}

.ej-review-card:hover,
.ej-review-card.active {
  border-color: rgba(197, 160, 89, 0.45);
  background: rgba(197, 160, 89, 0.12);
}

.ej-review-date {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ej-gold);
  margin-bottom: 2px;
}

.ej-review-title {
  display: block;
  font-size: 0.86rem;
  margin-bottom: 6px;
  color: #fff4d8;
}

.ej-review-preview {
  display: block;
  font-size: 0.74rem;
  line-height: 1.35;
  color: rgba(232, 213, 163, 0.72);
  margin-top: 3px;
}

.ej-review-preview em {
  color: rgba(197, 160, 89, 0.9);
  font-style: normal;
}

.ej-history-title {
  margin: 14px 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(232, 213, 163, 0.7);
  font-family: "Inter", system-ui, sans-serif;
}

.ej-history-item {
  border: 1px solid rgba(197, 160, 89, 0.16);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.ej-history-item header {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--ej-gold-soft);
  margin-bottom: 8px;
}

.ej-history-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ej-history-cols h5 {
  margin: 0 0 4px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ej-gold);
}

.ej-history-cols p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(240, 230, 210, 0.82);
}

/* Attach + footer actions */
.ej-attach-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 0 2px;
  font-family: "Inter", system-ui, sans-serif;
}

.ej-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 0 0;
  font-family: "Inter", system-ui, sans-serif;
}

.ej-attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ej-attach-empty {
  font-size: 0.68rem;
  color: rgba(232, 213, 163, 0.45);
}

.ej-attach-chip {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(197, 160, 89, 0.3);
  background: rgba(0, 0, 0, 0.35);
}

.ej-attach-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ej-attach-doc {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.55rem;
  text-align: center;
  padding: 4px;
  color: var(--ej-gold-soft);
}

.ej-attach-chip button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.ej-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 4px;
  font-family: "Inter", system-ui, sans-serif;
}

.ej-toolbar .btn,
.ej-attach-bar .btn {
  appearance: none;
  border: 1px solid rgba(197, 160, 89, 0.35);
  background: rgba(8, 14, 22, 0.72);
  color: var(--ej-gold-soft);
  border-radius: 7px;
  padding: 7px 12px;
  cursor: pointer;
}

.ej-toolbar .btn.gold,
.ej-toolbar .btn[data-ej-save] {
  background: linear-gradient(180deg, rgba(197, 160, 89, 0.42), rgba(110, 78, 32, 0.65));
  border-color: rgba(197, 160, 89, 0.65);
  color: #fff6dd;
  font-weight: 700;
}

.ej-toolbar .btn[data-ej-delete] {
  border-color: rgba(180, 70, 70, 0.45);
  color: #f0b0a8;
}

.ej-toolbar .btn:hover,
.ej-attach-bar .btn:hover {
  filter: brightness(1.08);
}

.ej-toolbar .ej-meta {
  margin-left: auto;
  font-size: 0.66rem;
  color: rgba(232, 213, 163, 0.55);
}

.ej-export-wrap {
  position: relative;
}

.ej-export-menu {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(197, 160, 89, 0.35);
  background: rgba(10, 18, 28, 0.96);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  z-index: 5;
}

.ej-export-menu[hidden] {
  display: none !important;
}

.ej-export-menu button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ej-gold-soft);
  text-align: left;
  padding: 6px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
}

.ej-export-menu button:hover {
  background: rgba(197, 160, 89, 0.16);
}

.ej-pete-actions {
  display: flex;
  gap: 6px;
}

.ej-pete-tagged {
  margin: 6px 10px 0;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(197, 160, 89, 0.25);
  background: rgba(0, 0, 0, 0.28);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.78rem;
  color: #f0e6d2;
}

.ej-pete-tagged[hidden] {
  display: none !important;
}

.ej-pete-tagged header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ej-pete-tagged-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ej-pete-tagged h5 {
  margin: 0 0 4px;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ej-gold);
}

.ej-pete-tagged ul {
  margin: 0;
  padding-left: 1.1em;
}

.ej-pete-panel {
  margin: 6px 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(197, 160, 89, 0.28);
  background: rgba(0, 0, 0, 0.35);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #f0e6d2;
  max-height: 180px;
  overflow: auto;
}

.ej-pete-panel[hidden] {
  display: none !important;
}

.ej-pete-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: var(--ej-gold);
}

.ej-pete-panel header button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ej-gold-soft);
  cursor: pointer;
  font-size: 1rem;
}

.ej-pete-panel h5 {
  margin: 8px 0 4px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ej-gold);
}

.ej-pete-panel ul {
  margin: 0;
  padding-left: 1.1em;
}

.ej-empty-msg {
  margin: 12px;
  color: rgba(232, 213, 163, 0.55);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem;
}

.ej-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, rgba(197, 160, 89, 0.55) 50%);
}

/* ========== MINI (square sticky-note shell ≈ 1024×1024) ========== */
#executionJournalWindow.ej-minimized {
  min-width: 320px;
  min-height: 320px;
  max-width: min(480px, calc(100vw - 16px));
  max-height: min(480px, calc(100vh - 16px));
  width: 420px;
  height: 420px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  padding: 0;
}

#executionJournalWindow.ej-minimized .ej-shell-art {
  background-image: var(--ej-shell-mini);
}

#executionJournalWindow.ej-minimized .ej-shell-content {
  padding: var(--ej-mini-inset-top) var(--ej-mini-inset-side) var(--ej-mini-inset-bottom);
}

#executionJournalWindow.ej-minimized .ej-title-copy span,
#executionJournalWindow.ej-minimized .ej-meta-row,
#executionJournalWindow.ej-minimized .ej-tab-review,
#executionJournalWindow.ej-minimized .ej-attach-bar,
#executionJournalWindow.ej-minimized .ej-format-bar,
#executionJournalWindow.ej-minimized .ej-toolbar .btn:not([data-ej-save]),
#executionJournalWindow.ej-minimized .ej-export-wrap,
#executionJournalWindow.ej-minimized .ej-pete-panel,
#executionJournalWindow.ej-minimized .ej-pete-tagged,
#executionJournalWindow.ej-minimized .ej-pete-btn,
#executionJournalWindow.ej-minimized [data-ej-popout],
#executionJournalWindow.ej-minimized [data-ej-max] {
  display: none !important;
}

#executionJournalWindow.ej-minimized .ej-title-copy strong {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

#executionJournalWindow.ej-minimized .ej-title-copy strong::after {
  content: " · Mini";
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.72;
  font-weight: 500;
}

#executionJournalWindow.ej-minimized .ej-titlebar {
  padding: 6px 8px;
}

#executionJournalWindow.ej-minimized .ej-tabs {
  padding: 6px 4px 0;
  gap: 4px;
}

#executionJournalWindow.ej-minimized .ej-tab {
  flex: 1 1 0;
  text-align: center;
  padding: 7px 6px;
  font-size: 0.64rem;
}

#executionJournalWindow.ej-minimized .ej-page {
  margin: 6px 4px;
}

#executionJournalWindow.ej-minimized .ej-page .ej-editor {
  min-height: 0;
  flex: 1 1 auto;
  font-size: 0.92rem;
  padding: 10px;
}

#executionJournalWindow.ej-minimized .ej-toolbar {
  padding: 4px 4px 0;
}

#executionJournalWindow.ej-minimized .ej-toolbar .ej-meta {
  margin-left: 0;
  flex: 1 1 auto;
  text-align: right;
}

#executionJournalWindow.ej-minimized .ej-notebook {
  margin-top: 6px;
}

@media (max-width: 720px) {
  .ej-meta-row {
    grid-template-columns: 1fr;
  }

  .ej-history-cols,
  .ej-pete-tagged-cols {
    grid-template-columns: 1fr;
  }

  .ej-pete-btn {
    display: none;
  }
}
