#lw-planner-app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
  color: #0f172a;
  box-sizing: border-box;
}

#lw-planner-app,
#lw-planner-app * {
  box-sizing: border-box;
}

.lw-main {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 24px;
  align-items: start;
}

.lw-chat,
.lw-draft {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  height: 680px;
  border: 1px solid #dbe4ee;
}

.lw-chat {
  color: #0f172a;
  display: flex;
  flex-direction: column;
}

.lw-draft {
  color: #0f172a;
  display: flex;
  flex-direction: column;
}

.lw-chat h2,
.lw-draft h2 {
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.2;
  color: #183b56;
  flex: 0 0 auto;
}

#lw-chat-log {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin-bottom: 18px;
  padding-right: 6px;
}

.lw-msg {
  border-radius: 16px;
  padding: 14px 16px;
  line-height: 1.6;
  font-size: 16px;
  flex: 0 0 auto;
}

.lw-msg-user {
  background: #e8f7f3;
  border: 1px solid #b9eadf;
  color: #0f172a;
}

.lw-msg-ai {
  background: #f4f7fb;
  border: 1px solid #dbe4ee;
  color: #0f172a;
}

#lw-chat-input {
  width: 100%;
  min-height: 96px;
  max-height: 160px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 14px;
  color: #0f172a;
  background: #ffffff;
  flex: 0 0 auto;
}

#lw-chat-input::placeholder {
  color: #64748b;
}

#lw-send {
  display: inline-block;
  align-self: flex-start;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  background: #0f766e;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

#lw-send:hover {
  opacity: 0.92;
}

#lw-draft-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
}

.lw-section {
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  padding: 18px 20px;
  color: #0f172a;
  flex: 0 0 auto;
}

.lw-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.lw-section-header h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  color: #183b56;
}

.lw-section-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lw-action {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #183b56;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.lw-action:hover {
  background: #eef6ff;
  border-color: #94a3b8;
}

.lw-section p,
.lw-section li {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #334155;
}

.lw-section ul {
  margin: 0;
  padding-left: 22px;
  color: #334155;
}

.lw-manual-edit {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lw-section-editor {
  width: 100%;
  min-height: 140px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.6;
  color: #0f172a;
  background: #ffffff;
  resize: vertical;
  font-family: inherit;
}

.lw-section-editor:focus,
#lw-chat-input:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.lw-section-editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.lw-save-edit {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

.lw-save-edit:hover {
  background: #0d675f;
  border-color: #0d675f;
}

.lw-cancel-edit {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}

.lw-cancel-edit:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

#lw-chat-log::-webkit-scrollbar,
#lw-draft-content::-webkit-scrollbar {
  width: 10px;
}

#lw-chat-log::-webkit-scrollbar-track,
#lw-draft-content::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 999px;
}

#lw-chat-log::-webkit-scrollbar-thumb,
#lw-draft-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

#lw-chat-log::-webkit-scrollbar-thumb:hover,
#lw-draft-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

@media (max-width: 1024px) {
  .lw-main {
    grid-template-columns: 1fr;
  }

  .lw-chat,
  .lw-draft {
    height: 620px;
  }
}