@charset "UTF-8";

.compose-page {
  max-width: 1400px;
  padding: 40px 24px 64px;
}

/* Summary */
.compose-quick-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.compose-summary-card {
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #e4ebf5;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.compose-summary-card span {
  display: block;
  margin-bottom: 8px;
  color: #718096;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.compose-summary-card strong {
  display: block;
  color: #162133;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.45;
}

/* Main */
.compose-main-card {
  padding: 30px;
  border-radius: 28px;
}

.compose-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.compose-card-head h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 1.4rem;
  font-weight: 800;
}

.compose-card-head p {
  margin: 0;
  color: #64748b;
  font-size: 0.96rem;
  line-height: 1.7;
}

.compose-head-actions {
  margin-top: 0;
}

.compose-config-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.compose-config-panel {
  min-width: 0;
}

.compose-step-box {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid #e5ebf4;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.compose-step-box + .compose-step-box {
  margin-top: 22px;
}

.compose-step-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.compose-step-title span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  flex-shrink: 0;
}

.compose-step-title h3 {
  margin: 0;
  color: #111827;
  font-size: 1.08rem;
  font-weight: 800;
}

/* Fields */
.compose-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.compose-field {
  min-width: 0;
}

.compose-field .utility-input {
  width: 100%;
  min-height: 52px;
  box-sizing: border-box;
  border-radius: 16px;
  border: 1px solid #dce5f2;
  background: #ffffff;
  font-size: 0.95rem;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.compose-field .utility-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

/* Service Cards - Compact */
.compose-service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  overflow: visible;
}

.compose-service-toggle {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: auto;
  box-sizing: border-box;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid #dbe5f3;
  background: #f8fbff;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.compose-service-toggle:hover {
  transform: translateY(-2px);
  border-color: #9bbcff;
  background: #f2f7ff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.compose-service-toggle::before {
  display: none;
}

.compose-service-toggle input[type="checkbox"] {
  position: static;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #2563eb;
}

.compose-service-toggle span {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.compose-service-toggle strong {
  display: block;
  margin-bottom: 4px;
  color: #111827;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.compose-service-toggle em {
  display: block;
  color: #64748b;
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1.45;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.compose-service-toggle:has(input:checked) {
  border-color: #2563eb;
  background: #eef5ff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.compose-service-toggle:has(input:checked) strong {
  color: #1d4ed8;
}

/* Side */
.compose-preset-panel {
  position: sticky;
  top: 90px;
  min-width: 0;
}

.compose-side-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid #e5ebf4;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.compose-side-card + .compose-side-card {
  margin-top: 18px;
}

.compose-side-card h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 1.02rem;
  font-weight: 800;
}

.compose-side-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.93rem;
  line-height: 1.7;
}

.compose-guide-card ol {
  margin: 16px 0 0;
  padding-left: 18px;
  color: #475569;
  font-size: 0.93rem;
  line-height: 1.85;
}

/* Preset */
.compose-preset-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.compose-preset-btn {
  display: block;
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #dbe5f3;
  background: #f8fbff;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.compose-preset-btn:hover {
  transform: translateY(-2px);
  border-color: #bfd3f7;
  background: #eef5ff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

.compose-preset-btn strong {
  display: block;
  margin-bottom: 6px;
  color: #162033;
  font-size: 0.95rem;
  font-weight: 800;
}

.compose-preset-btn span {
  display: block;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.55;
}

/* Alert */
.compose-alert {
  display: none;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 18px;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.7;
}

.compose-alert.is-show {
  display: block;
}

.compose-alert.is-warning {
  border: 1px solid #f6d7aa;
  background: #fff8ea;
  color: #9a5a00;
}

.compose-alert.is-success {
  border: 1px solid #cfead8;
  background: #edf8ef;
  color: #166534;
}

/* Output */
.compose-output-card {
  margin-top: 28px;
  padding: 28px;
  border-radius: 28px;
}

.compose-output-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.compose-output-head h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 1.28rem;
  font-weight: 800;
}

.compose-output-head p {
  margin: 0;
  color: #64748b;
  font-size: 0.94rem;
  line-height: 1.7;
}

.compose-output-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Tabs */
.compose-tab-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.compose-tab-btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #dbe5f3;
  background: #f8fbff;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.compose-tab-btn:hover {
  background: #eef5ff;
  border-color: #bfd3f7;
}

.compose-tab-btn.is-active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.compose-tab-panel {
  display: none;
}

.compose-tab-panel.is-active {
  display: block;
}

/* Textarea */
.compose-textarea {
  min-height: 420px;
  border-radius: 22px;
  border: 1px solid #dbe5f3;
  background: #0f172a;
  color: #e2e8f0;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  white-space: pre;
}

.compose-textarea-small {
  min-height: 260px;
}

.compose-textarea-tiny {
  min-height: 140px;
}

.compose-hidden-source {
  display: none;
}

/* README */
.compose-readme-shell {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid #e5ebf4;
  background: #ffffff;
}

.compose-readme-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid #e9eef6;
  background: linear-gradient(180deg, #fbfcff 0%, #f7f9fd 100%);
  flex-wrap: wrap;
}

.compose-readme-head-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.compose-readme-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: #eef4ff;
  font-size: 1.2rem;
}

.compose-readme-meta strong {
  display: block;
  margin-bottom: 4px;
  color: #111827;
  font-size: 1rem;
  font-weight: 800;
}

.compose-readme-meta span {
  display: block;
  color: #64748b;
  font-size: 0.9rem;
}

.compose-readme-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.compose-readme-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #eef2f8;
  border: 1px solid #dde5f0;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
}

.compose-readme-badge-primary {
  background: #e8f0ff;
  border-color: #cfe0ff;
  color: #1d4ed8;
}

.compose-readme-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid #e9eef6;
}

.compose-readme-summary-item {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #e4ebf5;
  background: #f8fbff;
}

.compose-readme-summary-label {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.compose-readme-summary-value {
  display: block;
  color: #172033;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.5;
}

.compose-readme-summary-value.is-on {
  color: #166534;
}

.compose-readme-summary-value.is-off {
  color: #9a3412;
}

.compose-readme-preview {
  padding: 24px;
  background: #fbfcfe;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.8;
}

.compose-readme-preview h1,
.compose-readme-preview h2,
.compose-readme-preview h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-weight: 800;
  line-height: 1.35;
}

.compose-readme-preview h1 {
  margin-bottom: 18px;
  font-size: 1.5rem;
}

.compose-readme-preview h2 {
  margin-top: 26px;
  padding-top: 8px;
  border-top: 1px solid #e5ebf4;
  font-size: 1.16rem;
}

.compose-readme-preview p {
  margin: 0 0 12px;
  color: #475569;
}

.compose-readme-preview ul {
  margin: 0 0 14px 20px;
  padding: 0;
}

.compose-readme-preview li {
  margin: 0 0 6px;
  color: #475569;
}

.compose-readme-preview code {
  padding: 2px 7px;
  border-radius: 8px;
  background: #eef3fb;
  color: #183153;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.92em;
}

.compose-readme-preview pre {
  margin: 14px 0 16px;
  padding: 20px;
  overflow-x: auto;
  border-radius: 18px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.7;
}

.compose-readme-preview pre code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

/* Help */
.help-panel {
  margin-top: 34px;
}

.help-panel > h2 {
  margin-bottom: 18px;
  color: #111827;
  font-size: 1.2rem;
  font-weight: 800;
}

.help-box {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid #e5ebf4;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.help-box + .help-box {
  margin-top: 16px;
}

.help-box h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 1rem;
  font-weight: 800;
}

.help-box p {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* Responsive */
@media (max-width: 1200px) {
  .compose-config-layout {
    grid-template-columns: 1fr;
  }

  .compose-preset-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .compose-quick-summary,
  .compose-readme-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .compose-page {
    padding: 24px 14px 48px;
  }

  .compose-main-card,
  .compose-output-card {
    padding: 20px;
    border-radius: 22px;
  }

  .compose-step-box,
  .compose-side-card,
  .help-box {
    padding: 18px;
    border-radius: 20px;
  }

  .compose-field-grid,
  .compose-quick-summary,
  .compose-readme-summary,
  .compose-service-grid {
    grid-template-columns: 1fr;
  }

  .compose-output-actions {
    width: 100%;
  }

  .compose-output-actions .utility-btn {
    flex: 1 1 auto;
  }

  .compose-tab-btn {
    width: 100%;
    justify-content: center;
  }

  .compose-textarea {
    min-height: 320px;
    font-size: 0.86rem;
  }

  .compose-readme-preview {
    padding: 18px;
  }

  .compose-readme-preview pre {
    padding: 16px;
    border-radius: 16px;
    font-size: 0.84rem;
  }
}