.ept-shell {
  background: linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
  border: 1px solid var(--ept-border);
  border-radius: var(--ept-radius-lg);
  margin: 20px auto;
  max-width: 1220px;
  padding: 22px;
}

.ept-shell__topbar {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ept-shell__brand {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.ept-shell__brand-mark {
  align-items: center;
  background: var(--ept-primary);
  border-radius: 12px;
  color: #fff;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  letter-spacing: 0.03em;
  width: 36px;
}

.ept-shell__brand-text strong,
.ept-shell__brand-text span {
  display: block;
}

.ept-shell__brand-text strong {
  font-size: 0.95rem;
}

.ept-shell__brand-text span {
  color: var(--ept-muted);
  font-size: 0.78rem;
}

.ept-shell__header {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(219, 226, 234, 0.86);
  border-radius: 24px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 20px;
}

.ept-shell__title {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.12;
  margin: 0;
}

.ept-shell__description {
  color: var(--ept-muted);
  font-size: 1rem;
  line-height: 1.55;
  margin: 10px 0 0;
  max-width: 860px;
}

.ept-shell__summary {
  margin-top: 14px;
}

.ept-core-map {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 16px;
  padding: 12px;
}

.ept-core-map__item {
  background: var(--ept-surface-soft);
  border: 1px solid var(--ept-border);
  border-radius: 14px;
  min-width: 0;
  padding: 11px 12px;
}

.ept-core-map__item strong,
.ept-core-map__item span {
  display: block;
}

.ept-core-map__item strong {
  font-size: 0.88rem;
}

.ept-core-map__item span {
  color: var(--ept-muted);
  font-size: 0.78rem;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.ept-core-map__item.is-ready {
  background: var(--ept-success-bg);
  border-color: var(--ept-success-border);
}

.ept-core-map__item.is-warning {
  background: var(--ept-warning-bg);
  border-color: var(--ept-warning-border);
}

.ept-core-map__item.is-error {
  background: var(--ept-error-bg);
  border-color: var(--ept-error-border);
}

.ept-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
}

.ept-main,
.ept-side,
.ept-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ept-start,
.ept-workspace,
.ept-panel,
.ept-process,
.ept-result,
.ept-debug,
.ept-components {
  padding: 18px;
}

.ept-slot-label {
  align-items: center;
  background: var(--ept-surface-soft);
  border: 1px solid var(--ept-border);
  border-radius: 999px;
  color: var(--ept-muted-strong);
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  min-height: 28px;
  padding: 6px 10px;
  text-transform: uppercase;
}

.ept-dropzone {
  align-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 2px dashed var(--ept-border-strong);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  min-height: 310px;
  justify-content: center;
  padding: 26px;
  text-align: center;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.ept-dropzone.is-dragover {
  background: #eff6ff;
  border-color: var(--ept-primary);
  transform: translateY(-1px);
}

.ept-file-input {
  display: none !important;
}

.ept-dropzone__icon {
  align-items: center;
  background: #eaf1ff;
  border: 1px solid #cfddff;
  border-radius: 20px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 900;
  height: 72px;
  justify-content: center;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
  width: 72px;
}

.ept-dropzone h3,
.ept-workspace__placeholder h3,
.ept-side h3 {
  font-size: 1.08rem;
  margin: 0 0 8px;
}

.ept-dropzone p,
.ept-workspace__placeholder p,
.ept-panel p,
.ept-process p,
.ept-result p,
.ept-components p {
  color: var(--ept-muted);
  line-height: 1.52;
  margin: 0 0 16px;
}

.ept-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--ept-border);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: -2px -2px 16px;
  padding: 0 0 14px;
}

.ept-toolbar__meta strong,
.ept-toolbar__meta span {
  display: block;
}

.ept-toolbar__meta span {
  color: var(--ept-muted);
  font-size: 0.86rem;
  margin-top: 2px;
}

.ept-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ept-workspace__placeholder {
  align-items: center;
  background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 12px, #f2f5f9 12px, #f2f5f9 24px);
  border: 1px solid var(--ept-border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 300px;
  padding: 26px;
  text-align: center;
}

.ept-shell-regions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.ept-shell-region {
  background: var(--ept-surface-soft);
  border: 1px solid var(--ept-border);
  border-radius: 14px;
  padding: 10px;
}

.ept-shell-region strong,
.ept-shell-region span {
  display: block;
}

.ept-shell-region strong {
  font-size: 0.84rem;
}

.ept-shell-region span {
  color: var(--ept-muted);
  font-size: 0.76rem;
  margin-top: 3px;
}

.ept-schema-list {
  border-top: 1px solid var(--ept-border);
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-top: 12px;
}

.ept-schema-list div {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(90px, 0.8fr) minmax(0, 1.2fr);
}

.ept-schema-list dt {
  color: var(--ept-text);
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ept-schema-list dd {
  color: var(--ept-muted);
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ept-debug pre {
  background: #0f172a;
  border-radius: 14px;
  color: #dbeafe;
  font-size: 0.76rem;
  margin: 0;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

@media (max-width: 1040px) {
  .ept-core-map {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ept-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .ept-core-map,
  .ept-shell-regions {
    grid-template-columns: 1fr;
  }

  .ept-shell__topbar,
  .ept-shell__header,
  .ept-toolbar,
  .ept-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .ept-toolbar__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .ept-shell {
    border-radius: 18px;
    margin: 10px 0;
    padding: 12px;
  }

  .ept-shell__header {
    padding: 16px;
  }

  .ept-start,
  .ept-workspace,
  .ept-panel,
  .ept-process,
  .ept-result,
  .ept-debug,
  .ept-components {
    padding: 14px;
  }

  .ept-dropzone {
    min-height: 250px;
    padding: 18px;
  }

  .ept-button,
  .ept-button-group .ept-button,
  .ept-action-row .ept-button {
    width: 100%;
  }
}

.ept-session {
  padding: 18px;
}

.ept-session-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ept-session-stat,
.ept-session-meta > div {
  background: var(--ept-surface-soft);
  border: 1px solid var(--ept-border);
  border-radius: 14px;
  min-width: 0;
  padding: 10px 12px;
}

.ept-session-stat strong,
.ept-session-stat span,
.ept-session-meta strong,
.ept-session-meta span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ept-session-stat strong,
.ept-session-meta strong {
  color: var(--ept-text);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ept-session-stat span,
.ept-session-meta span {
  color: var(--ept-muted);
  font-size: 0.82rem;
  margin-top: 3px;
}

.ept-session-meta {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin-top: 10px;
}

.ept-session-actions {
  margin-top: 12px;
}

.ept-session-history-wrap {
  border-top: 1px solid var(--ept-border);
  margin-top: 14px;
  padding-top: 12px;
}

.ept-session-history-wrap h4 {
  font-size: 0.92rem;
  margin: 0 0 10px;
}

.ept-session-history {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ept-session-history li {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--ept-border);
  border-radius: 12px;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
}

.ept-session-history strong,
.ept-session-history span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ept-session-history strong {
  color: var(--ept-text);
  font-size: 0.82rem;
}

.ept-session-history span {
  color: var(--ept-muted);
  font-size: 0.75rem;
}

@media (max-width: 560px) {
  .ept-session-grid {
    grid-template-columns: 1fr;
  }
}

.ept-engine {
  padding: 18px;
}

.ept-engine-summary,
.ept-engine-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
  width: 100%;
}

.ept-engine-stat,
.ept-engine-list > div {
  background: #fff;
  border: 1px solid var(--ept-border);
  border-radius: 14px;
  min-width: 0;
  padding: 10px 12px;
  text-align: left;
}

.ept-engine-stat strong,
.ept-engine-stat span,
.ept-engine-list strong,
.ept-engine-list span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ept-engine-stat strong,
.ept-engine-list strong {
  color: var(--ept-text);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ept-engine-stat span,
.ept-engine-list span {
  color: var(--ept-muted);
  font-size: 0.82rem;
  margin-top: 3px;
}

.ept-engine-page-sizes {
  align-items: center;
  background: rgba(248, 250, 252, 0.88);
  border: 1px dashed var(--ept-border-strong);
  border-radius: 16px;
  color: var(--ept-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  min-height: 52px;
  padding: 12px;
  width: 100%;
}

@media (max-width: 560px) {
  .ept-engine-summary,
  .ept-engine-list {
    grid-template-columns: 1fr;
  }
}

/* CORE-10 layout contract, tool panel boundary, and production flow shell compatibility. */
.ept-layout-contract,
.ept-optional-components {
  padding: 18px;
}

.ept-layout-contract__grid,
.ept-tool-panel-boundary {
  display: grid;
  gap: 10px;
}

.ept-layout-contract__grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.ept-layout-contract__item,
.ept-tool-panel-boundary > div {
  background: var(--ept-surface-soft);
  border: 1px solid var(--ept-border);
  border-radius: 16px;
  min-width: 0;
  padding: 12px;
}

.ept-layout-contract__item strong,
.ept-layout-contract__item span,
.ept-tool-panel-boundary strong,
.ept-tool-panel-boundary span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ept-layout-contract__item strong,
.ept-tool-panel-boundary strong {
  color: var(--ept-text) !important;
  font-size: 0.86rem;
  font-weight: 900;
}

.ept-layout-contract__item span,
.ept-tool-panel-boundary span {
  color: var(--ept-muted) !important;
  font-size: 0.8rem;
  line-height: 1.45;
  margin-top: 5px;
}

.ept-tool-panel-boundary {
  margin: 14px 0;
}

.ept-panel[data-ept-region="panel"] {
  border-color: #cfe0ff;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.08);
}

.ept-side__dev-label {
  color: var(--ept-muted-strong) !important;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0 6px;
  text-transform: uppercase;
}

.ept-dev-details {
  border-top: 1px solid var(--ept-border);
  margin-top: 12px;
  padding-top: 12px;
}

.ept-dev-details summary {
  color: var(--ept-primary) !important;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 900;
}

.ept-dev-details[open] summary {
  margin-bottom: 10px;
}

.ept-optional-components .ept-page-scope {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .ept-layout-contract__grid {
    grid-template-columns: 1fr;
  }
}
