body.ppt-page {
  background: #f6f3ed;
}

.ppt-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 20px 40px;
}

.ppt-topbar {
  margin-bottom: 16px;
}

.ppt-alert {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #e0c89a;
  background: #fff8e8;
  color: #6a4b12;
  font-size: 14px;
  line-height: 1.5;
}

.ppt-alert code {
  font-size: 12px;
}

.ppt-layout {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.ppt-panel {
  background: var(--paper, #fff);
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--shadow, 0 8px 24px rgba(0, 0, 0, 0.06));
  display: grid;
  gap: 10px;
}

.ppt-panel label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #39414a;
}

.ppt-panel input,
.ppt-panel select,
.ppt-panel textarea {
  font-weight: 400;
}

.ppt-wide {
  grid-column: 1 / -1;
}

.ppt-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ppt-muted {
  color: var(--muted, #6b7280);
  font-size: 13px;
}

.ppt-hint {
  margin: 0;
  line-height: 1.5;
}

.ppt-preview-panel {
  min-height: 520px;
}

.ppt-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ppt-preview-head h3 {
  margin: 0;
}

.ppt-preview-frame {
  width: 100%;
  min-height: 360px;
  height: min(52vh, 520px);
  border: 1px solid var(--line, #ddd);
  border-radius: 8px;
  background: #111;
}

.ppt-deck-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.ppt-deck-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line, #ddd);
  border-radius: 8px;
  background: #fafaf8;
}

.ppt-deck-item strong {
  display: block;
  font-size: 14px;
}

.ppt-deck-item small {
  color: var(--muted, #6b7280);
}

.ppt-deck-item .ppt-deck-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ppt-edit-dialog {
  width: min(720px, 96vw);
  max-height: 90vh;
  border: none;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.ppt-edit-dialog::backdrop {
  background: rgba(10, 10, 10, 0.45);
}

.ppt-edit-form {
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-height: 90vh;
}

.ppt-edit-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--line, #ddd);
}

.ppt-edit-head h3 {
  margin: 0 0 4px;
}

.ppt-edit-body {
  overflow: auto;
  padding: 12px 18px;
  display: grid;
  gap: 14px;
}

.ppt-edit-slide {
  border: 1px solid var(--line, #ddd);
  border-radius: 8px;
  padding: 12px;
  background: #fafaf8;
  display: grid;
  gap: 10px;
}

.ppt-edit-slide-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.ppt-edit-slide-head strong {
  font-size: 14px;
}

.ppt-edit-slide-head small {
  color: var(--muted, #6b7280);
  font-size: 12px;
}

.ppt-edit-field label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
}

.ppt-edit-field textarea {
  min-height: 2.6em;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
}

.ppt-edit-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--line, #ddd);
}

.ppt-edit-foot-actions {
  display: flex;
  gap: 8px;
}

.ppt-revise-dialog {
  width: min(560px, 96vw);
  max-height: 88vh;
  border: none;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.ppt-revise-dialog::backdrop {
  background: rgba(10, 10, 10, 0.45);
}

.ppt-revise-shell {
  display: grid;
  grid-template-rows: auto minmax(120px, 1fr) auto;
  max-height: 88vh;
}

.ppt-revise-chat {
  overflow: auto;
  padding: 12px 18px;
  display: grid;
  gap: 10px;
  background: #f3f4f6;
  min-height: 160px;
  max-height: 42vh;
}

.ppt-revise-msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.ppt-revise-msg.user {
  justify-self: end;
  background: #1d4ed8;
  color: #fff;
}

.ppt-revise-msg.assistant {
  justify-self: start;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #111827;
}

.ppt-revise-msg.system {
  justify-self: center;
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  padding: 4px;
}

.ppt-revise-foot {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--line, #ddd);
  display: grid;
  gap: 10px;
}

.ppt-revise-input-wrap {
  display: grid;
  gap: 6px;
}

.ppt-revise-input-wrap textarea {
  font-weight: 400;
  resize: vertical;
}

.ppt-revise-foot-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ppt-deck-actions button[data-repair-deck] {
  border-color: #0d9488;
  color: #0f766e;
}

@media (max-width: 960px) {
  .ppt-layout {
    grid-template-columns: 1fr;
  }
}
