:root {
  --mj-navy: #06182d;
  --mj-navy-2: #0a2947;
  --mj-line: #1a4d73;
  --mj-text: #f5f9ff;
  --mj-muted: #91acc5;
  --mj-green: #39c94b;
  --mj-blue: #1ea7ff;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #041225; color: var(--mj-text); }
button { font: inherit; }
.mjourney-shell { width: 100%; height: 100%; display: flex; flex-direction: column; background: #041225; }
.mjourney-bar {
  flex: 0 0 58px;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(175px, 230px) minmax(330px, 520px) minmax(90px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 6px 10px;
  background: linear-gradient(90deg, #05172b 0%, #092b49 52%, #061b31 100%);
  border-bottom: 1px solid #1a517b;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .34);
  position: relative;
  z-index: 20;
}
.mjourney-brand { min-width: 0; display: flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.mjourney-mark {
  width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center;
  border: 1.5px solid rgba(199, 221, 240, .78); border-radius: 11px;
  background: rgba(255,255,255,.05); color: #fff; font-size: 11px; font-weight: 950; font-style: italic;
}
.mjourney-brand-copy { min-width: 0; line-height: 1; }
.mjourney-brand-copy small { display: block; margin-bottom: 4px; color: #7fbff2; font-size: 7px; font-weight: 900; letter-spacing: .18em; white-space: nowrap; }
.mjourney-brand-copy strong { display: block; font-size: 17px; letter-spacing: -.02em; }
.mjourney-tabs { height: 46px; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid rgba(114, 166, 205, .22); border-radius: 13px; background: #04192c; }
.mjourney-tab { min-width: 0; border: 0; border-radius: 9px; padding: 0 10px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #a9bfd3; background: transparent; cursor: pointer; transition: .16s ease; }
.mjourney-tab:hover { color: #fff; background: rgba(255,255,255,.05); }
.mjourney-tab .tab-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: #10324e; font-size: 16px; font-weight: 900; }
.mjourney-tab span:last-child { min-width: 0; text-align: left; line-height: 1.05; }
.mjourney-tab b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.mjourney-tab small { display: block; margin-top: 3px; color: #7895ae; font-size: 7px; white-space: nowrap; }
.mjourney-tab.active.journey { color: #fff; background: linear-gradient(135deg, #238e29, #31b93b); box-shadow: 0 5px 13px rgba(45, 184, 55, .23); }
.mjourney-tab.active.eta { color: #fff; background: linear-gradient(135deg, #0c6cae, #168ed6); box-shadow: 0 5px 13px rgba(30, 167, 255, .22); }
.mjourney-tab.active .tab-icon { color: inherit; background: rgba(255,255,255,.13); }
.mjourney-tab.active small { color: rgba(255,255,255,.77); }
.mjourney-actions { justify-self: end; display: flex; align-items: center; gap: 6px; }
.mjourney-version { min-width: 55px; padding: 6px 8px; border: 1px solid #1b6540; border-radius: 8px; color: #60e98a; background: #082b24; text-align: center; font-size: 9px; font-weight: 900; }
.fullscreen { width: 34px; height: 34px; border: 1px solid #285a80; border-radius: 8px; background: #08233d; color: #d8e9f6; cursor: pointer; font-size: 17px; }
.fullscreen:hover { border-color: #4ea3df; background: #0b3458; }
.mjourney-stage { flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden; background: #e7edf1; }

.mjourney-loader {
  position: absolute; inset: 0; z-index: 8; display: grid; place-items: center;
  padding: 24px; background: linear-gradient(135deg, rgba(235,242,246,.96), rgba(247,250,252,.94));
  backdrop-filter: blur(4px); transition: opacity .18s ease, visibility .18s ease;
}
.mjourney-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.mjourney-loader-card {
  min-width: min(360px, calc(100vw - 42px)); display: flex; align-items: center; gap: 14px;
  padding: 17px 19px; border: 1px solid rgba(18,70,105,.14); border-radius: 16px;
  color: #102a3d; background: rgba(255,255,255,.96); box-shadow: 0 16px 45px rgba(25,55,76,.16);
}
.mjourney-loader-card strong { display: block; font-size: 13px; line-height: 1.2; }
.mjourney-loader-card small { display: block; margin-top: 5px; color: #6d8496; font-size: 10px; line-height: 1.35; }
.mjourney-spinner {
  width: 30px; height: 30px; flex: 0 0 30px; border: 3px solid #d8e4ea; border-top-color: var(--mj-green);
  border-radius: 50%; animation: mj-spin .72s linear infinite;
}
@keyframes mj-spin { to { transform: rotate(360deg); } }

.mjourney-frame { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border: 0; visibility: hidden; opacity: 0; pointer-events: none; background: #e8eef2; transition: opacity .12s ease; }
.mjourney-frame.active { z-index: 2; visibility: visible; opacity: 1; pointer-events: auto; }
@media (max-width: 760px) {
  .mjourney-bar { grid-template-columns: 48px minmax(0, 1fr) 38px; gap: 6px; padding-left: 7px; padding-right: 7px; }
  .mjourney-brand-copy, .mjourney-version { display: none; }
  .mjourney-tabs { min-width: 0; }
  .mjourney-tab { gap: 5px; padding: 0 6px; }
  .mjourney-tab .tab-icon { width: 22px; height: 22px; font-size: 14px; }
  .mjourney-tab b { font-size: 10px; }
  .mjourney-tab small { display: none; }
}
@media (max-height: 560px) {
  .mjourney-bar { flex-basis: 50px; min-height: 50px; padding-top: 4px; padding-bottom: 4px; }
  .mjourney-mark { width: 36px; height: 36px; flex-basis: 36px; }
  .mjourney-tabs { height: 40px; }
}
