.star-generator {
  --star-brand: #6D01BE;
  --star-brand-dark: #4B0085;
  --star-brand-soft: rgba(109, 1, 190, 0.08);
  --star-brand-border: rgba(109, 1, 190, 0.2);
  --star-text: #2a2a2a;
  --star-muted: #666;
  --star-subtle: #888;
  --star-border: #e3e3e8;
  --star-surface: #fff;
  --star-surface-soft: #f7f7f9;
  --star-required: #dc3139;
  color: var(--star-text);
  font-family: "Roboto", "Noto Sans TC", sans-serif, "微軟正黑體";
}

.star-generator,
.star-generator * {
  box-sizing: border-box;
}

.star-generator [hidden] {
  display: none !important;
}

.star-generator button,
.star-generator input,
.star-generator select,
.star-generator textarea {
  font: inherit;
}

.star-generator button,
.star-generator a {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.star-generator h1,
.star-generator h2,
.star-generator h3,
.star-generator p {
  color: inherit;
}

.star-titlebar {
  margin-bottom: 0 !important;
  padding: 48px 0 46px;
  border-bottom: 1px solid var(--star-border);
}

.star-titlebar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 56px;
  align-items: center;
}

.star-product-mark,
.star-section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--star-brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.star-product-mark {
  width: fit-content;
  margin-bottom: 14px;
  padding: 0;
}

.star-product-mark i {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--star-brand-soft);
  font-size: 15px;
}

.star-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.star-info-trigger {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #d8d8de;
  border-radius: 4px;
  background: #fff;
  color: #666;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.star-info-trigger:hover {
  border-color: var(--star-brand);
  background: var(--star-brand-soft);
  color: var(--star-brand);
}

.star-info-trigger:focus-visible {
  outline: 3px solid var(--star-brand-border);
  outline-offset: 2px;
}

.star-titlebar-copy h1 {
  margin: 0;
  color: var(--star-text);
  font-size: clamp(36px, 4vw, 46px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.star-titlebar-copy > p {
  max-width: 620px;
  margin: 15px 0 0;
  color: var(--star-muted);
  font-size: 18px;
  line-height: 1.8;
}

.star-titlebar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.star-generator .button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
}

.star-generator button.button.gray {
  border: 1px solid #d8d8de;
  background: #fff;
  color: #555;
  box-shadow: none;
}

.star-generator button.button.gray:hover {
  border-color: var(--star-brand);
  background: var(--star-brand-soft);
  color: var(--star-brand);
}

.star-trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 22px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.star-trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--star-subtle);
  font-size: 13px;
  line-height: 20px;
}

.star-trust-list i {
  color: var(--star-brand);
  font-size: 15px;
}

.star-preview-card {
  padding: 26px;
  border: 1px solid var(--star-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(26, 20, 31, 0.08);
}

.star-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.star-preview-head span,
.star-preview-result > span {
  color: var(--star-subtle);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.star-preview-head small {
  color: #999;
  font-size: 12px;
}

.star-preview-card > p {
  margin: 14px 0 0;
  color: #555;
  font-size: 16px;
  line-height: 1.7;
}

.star-preview-divider {
  position: relative;
  height: 36px;
  margin: 12px 0;
  color: var(--star-brand);
  text-align: center;
}

.star-preview-divider::before {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--star-border);
  content: "";
}

.star-preview-divider i {
  position: relative;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--star-brand-border);
  border-radius: 50%;
  background: #fff;
}

.star-preview-result {
  padding: 18px 20px 20px;
  border-left: 3px solid var(--star-brand);
  border-radius: 0 4px 4px 0;
  background: var(--star-brand-soft);
}

.star-preview-result > span {
  color: var(--star-brand);
}

.star-preview-result p {
  margin: 8px 0 0;
  color: var(--star-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.75;
}

.star-product-section {
  padding: 56px 0 72px;
}

.star-builder-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.star-builder-heading h2,
.star-takeaway-heading h2,
.star-result-summary h2 {
  margin: 8px 0 0;
  color: var(--star-text);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
}

.star-builder-heading p,
.star-result-summary > div:first-child > p {
  margin: 8px 0 0;
  color: var(--star-muted);
  font-size: 15px;
  line-height: 1.7;
}

.star-save-status {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--star-subtle);
  font-size: 13px;
  opacity: 0;
}

.star-save-status.is-visible {
  display: inline-flex;
  border-color: #cde7d2;
  background: #edf7ef;
  color: #2e7d32;
  opacity: 1;
}

.star-stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--star-border);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #fff;
  list-style: none;
  scroll-margin-top: 96px;
}

.star-stepper li {
  position: relative;
  min-height: 82px;
  padding: 0;
  color: #888;
}

.star-stepper li + li {
  border-left: 1px solid var(--star-border);
}

.star-stepper li > button {
  display: flex;
  width: 100%;
  min-height: 82px;
  align-items: center;
  gap: 13px;
  padding: 17px 22px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.star-stepper li.is-unlocked > button {
  cursor: pointer;
}

.star-stepper li.is-unlocked:not(.is-active) > button:hover {
  background: rgba(109, 1, 190, 0.04);
}

.star-stepper li > button:focus-visible {
  position: relative;
  z-index: 2;
  outline: 3px solid var(--star-brand-border);
  outline-offset: -3px;
}

.star-stepper li > button:disabled {
  cursor: not-allowed;
  background: var(--star-surface-soft);
  color: #999;
  opacity: 1;
}

.star-stepper li::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.star-stepper li > button > span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9d9df;
  border-radius: 50%;
  background: #fff;
  color: #888;
  font-size: 14px;
  font-weight: 700;
}

.star-stepper li button div {
  display: grid;
  gap: 2px;
}

.star-stepper li b {
  color: #555;
  font-size: 15px;
}

.star-stepper li small {
  color: #999;
  font-size: 12px;
}

.star-stepper li.is-active {
  background: var(--star-brand-soft);
}

.star-stepper li.is-active::after {
  background: var(--star-brand);
}

.star-stepper li.is-active button > span {
  border-color: var(--star-brand);
  background: var(--star-brand);
  color: #fff;
}

.star-stepper li.is-active b {
  color: var(--star-brand);
}

.star-stepper li.is-unlocked:not(.is-active) button > span {
  border-color: #bdbdc5;
  color: #666;
}

.star-stepper li:not(.is-unlocked) b,
.star-stepper li:not(.is-unlocked) small {
  color: #aaa;
}

.star-builder-card {
  margin: 0;
  overflow: visible;
  border: 1px solid var(--star-border);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 6px 22px rgba(31, 26, 35, 0.06);
}

.star-builder-card .star-panel > .headline {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--star-border);
  background: #fff;
}

.star-builder-card .headline h3 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--star-text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.star-builder-card .headline h3 i {
  color: var(--star-brand);
  font-size: 20px;
}

.star-step-caption {
  color: var(--star-subtle);
  font-size: 12px;
  font-weight: 600;
}

.star-builder-card .star-panel > .content {
  padding: 26px;
}

.star-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.star-field {
  display: grid;
  gap: 8px;
  margin: 0;
}

.star-field > span,
.star-skill-field legend {
  color: #444;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.star-field > span b {
  margin-left: 5px;
  color: var(--star-required);
  font-size: 12px;
}

.star-field > span i {
  margin-left: 5px;
  color: #999;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
}

.star-field > small,
.star-part > small {
  color: #888;
  font-size: 12px;
  line-height: 1.55;
}

.star-field input,
.star-field select,
.star-field textarea {
  width: 100%;
  margin: 0;
  border: 1px solid #d8d8de;
  border-radius: 4px;
  background: #fff;
  color: var(--star-text);
  box-shadow: 0 1px 3px rgba(20, 18, 23, 0.03);
  outline: none;
}

.star-field input,
.star-field select {
  min-height: 48px;
  padding: 0 14px;
}

.star-field textarea {
  min-height: 130px;
  padding: 13px 14px;
  line-height: 1.7;
  resize: vertical;
}

.star-field--large textarea {
  min-height: 190px;
}

.star-field input:focus,
.star-field select:focus,
.star-field textarea:focus {
  border-color: var(--star-brand);
  box-shadow: 0 0 0 3px var(--star-brand-soft);
}

.star-field input::placeholder,
.star-field textarea::placeholder {
  color: #aaa;
}

.star-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.star-skill-field {
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.star-skill-options {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 11px;
}

.star-skill-options button {
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid #d8d8de;
  border-radius: 4px;
  background: #fff;
  color: #666;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.star-skill-options button:hover,
.star-skill-options button.is-selected {
  border-color: var(--star-brand);
  background: var(--star-brand-soft);
  color: var(--star-brand);
}

.star-skill-options button.is-selected::before {
  margin-right: 6px;
  content: "✓";
  font-weight: 700;
}

.star-writing-guide {
  padding: 24px;
  border: 1px solid var(--star-brand-border);
  border-radius: 6px;
  background: var(--star-brand-soft);
}

.star-guide-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--star-brand);
  color: #fff;
  font-size: 18px;
}

.star-writing-guide h3 {
  margin: 15px 0 0;
  color: var(--star-text);
  font-size: 18px;
  font-weight: 600;
}

.star-writing-guide > p {
  margin: 8px 0 0;
  color: var(--star-muted);
  font-size: 13px;
  line-height: 1.65;
}

.star-writing-guide ol {
  display: grid;
  gap: 14px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.star-writing-guide li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.star-writing-guide li > span {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--star-brand-border);
  border-radius: 50%;
  background: #fff;
  color: var(--star-brand);
  font-size: 12px;
  font-weight: 700;
}

.star-writing-guide li div {
  display: grid;
  gap: 2px;
}

.star-writing-guide li b {
  color: #444;
  font-size: 13px;
}

.star-writing-guide li small {
  color: #777;
  font-size: 12px;
  line-height: 1.5;
}

.star-inline-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--star-brand);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.star-inline-action:hover {
  color: var(--star-brand-dark);
  text-decoration: underline;
}

.star-writing-guide .star-inline-action {
  margin-top: 20px;
}

.star-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--star-border);
}

.star-panel-actions > span {
  margin-right: auto;
  color: #888;
  font-size: 12px;
  line-height: 1.5;
}

.star-panel-intro {
  margin-bottom: 22px;
  padding: 14px 16px;
  border-left: 3px solid var(--star-brand);
  background: var(--star-brand-soft);
}

.star-panel-intro p {
  margin: 0;
  color: #555;
  font-size: 14px;
  line-height: 1.7;
}

.star-grid-four {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.star-part {
  position: relative;
  padding: 20px;
  border: 1px solid var(--star-border);
  border-radius: 6px;
  background: #fff;
}

.star-part:focus-within {
  border-color: var(--star-brand-border);
  box-shadow: 0 0 0 3px var(--star-brand-soft);
}

.star-part > span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.star-part > span b {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 4px;
  background: var(--star-brand);
  color: #fff;
  font-size: 14px;
}

.star-part > span strong {
  color: #3f3f44;
  font-size: 15px;
}

.star-part textarea {
  min-height: 132px;
  margin-top: 4px;
  border-color: #e0e0e4;
  background: var(--star-surface-soft);
}

.star-guidance-callout {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--star-brand-border);
  border-radius: 6px;
  background: var(--star-brand-soft);
}

.star-guidance-callout > i {
  margin-top: 2px;
  color: var(--star-brand);
  font-size: 20px;
}

.star-guidance-callout b {
  color: #444;
  font-size: 14px;
}

.star-guidance-callout p {
  margin: 3px 0 0;
  color: #666;
  font-size: 13px;
  line-height: 1.65;
}

.star-form-message {
  position: sticky;
  z-index: 8;
  bottom: 18px;
  max-width: calc(100% - 60px);
  margin: -10px auto 22px;
  padding: 12px 16px;
  border: 1px solid #eed39b;
  border-radius: 4px;
  background: #fff8e8;
  color: #8a5a00;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(31, 26, 35, 0.12);
}

.star-form-message[data-type="error"] {
  border-color: #f3c4bf;
  background: #fff1f0;
  color: var(--star-required);
}

.star-result-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 24px;
}

.star-score {
  display: grid;
  width: min(340px, 100%);
  min-width: 300px;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--star-brand-border);
  border-radius: 6px;
  background: var(--star-brand-soft);
}

.star-score-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.star-score-heading b {
  color: #444;
  font-size: 14px;
}

.star-score-heading strong {
  color: var(--star-brand);
  font-size: 20px;
  line-height: 1;
}

.star-score-heading small {
  color: #888;
  font-size: 11px;
  font-weight: 500;
}

.star-score-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(109, 1, 190, 0.14);
}

.star-score-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--star-brand);
  transition: width 0.35s ease;
}

.star-score > p {
  margin: 0;
  color: #777;
  font-size: 12px;
  line-height: 1.5;
}

.star-result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.65fr);
  gap: 22px;
}

.star-output-card,
.star-next-card {
  overflow: hidden;
  border: 1px solid var(--star-border);
  border-radius: 6px;
  background: #fff;
}

.star-output-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--star-border);
  background: #f2f2f5;
}

.star-output-tabs button {
  display: inline-flex;
  min-height: 62px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid #dedee4;
  border-radius: 5px;
  background: #fff;
  color: #777;
  text-align: left;
  cursor: pointer;
}

.star-output-tabs button > i {
  font-size: 18px;
}

.star-output-tabs button > span {
  display: grid;
  gap: 2px;
}

.star-output-tabs button b {
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.star-output-tabs button small {
  color: #999;
  font-size: 10px;
  line-height: 1.35;
}

.star-output-tabs button.is-active {
  border-color: var(--star-brand);
  background: var(--star-brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(109, 1, 190, 0.16);
}

.star-output-tabs button.is-active small {
  color: rgba(255, 255, 255, 0.78);
}

.star-output-panel {
  padding: 24px;
}

.star-output-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #888;
  font-size: 11px;
}

.star-output-meta span:last-child {
  color: var(--star-brand);
  font-weight: 600;
  text-align: right;
}

.star-output-text {
  min-height: 130px;
  margin: 16px 0 20px;
  padding: 20px;
  border-left: 3px solid var(--star-brand);
  border-radius: 0 4px 4px 0;
  background: var(--star-brand-soft);
  color: #333;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.9;
  white-space: pre-line;
}

.star-output-text--long {
  min-height: 200px;
  font-size: 15px;
  font-weight: 400;
}

.star-copy-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--star-brand);
  border-radius: 4px;
  background: #fff;
  color: var(--star-brand);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.star-copy-button:hover {
  background: var(--star-brand);
  color: #fff;
}

.star-insight-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.insight-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--star-border);
  border-radius: 4px;
}

.insight-item > span {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.insight-item p {
  margin: 0;
  color: #555;
  font-size: 13px;
  line-height: 1.6;
}

.insight-item--good {
  border-color: #cde7d2;
  background: #edf7ef;
}

.insight-item--good > span {
  background: #2e7d32;
  color: #fff;
}

.insight-item--warn {
  border-color: #eed39b;
  background: #fff8e8;
}

.insight-item--warn > span {
  background: #8a5a00;
  color: #fff;
}

.star-next-card {
  padding: 22px;
  background: var(--star-surface-soft);
}

.star-next-card h3 {
  margin: 9px 0 0;
  color: #333;
  font-size: 18px;
  line-height: 1.5;
}

.star-next-card > p {
  margin: 8px 0 18px;
  color: #777;
  font-size: 13px;
  line-height: 1.65;
}

.star-next-card > a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--star-border);
  color: inherit;
}

.star-next-card > a:hover {
  color: var(--star-brand);
}

.star-next-card > a > i {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--star-brand-soft);
  color: var(--star-brand);
}

.star-next-card > a div {
  display: grid;
  gap: 2px;
}

.star-next-card > a b {
  color: #444;
  font-size: 13px;
}

.star-next-card > a small {
  color: #888;
  font-size: 11px;
  line-height: 1.45;
}

.star-next-card > a > span {
  color: var(--star-brand);
  font-size: 16px;
}

.star-takeaway {
  margin-top: 52px;
  padding-top: 44px;
  border-top: 1px solid var(--star-border);
}

.star-takeaway-heading {
  text-align: center;
}

.star-takeaway-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.star-takeaway-grid article {
  display: flex;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--star-border);
  border-radius: 6px;
  background: #fff;
}

.star-takeaway-grid article > i {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--star-brand-soft);
  color: var(--star-brand);
  font-size: 19px;
}

.star-takeaway-grid h3 {
  margin: 0;
  color: #444;
  font-size: 16px;
  font-weight: 600;
}

.star-takeaway-grid p {
  margin: 6px 0 0;
  color: #777;
  font-size: 13px;
  line-height: 1.65;
}

body.star-modal-open {
  overflow: hidden;
}

.star-modal {
  position: fixed;
  z-index: 10010;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
}

.star-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 24, 31, 0.66);
}

.star-modal-dialog {
  position: relative;
  display: flex;
  width: min(760px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(22, 16, 27, 0.24);
  outline: none;
}

.star-modal-dialog--compact {
  width: min(660px, 100%);
}

.star-modal-dialog > header,
.star-modal-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
}

.star-modal-dialog > header {
  border-bottom: 1px solid var(--star-border);
}

.star-modal-dialog > header > div {
  min-width: 0;
}

.star-modal-dialog > header h2 {
  margin: 5px 0 0;
  color: var(--star-text);
  font-size: 22px;
  line-height: 1.4;
}

.star-modal-close {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--star-border);
  border-radius: 50%;
  background: #fff;
  color: #666;
  cursor: pointer;
}

.star-modal-close:hover {
  border-color: var(--star-brand);
  color: var(--star-brand);
}

.star-modal-body {
  display: grid;
  gap: 18px;
  padding: 22px 24px;
  overflow-y: auto;
  background: var(--star-surface-soft);
}

.star-info-intro {
  margin: 0;
  color: #555;
  font-size: 14px;
  line-height: 1.7;
}

.star-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.star-info-grid article {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px;
  border: 1px solid var(--star-border);
  border-radius: 6px;
  background: #fff;
}

.star-info-grid article > span {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--star-brand-soft);
  color: var(--star-brand);
  font-size: 13px;
  font-weight: 700;
}

.star-info-grid article b {
  color: #444;
  font-size: 13px;
}

.star-info-grid article p {
  margin: 3px 0 0;
  color: #707075;
  font-size: 12px;
  line-height: 1.55;
}

.star-info-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--star-brand-border);
  border-radius: 4px;
  background: var(--star-brand-soft);
  color: #5f5565;
  font-size: 12px;
  line-height: 1.6;
}

.star-info-note i {
  margin-top: 2px;
  color: var(--star-brand);
}

.star-sample-raw,
.star-sample-output {
  padding: 16px 18px;
  border: 1px solid var(--star-border);
  border-radius: 6px;
  background: #fff;
}

.star-sample-raw > b,
.star-sample-output > b {
  color: var(--star-brand);
  font-size: 13px;
}

.star-sample-raw p,
.star-sample-output p {
  margin: 7px 0 0;
  color: #505055;
  font-size: 14px;
  line-height: 1.7;
}

.star-sample-output {
  border-left: 3px solid var(--star-brand);
  background: var(--star-brand-soft);
}

.star-sample-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.star-sample-grid article {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--star-border);
  border-radius: 6px;
  background: #fff;
}

.star-sample-grid article > span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--star-brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.star-sample-grid article b {
  color: #444;
  font-size: 13px;
}

.star-sample-grid article p {
  margin: 3px 0 0;
  color: #707075;
  font-size: 12px;
  line-height: 1.55;
}

.star-modal-dialog > footer {
  justify-content: flex-end;
  border-top: 1px solid var(--star-border);
}

.star-ai-usage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--star-brand-border);
  border-radius: 6px;
  background: #fff;
}

.star-ai-usage > i {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--star-brand-soft);
  color: var(--star-brand);
  font-size: 18px;
}

.star-ai-usage b {
  color: #444;
  font-size: 14px;
}

.star-ai-usage p {
  margin: 3px 0 0;
  color: var(--star-muted);
  font-size: 12px;
  line-height: 1.55;
}

.star-ai-usage > a {
  color: var(--star-brand);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.star-ai-usage--sample {
  background: var(--star-surface-soft);
}

.star-ai-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--star-border);
  border-radius: 6px;
  background: var(--star-surface-soft);
  color: #666;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.65;
}

.star-ai-consent input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--star-brand);
}

.star-paid-confirmation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--star-brand);
  border-radius: 6px;
  background: var(--star-brand-soft);
}

.star-paid-confirmation b {
  color: var(--star-brand-dark);
  font-size: 14px;
}

.star-paid-confirmation p {
  margin: 4px 0 0;
  color: #666;
  font-size: 12px;
  line-height: 1.55;
}

.star-paid-confirmation > div:last-child {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
}

.star-paid-confirmation .button {
  min-height: 38px;
  padding: 7px 13px;
  font-size: 12px;
}

.star-generator.is-sample-mode .star-field input,
.star-generator.is-sample-mode .star-field select,
.star-generator.is-sample-mode .star-field textarea {
  border-color: #e4e4e8;
  background: #f6f6f8;
  color: #555;
  cursor: default;
}

.star-generator.is-generating .star-panel {
  cursor: progress;
}

.star-spin {
  animation: star-spin 0.9s linear infinite;
}

@keyframes star-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1100px) {
  .star-titlebar-layout {
    gap: 38px;
  }

  .star-form-layout,
  .star-result-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(270px, 0.7fr);
  }
}

@media (max-width: 900px) {
  .star-titlebar {
    padding-top: 44px;
  }

  .star-titlebar-layout,
  .star-form-layout,
  .star-result-layout {
    grid-template-columns: 1fr;
  }

  .star-titlebar-layout {
    gap: 34px;
  }

  .star-preview-card {
    max-width: 680px;
  }

  .star-grid-four {
    grid-template-columns: 1fr;
  }

  .star-result-summary {
    align-items: flex-start;
  }

  .star-takeaway-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .star-titlebar {
    padding: 34px 0 24px;
  }

  .star-titlebar-copy h1 {
    font-size: 36px;
  }

  .star-titlebar-copy > p {
    font-size: 16px;
  }

  .star-product-section {
    padding: 42px 0 56px;
  }

  .star-builder-heading,
  .star-result-summary {
    display: grid;
    align-items: start;
  }

  .star-save-status {
    justify-self: start;
  }

  .star-stepper li {
    min-height: 80px;
  }

  .star-stepper li > button {
    min-height: 80px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 10px 6px;
  }

  .star-stepper li button > div {
    display: block;
    text-align: center;
  }

  .star-stepper li b {
    display: block;
    font-size: 11px;
  }

  .star-stepper li small {
    display: none;
  }

  .star-stepper li + li {
    border-left: 1px solid var(--star-border);
  }

  .star-builder-card .star-panel > .headline {
    min-height: auto;
    align-items: flex-start;
    padding: 18px 20px;
  }

  .star-builder-card .headline h3 {
    font-size: 16px;
  }

  .star-step-caption {
    white-space: nowrap;
  }

  .star-builder-card .star-panel > .content {
    padding: 22px 20px;
  }

  .star-form-grid {
    grid-template-columns: 1fr;
  }

  .star-panel-actions {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .star-panel-actions > span {
    width: 100%;
    margin: 0;
  }

  .star-panel-actions .button {
    flex: 1 1 auto;
  }

  .star-ai-usage {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .star-ai-usage > a {
    grid-column: 2;
    white-space: normal;
  }

  .star-paid-confirmation {
    align-items: stretch;
    flex-direction: column;
  }

  .star-score {
    width: 100%;
    min-width: 0;
  }

  .star-output-tabs {
    grid-template-columns: 1fr;
  }

  .star-output-tabs button {
    min-height: 58px;
    justify-content: flex-start;
    padding: 10px 14px;
  }

  .star-output-tabs button.is-active {
    border-color: var(--star-brand);
  }

  .star-output-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .star-output-meta span:last-child {
    text-align: left;
  }

  .star-sample-grid {
    grid-template-columns: 1fr;
  }

  .star-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .star-titlebar-copy h1 {
    font-size: 32px;
  }

  .star-titlebar-actions {
    display: grid;
  }

  .star-titlebar-actions .button {
    width: 100%;
  }

  .star-trust-list {
    display: grid;
  }

  .star-preview-card,
  .star-writing-guide,
  .star-part,
  .star-next-card,
  .star-takeaway-grid article {
    padding: 18px;
  }

  .star-builder-heading h2,
  .star-takeaway-heading h2,
  .star-result-summary h2 {
    font-size: 23px;
  }

  .star-builder-card .star-panel > .headline {
    display: grid;
    gap: 7px;
  }

  .star-builder-card .star-panel > .content {
    padding: 20px 16px;
  }

  .star-field--large textarea {
    min-height: 170px;
  }

  .star-skill-options button {
    flex: 1 1 calc(50% - 5px);
  }

  .star-panel-actions {
    display: grid;
  }

  .star-panel-actions .button,
  .star-panel-actions .star-inline-action {
    width: 100%;
    justify-content: center;
  }

  .star-output-panel {
    padding: 18px;
  }

  .star-output-text {
    padding: 16px;
    font-size: 15px;
  }

  .star-form-message {
    max-width: calc(100% - 32px);
  }

  .star-modal {
    padding: 12px;
  }

  .star-modal-dialog {
    max-height: calc(100vh - 24px);
  }

  .star-modal-dialog > header,
  .star-modal-dialog > footer {
    padding: 16px;
  }

  .star-modal-dialog > header h2 {
    font-size: 18px;
  }

  .star-modal-body {
    gap: 12px;
    padding: 16px;
  }

  .star-modal-dialog > footer .button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .star-generator *,
  .star-generator *::before,
  .star-generator *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
