/* -----------------------------------------
   Base layout (NicheWorks compatibility)
----------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  color: #111827;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

.nw-header {
  text-align: center;
  padding: 28px 12px 12px;
}
.nw-header h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
}
.nw-desc {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.nw-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* ads */
.ad-slot {
  margin: 12px 0 16px;
  padding: 8px;
  border: 1px dashed #d4d4d4;
  min-height: 60px;
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
}

/* donate */
.nw-donate {
  text-align: center;
  margin: 12px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid #e5e7eb;
}
.nw-donate-text {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}
.nw-donate-links a {
  display: inline-block;
  margin: 0 6px;
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  text-decoration: none;
  font-size: 13px;
}

/* internal links */
.nw-links {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
}
.nw-links a {
  color: #4b5563;
  text-decoration: underline;
}

/* -----------------------------------------
   Form (Notion style)
----------------------------------------- */
.form-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 12px;
  margin: 4px auto 0;
  max-width: 720px;
}

.field {
  display: flex;
  flex-direction: column;
}

label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

input,
textarea,
select {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  background: #ffffff;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #2563eb;
}

select {
  max-width: 280px;
}

.form-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-label {
  margin: 0;
  font-size: 14px;
  color: #374151;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.radio-group label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #111827;
}
.radio-group input {
  width: auto;
  margin-top: 2px;
}

.action-row {
  display: flex;
  justify-content: center;
  padding: 12px 0 0;
}

/* generate button */
.btn-generate {
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: auto;
  margin: 0 auto;
  display: block;
}
.btn-generate:hover {
  background: #1d4ed8;
}

/* -----------------------------------------
   Output (Medium style)
----------------------------------------- */
.result-container {
  margin-top: 28px;
  margin-bottom: 40px;
}
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.result-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.btn-copy {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.btn-copy:hover {
  background: #f3f4f6;
}

.cl-output {
  max-width: 640px;
  margin: 16px auto 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.65;
  color: #111;
}

/* paragraphs spacing */
.cl-output p {
  margin: 18px 0;
}

/* footer */
.nw-footer {
  text-align: center;
  padding: 32px 0 48px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}
.nw-footer a {
  color: #4b5563;
  text-decoration: underline;
}

/* -----------------------------------------
   Responsive
----------------------------------------- */

/* 320–480px */
@media (max-width: 480px) {
  .nw-main { padding: 0 12px 40px; }
  .form-container { padding: 0 12px; }
  .radio-group { flex-direction: column; }
  .cl-output { max-width: 100%; font-size: 15.5px; line-height: 1.68; }
}

/* 769+ PC */
@media (min-width: 769px) {
  .radio-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
  }
  .action-row { padding-top: 16px; }
}
