* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--t, #18181B);
  background:
    radial-gradient(circle at top right, rgba(180, 83, 9, 0.10), transparent 28%),
    linear-gradient(180deg, #F7F4EE 0%, #F3EFE6 100%);
  font-family: 'Outfit', sans-serif;
}

.page-shell {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(165, 142, 112, 0.18);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(24, 24, 27, 0.06);
  backdrop-filter: blur(12px);
}

/* ═══ HEADER ═══ */
.exp-header {
  padding: 28px 30px;
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}
.exp-header::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 220px; height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(180, 83, 9, 0.14), transparent 68%);
  pointer-events: none;
}
.exp-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.exp-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.exp-icon {
  font-size: 2em;
  width: 56px; height: 56px;
  background: rgba(250, 247, 241, 0.92);
  border: 1px solid rgba(165, 142, 112, 0.16);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.exp-name {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-family: 'Fraunces', serif;
}
.exp-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.status-chip {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-live { background: rgba(22,163,74,0.1); color: #16a34a; border: 1px solid rgba(22,163,74,0.2); }
.badge-beta { background: rgba(234,179,8,0.1); color: #ca8a04; border: 1px solid rgba(234,179,8,0.2); }
.badge-new { background: rgba(180,83,9,0.1); color: #B45309; border: 1px solid rgba(180,83,9,0.2); }
.badge-dev { background: rgba(124,58,237,0.1); color: #7c3aed; border: 1px solid rgba(124,58,237,0.2); }
.exp-link {
  font-size: 13px;
  color: #1D4ED8;
  text-decoration: none;
  word-break: break-all;
}
.exp-link:hover { text-decoration: underline; }
.exp-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* ═══ BUTTONS ═══ */
.ghost-btn {
  border: 1px solid rgba(165, 142, 112, 0.16);
  background: rgba(255,255,255,0.78);
  color: var(--t, #18181B);
  border-radius: 14px;
  padding: 10px 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .16s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ghost-btn:hover {
  border-color: rgba(180, 83, 9, 0.35);
  background: rgba(255, 251, 235, 0.6);
}
.run-btn {
  border: none;
  border-radius: 14px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #111827 0%, #374151 100%);
  color: white;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.14);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.run-btn:hover { transform: translateY(-1px); }

/* ═══ HEADER EDIT FORM ═══ */
.header-edit-form {
  display: none;
  margin-top: 18px;
  padding: 18px 20px;
  background: rgba(250, 247, 241, 0.92);
  border: 1px solid rgba(165, 142, 112, 0.14);
  border-radius: 16px;
}
.header-edit-form.show { display: block; }
.header-edit-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}
.header-edit-row label {
  font-size: 12px;
  font-weight: 700;
  color: #9A5D0B;
  min-width: 50px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.header-edit-row input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(165, 142, 112, 0.18);
  border-radius: 12px;
  color: var(--t, #18181B);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.header-edit-row input:focus {
  border-color: rgba(180, 83, 9, 0.45);
  box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.08);
}
.header-edit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ═══ CONTENT PANELS ═══ */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.panel {
  padding: 0;
  overflow: hidden;
}
.panel-head {
  padding: 16px 22px;
  border-bottom: 1px solid rgba(165, 142, 112, 0.14);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(250, 247, 241, 0.6);
}
.panel-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-body { padding: 22px; }

/* ═══ DESCRIPTION ═══ */
.desc-text {
  font-size: 14px;
  color: var(--m, #78716C);
  line-height: 1.8;
  white-space: pre-wrap;
}
.desc-text.empty-hint {
  color: var(--f, #C4C0B8);
  font-style: italic;
}
.desc-edit {
  width: 100%;
  padding: 14px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(165, 142, 112, 0.18);
  border-radius: 14px;
  color: var(--t, #18181B);
  font: inherit;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
  min-height: 100px;
  outline: none;
}
.desc-edit:focus {
  border-color: rgba(180, 83, 9, 0.45);
  box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.08);
}
.desc-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

/* ═══ VERSION TIMELINE ═══ */
.version-list {
  display: flex;
  flex-direction: column;
}
.v-entry {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(165, 142, 112, 0.1);
  position: relative;
}
.v-entry:last-child { border-bottom: none; }
.v-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 28px;
  flex-shrink: 0;
  padding-top: 3px;
}
.v-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #B45309;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.3);
}
.v-line {
  flex: 1;
  width: 2px;
  background: rgba(165, 142, 112, 0.18);
  margin-top: 4px;
}
.v-entry:last-child .v-line { display: none; }
.v-content { flex: 1; }
.v-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.v-version {
  font-size: 12px;
  font-weight: 700;
  color: #9A5D0B;
  background: rgba(255, 251, 235, 0.9);
  padding: 2px 10px;
  border-radius: 8px;
  border: 1px solid rgba(180, 83, 9, 0.18);
}
.v-date {
  font-size: 11px;
  color: var(--f, #C4C0B8);
}
.v-author {
  font-size: 11px;
  color: #1D4ED8;
  font-weight: 600;
}
.v-note {
  font-size: 13px;
  color: var(--m, #78716C);
  line-height: 1.6;
}
.v-delete {
  position: absolute;
  right: 0; top: 14px;
  color: var(--f, #C4C0B8);
  cursor: pointer;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.15s;
  background: none;
  border: none;
}
.v-entry:hover .v-delete { opacity: 1; }
.v-delete:hover { color: #B91C1C; }
.v-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--f, #C4C0B8);
  font-size: 14px;
}

/* ═══ ADD VERSION FORM ═══ */
.add-form {
  border-top: 1px solid rgba(165, 142, 112, 0.14);
  padding: 18px 22px;
  background: rgba(250, 247, 241, 0.5);
}
.add-form h4 {
  font-size: 11px;
  font-weight: 700;
  color: #9A5D0B;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.add-row input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(165, 142, 112, 0.18);
  border-radius: 12px;
  color: var(--t, #18181B);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.add-row input:focus {
  border-color: rgba(180, 83, 9, 0.45);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.08);
}
.add-row input::placeholder { color: var(--f, #C4C0B8); }
.add-note {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(165, 142, 112, 0.18);
  border-radius: 12px;
  color: var(--t, #18181B);
  font: inherit;
  font-size: 13px;
  outline: none;
  resize: none;
  min-height: 44px;
}
.add-note:focus {
  border-color: rgba(180, 83, 9, 0.45);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.08);
}
.add-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.panel-count {
  font-size: 11px;
  color: var(--m, #78716C);
}

@media (max-width: 768px) {
  .content-grid { grid-template-columns: 1fr; }
  .exp-header-top { flex-direction: column; }
  .exp-header, .panel-head, .panel-body, .add-form { padding: 16px; }
}