:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fff8f0;
  color: #3e2723;
  --gold: #a8875b;
  --gold-soft: #c4a46d;
  --brown: #5c3d2e;
  --brown-dark: #3e2723;
  --cream: #fff8f0;
  --cream-deep: #f5ede0;
  --card: #fffdf9;
  --line: #e8d5b8;
  --green: #2e5e4e;
  --muted: #6d5d4e;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: #fff;
  cursor: pointer;
  min-height: 42px;
  padding: 0 16px;
  font-weight: 800;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.mini {
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brown-dark);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(168, 135, 91, 0.12);
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 92px;
  resize: vertical;
  padding: 12px;
}

aside textarea {
  min-height: 82px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
}

.shell {
  width: min(800px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 32px;
}

.hidden {
  display: none !important;
}

.login {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.lead {
  margin-top: 16px;
  max-width: 560px;
  color: #5a5f58;
  font-size: 18px;
  line-height: 1.7;
}

.eyebrow {
  color: #9a5d25;
  font-weight: 700;
  margin-bottom: 10px;
}

.login-form,
.panel {
  background: #fff;
  border: 1px solid #e1e0d7;
  border-radius: 8px;
  box-shadow: 0 14px 45px rgba(32, 35, 31, 0.08);
}

.login-form {
  padding: 24px;
}

.entry-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.entry-tabs label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid #d6d5ca;
  border-radius: 6px;
  padding: 0 12px;
  background: #f7f7f3;
  font-weight: 700;
}

.entry-tabs input {
  width: auto;
  min-height: auto;
}

.inline {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.inline input {
  flex: 1;
}

.topbar {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  padding: 58px 132px 60px;
  border: 1px solid rgba(232, 213, 184, 0.38);
  border-radius: 22px;
  background: linear-gradient(135deg, #3e2723 0%, #5c3d2e 48%, #a8875b 100%);
  box-shadow:
    0 24px 60px rgba(62, 39, 35, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

.status {
  position: absolute;
  z-index: 1;
  top: auto;
  inset: auto 28px 28px 28px;
  display: block;
  pointer-events: none;
}

.status span {
  white-space: nowrap;
}

.status-actions {
  position: absolute;
  left: 50%;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  transform: translateX(-50%);
  pointer-events: auto;
}

.brand-center {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
  width: 100%;
  min-width: 0;
  padding-top: 8px;
}

.brand-center h1 {
  color: #fff;
  font-size: clamp(30px, 3vw, 38px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-shadow: 0 12px 30px rgba(38, 20, 15, 0.28);
}

.brand-center p {
  color: #ffd89c;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 24px;
}

.event-badge,
.version-badge {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #fff;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.version-badge,
.status .secondary {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 32px;
}

.event-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.46);
  padding: 8px 22px;
  text-align: center;
  line-height: 1.45;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(62, 39, 35, 0.12);
  font-size: 15px;
}

.time-left {
  position: absolute;
  right: 0;
  bottom: 7px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  line-height: 1;
}

.status .secondary {
  width: fit-content;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: 0 8px 24px rgba(62, 39, 35, 0.12);
  pointer-events: auto;
}

.secondary {
  background: #e8ebe4;
  color: #27352e;
}

.workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.panel {
  padding: 20px;
}

.profile-card,
.content-card,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(168, 135, 91, 0.08);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.title-with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-with-icon > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff5e6;
  color: var(--brown);
  font-size: 17px;
}

.filled-count {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff5e6;
  border: 1px solid var(--line);
  color: var(--brown);
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 800;
}

.stack {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: #42473f;
  font-size: 14px;
}

.field-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 10px;
  border-top: 1px solid #f1e6d4;
  padding-top: 14px;
}

.field-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.field-item::before {
  content: attr(data-step);
  grid-row: 1 / span 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  margin-top: 1px;
}

.field-item > .field-title {
  color: var(--brown-dark);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.field-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.field-item input,
.field-item textarea {
  grid-column: 2;
}

.save-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #f1e6d4;
  padding-top: 14px;
}

.save-status {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.creator {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.tool-header {
  display: grid;
  grid-template-columns: minmax(140px, 0.45fr) minmax(220px, 1fr);
  align-items: end;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream-deep);
  padding: 14px;
  margin-bottom: 4px;
}

.tool-header select {
  max-width: none;
  background: #fff;
}

.select-label {
  color: var(--brown);
  font-weight: 800;
  font-size: 15px;
}

.primary {
  width: 100%;
  margin-top: 12px;
}

.product-card {
  display: grid;
  gap: 14px;
}

.content-lead {
  border-radius: 10px;
  background: #fff5e6;
  border: 1px solid var(--line);
  color: var(--brown);
  padding: 12px 14px;
  font-weight: 800;
  line-height: 1.6;
}

.extra-field {
  display: grid;
  gap: 6px;
}

.extra-field > span {
  color: var(--brown-dark);
  font-weight: 900;
}

.product-card > div:first-child h2 {
  max-width: 760px;
  color: var(--brown-dark);
  font-size: 20px;
  line-height: 1.45;
}

.topic-picker {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffaf2;
  padding: 14px;
}

.topic-picker .soft-note {
  margin: 0 0 12px;
}

.topic-guide {
  display: grid;
  gap: 10px;
}

.guide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-tags span {
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d9c6aa;
  color: var(--brown);
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 800;
}

.topic-guide p {
  margin: 0;
  color: var(--brown);
}

.topic-guide strong {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: #fff;
  padding: 2px 7px;
  font-weight: 900;
}

.topic-options {
  display: grid;
  gap: 14px;
}

.topic-group {
  display: grid;
  gap: 10px;
  border: 1px solid #d9c6aa;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdfa, #fff8ef);
  padding: 12px;
}

.topic-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--brown);
}

.topic-group-head strong {
  font-size: 15px;
}

.topic-group-head span {
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: #fff;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.topic-group-options {
  display: grid;
  gap: 8px;
}

.topic-option {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: start;
  gap: 10px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  padding: 12px;
  line-height: 1.55;
  cursor: pointer;
}

.topic-option input {
  appearance: none;
  width: 20px;
  min-height: 20px;
  margin-top: 3px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
}

.topic-option input:checked {
  border-color: var(--gold);
  background: var(--gold);
}

.topic-option input:checked::after {
  content: "✓";
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.topic-option:has(input:checked) {
  border-color: var(--gold);
  background: #fff5e6;
}

.topic-option span {
  min-width: 0;
}

.soft-note,
.guidance {
  margin-top: 12px;
  border: 1px solid #e4d7bd;
  border-radius: 8px;
  background: #fff8ea;
  color: #6d421f;
  padding: 12px;
  line-height: 1.7;
  font-size: 14px;
}

.guidance {
  margin-top: 0;
}

.guidance h3 {
  margin: 0 0 8px;
  color: #20231f;
}

.guidance p {
  color: #6d421f;
}

.question-framework {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.question-framework div {
  display: grid;
  gap: 4px;
  border: 1px solid #e7d7bb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  padding: 10px 12px;
}

.question-framework strong {
  color: #3d2a24;
  font-size: 14px;
}

.question-framework span {
  color: #745b4b;
  font-size: 13px;
  line-height: 1.65;
}

.offer-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.offer-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 6px;
  background: #f0e6d5;
  color: #6d421f;
  padding: 0 10px;
  font-weight: 700;
  font-size: 14px;
}

.followup-actions {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid #d9c6aa;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff8ea, #fffdf9);
  padding: 14px;
  box-shadow: 0 8px 22px rgba(109, 66, 31, 0.08);
}

.followup-note {
  display: grid;
  gap: 6px;
  color: var(--brown-dark);
  line-height: 1.6;
}

.followup-note strong {
  color: var(--brown);
  font-size: 15px;
}

.followup-note span {
  color: var(--muted);
  font-size: 14px;
}

.followup-script-btn {
  width: 100%;
}

.step-block {
  border-top: 1px solid #e1e0d7;
  padding-top: 14px;
}

.step-block h3 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.35;
}

pre,
.generated-output {
  margin: 16px 0 0;
  min-height: 260px;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  line-height: 1.78;
  font-size: 15px;
}

.generated-output {
  display: grid;
  gap: 12px;
  color: var(--brown-dark);
  box-shadow: 0 2px 12px rgba(168, 135, 91, 0.08);
}

.generated-output.compact {
  min-height: 0;
}

.generated-output h3,
.generated-output h4,
.generated-output p,
.generated-output ol {
  margin: 0;
}

.generated-output h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  background: linear-gradient(135deg, #5c3d2e 0%, #a8875b 100%);
  color: #fff;
  padding: 12px 20px;
  font-size: 17px;
  line-height: 1.35;
  box-shadow: 0 10px 22px rgba(168, 135, 91, 0.18);
}

.generated-output .output-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff8ea;
  color: var(--brown);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.generated-output .output-title {
  min-width: 0;
  font-weight: 900;
}

.generated-output h4 {
  margin-top: 4px;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #fff5e6;
  padding: 10px 12px;
  color: var(--brown);
  font-size: 16px;
  line-height: 1.45;
}

.generated-output p {
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px 14px;
  box-shadow: 0 6px 18px rgba(32, 35, 31, 0.04);
}

.generated-output .script-line {
  display: grid;
  grid-template-columns: minmax(92px, 0.26fr) 1fr;
  gap: 10px;
  border-left: 4px solid var(--gold);
}

.generated-output strong {
  color: var(--brown);
}

.output-list {
  display: grid;
  gap: 10px;
  list-style: none;
  counter-reset: output;
  padding-left: 0;
}

.output-list li {
  position: relative;
  min-height: 46px;
  display: grid;
  align-items: center;
  background: linear-gradient(180deg, #fffdfa, #fff8ef);
  border: 1px solid #d9c6aa;
  border-radius: 10px;
  padding: 10px 12px 10px 52px;
  box-shadow: 0 8px 22px rgba(109, 66, 31, 0.08);
}

.output-list li::before {
  counter-increment: output;
  content: counter(output);
  position: absolute;
  left: 12px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(109, 66, 31, 0.18);
}

.msg {
  min-height: 22px;
  margin-top: 10px;
  color: #9a3a2c;
}

.admin {
  margin-top: 18px;
}

.admin-tabs {
  display: flex;
  gap: 0;
  margin: 16px 0;
  border-bottom: 2px solid #e1d5c3;
}

.admin-tab {
  padding: 10px 24px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: #8a7a6a;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.admin-tab.active {
  color: #5a3e1b;
  border-bottom-color: #5a3e1b;
}

.admin-tab:hover {
  color: #5a3e1b;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.admin-table th {
  background: #f9f6f2;
  font-weight: 600;
  color: #5a3e1b;
}

.paid-admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.paid-card {
  background: #fff;
  border: 1px solid #e8dfd4;
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.paid-card:hover {
  border-color: #c4a97d;
  box-shadow: 0 4px 12px rgba(90, 62, 27, 0.08);
}

.paid-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.paid-card-head strong {
  font-size: 16px;
  color: #3a2e1a;
}

.paid-card-info {
  font-size: 13px;
  color: #8a7a6a;
  margin: 0;
}

.paid-card-updated {
  font-size: 12px;
  color: #999;
  margin: 4px 0 0;
}

.paid-card-updated.recent {
  color: #e67e22;
  font-weight: 600;
}

.updated-badge {
  font-size: 12px;
  color: #e67e22;
  background: #fef5e7;
  padding: 2px 8px;
  border-radius: 4px;
}

.paid-detail-page {
  margin-top: 20px;
}

.paid-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.paid-detail-header h3 {
  margin: 0;
  font-size: 20px;
  color: #3a2e1a;
}

.paid-section {
  background: #fdfbf8;
  border: 1px solid #e8dfd4;
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 16px;
}

.paid-section summary {
  font-size: 15px;
  font-weight: 600;
  color: #5a3e1b;
}

.paid-profile-summary p {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #4a3e2a;
}

.supplement-block {
  border-top: 1px solid #eee;
  padding-top: 12px;
  margin-top: 12px;
}

.supplement-block small {
  color: #999;
  font-size: 12px;
}

.supplement-block pre {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.7;
  color: #4a3e2a;
}

.script-section {
  background: #fff;
}

.script-read-area {
  background: #faf8f5;
  border: 1px solid #e8dfd4;
  border-radius: 8px;
  padding: 24px 28px;
  margin: 12px 0;
  font-size: 16px;
  line-height: 2;
  color: #2a2218;
  min-height: 200px;
}

.script-read-area h5.script-heading {
  font-size: 17px;
  font-weight: 700;
  color: #5a3e1b;
  margin: 20px 0 8px;
  padding-top: 12px;
  border-top: 1px dashed #e1d5c3;
}

.script-read-area h5.script-heading:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.script-read-area p {
  margin: 4px 0;
}

.script-adjust-row {
  margin-top: 14px;
}

.script-adjust-row textarea {
  width: 100%;
  border: 1px solid #d4c9b8;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  resize: vertical;
}

.script-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.teacher-section textarea {
  width: 100%;
  border: 1px solid #d4c9b8;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 10px;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

.admin-row {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.table {
  overflow-x: auto;
}

.admin-detail {
  margin-top: 18px;
  border-top: 1px solid #e1e0d7;
  padding-top: 18px;
}

.admin-detail h3,
.admin-detail h4 {
  margin: 0 0 12px;
}

.final-copy {
  background: #f7f7f3;
  border: 1px solid #e1e0d7;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
}

.teacher-note-box {
  border: 1px solid #e4d7bd;
  border-radius: 8px;
  background: #fff8ea;
  padding: 14px;
  margin-bottom: 16px;
}

.teacher-note-box textarea {
  min-height: 120px;
  background: #fff;
}

.final-copy pre,
.history-item pre {
  min-height: 0;
  max-height: 520px;
  overflow: auto;
}

.profile-table {
  margin-bottom: 16px;
}

.profile-table th {
  width: 140px;
  color: #6d421f;
}

.history-item {
  border: 1px solid #e1e0d7;
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
}

.extra-block {
  margin: 12px 0;
  background: #fff8ea;
  border-radius: 6px;
  padding: 10px;
  line-height: 1.7;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid #e1e0d7;
  padding: 10px;
  text-align: left;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 16px, 800px);
    padding: 8px 0 18px;
  }

  .login,
  .workspace {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar {
    min-height: 250px;
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 18px;
    padding: 34px 16px 76px;
    border-radius: 18px;
  }

  .inline,
  .admin-row,
  .offer-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .status {
    position: absolute;
    inset: auto 18px 18px 18px;
    display: block;
  }

  .version-badge,
  .status .secondary {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
    line-height: 30px;
  }

  .time-left {
    position: absolute;
    right: 0;
    bottom: 8px;
    min-height: auto;
    padding: 0;
    line-height: 1;
    font-size: 10px;
  }

  .tool-header {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 34px;
  }

  .brand-center h1 {
    font-size: clamp(20px, 5.5vw, 32px);
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .brand-center p {
    font-size: 16px;
  }

  .event-badge {
    white-space: normal;
    font-size: 13px;
  }

  .panel {
    padding: 16px;
  }

  .panel-head {
    align-items: flex-start;
  }

  .field-item {
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 8px;
  }

  .field-item::before {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .field-item > .field-title {
    font-size: 15px;
  }

  .save-row {
    align-items: stretch;
    flex-direction: column;
  }

  .save-row button {
    width: 100%;
  }

  .topic-group-head {
    align-items: flex-start;
  }

  .topic-option {
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 10px;
  }

  .generated-output {
    min-height: 180px;
    padding: 14px;
  }

  .generated-output h3 {
    padding: 11px 12px;
    font-size: 16px;
  }

  .generated-output .script-line {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    background: #fff8f0;
  }

  button,
  input,
  textarea,
  select {
    font-size: 16px;
  }

  button,
  input,
  select {
    min-height: 48px;
  }

  .shell {
    width: 100%;
    padding: 0 10px 18px;
  }

  .login {
    min-height: 100vh;
    gap: 18px;
    padding: 20px 0;
    align-content: center;
  }

  .login h1 {
    font-size: 30px;
  }

  .lead {
    font-size: 15px;
    line-height: 1.65;
  }

  .login-form {
    padding: 16px;
    border-radius: 14px;
  }

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

  .inline {
    gap: 8px;
  }

  .topbar {
    min-height: 236px;
    margin: 0 0 12px;
    padding: 28px 14px 80px;
    border-radius: 0 0 20px 20px;
    border-left: 0;
    border-right: 0;
  }

  .brand-center {
    gap: 14px;
    padding-top: 0;
  }

  .brand-center h1 {
    max-width: 100%;
    font-size: clamp(23px, 8.1vw, 30px);
    line-height: 1.18;
    letter-spacing: 0;
  }

  .event-badge {
    width: min(100%, 330px);
    min-height: 34px;
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1.35;
  }

  .brand-center p {
    font-size: 15px;
  }

  .status {
    inset: auto 14px 16px 14px;
  }

  .status-actions {
    gap: 8px;
  }

  .version-badge,
  .status .secondary {
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
    line-height: 28px;
    border-radius: 999px;
  }

  .time-left {
    bottom: 8px;
    font-size: 10px;
  }

  .workspace {
    gap: 12px;
  }

  .panel,
  .profile-card,
  .content-card {
    border-radius: 14px;
  }

  .panel {
    padding: 14px;
  }

  .panel-head {
    gap: 8px;
    flex-wrap: wrap;
  }

  .title-with-icon {
    gap: 8px;
  }

  .title-with-icon > span {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }

  h2 {
    font-size: 17px;
    line-height: 1.35;
  }

  .filled-count {
    font-size: 12px;
    padding: 4px 8px;
  }

  .stack {
    gap: 12px;
  }

  .field-item {
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 8px;
    padding-top: 12px;
  }

  .field-item:first-child {
    padding-top: 0;
  }

  .field-item::before {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .field-hint {
    font-size: 13px;
    line-height: 1.55;
  }

  .field-item input,
  .field-item textarea,
  .extra-field textarea {
    border-radius: 10px;
  }

  textarea {
    min-height: 112px;
  }

  .save-row {
    gap: 8px;
  }

  .content-lead,
  .soft-note,
  .followup-note {
    font-size: 14px;
    line-height: 1.65;
  }

  .tool-header {
    gap: 8px;
  }

  .select-label,
  .extra-field > span {
    font-size: 15px;
  }

  #generateBtn,
  .followup-script-btn,
  .save-row button,
  .step-block button {
    width: 100%;
    min-height: 50px;
    border-radius: 12px;
  }

  .followup-actions {
    padding: 12px;
    border-radius: 12px;
  }

  pre,
  .generated-output {
    min-height: 150px;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.72;
  }

  .generated-output {
    gap: 10px;
  }

  .generated-output h3 {
    padding: 10px 12px;
    gap: 8px;
    border-radius: 10px;
    font-size: 15px;
  }

  .generated-output .output-icon {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  .generated-output h4,
  .generated-output p {
    padding: 10px 12px;
    border-radius: 10px;
  }

  .output-list {
    gap: 8px;
  }

  .output-list li {
    min-height: 42px;
    padding: 10px 10px 10px 46px;
    border-radius: 10px;
  }

  .output-list li::before {
    left: 10px;
    top: 10px;
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .admin {
    margin-top: 12px;
  }
}

.supplement-panel {
  margin-top: 16px;
}

.supplement-panel h3 {
  font-size: 17px;
  color: #3a2e1a;
  margin-bottom: 16px;
}

.supplement-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.supplement-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.supplement-item.other-supplement {
  border-top: 2px dashed #e1d5c3;
  padding-top: 20px;
  margin-top: 12px;
}

.supplement-item.other-supplement textarea {
  min-height: 120px;
}

.supplement-title {
  font-weight: 600;
  font-size: 15px;
  color: #3a2e1a;
}

.custom-questions-block {
  border-top: 2px dashed #e1d5c3;
  padding-top: 20px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.custom-questions-title {
  font-size: 16px;
  color: #9a5d25;
  font-weight: 700;
  margin-bottom: 4px;
}

.script-progress {
  background: var(--cream-deep);
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
  border: 2px solid var(--gold-soft);
}

.progress-bar {
  height: 14px;
  background: var(--line);
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  border-radius: 7px;
  transition: width 0.6s ease;
  position: relative;
  min-width: 36px;
}

.progress-percent {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.progress-steps .step {
  font-size: 13px;
  color: var(--muted);
  opacity: 0.5;
  text-align: center;
  flex: 1;
}

.progress-steps .step.active {
  opacity: 1;
  color: var(--gold);
  font-weight: 600;
}

.progress-steps .step.done {
  opacity: 0.8;
  color: var(--green);
}

.progress-hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.script-published {
  background: #f0f9f4;
  border: 1px solid #b8e0c8;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.script-published-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.script-published-header h3 {
  color: var(--green);
  font-size: 16px;
  margin: 0;
}

.version-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.version-label {
  font-size: 13px;
  color: var(--muted);
}

.version-nav .mini {
  font-size: 12px;
  padding: 4px 10px;
}

.admin-script-section {
  background: #faf6f0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.admin-script-section h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.status-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.status-pending { background: #f0e6d6; color: #8a6d3b; }
.status-generating { background: #e0ecff; color: #3b5998; }
.status-reviewing { background: #fff3cd; color: #856404; }
.status-published { background: #d4edda; color: #155724; }

.admin-script-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-script-section textarea {
  width: 100%;
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  resize: vertical;
}

/* ===== AI Interview Panel ===== */
.interview-panel {
  margin-top: 20px;
  background: #fff;
  border: 1px solid #e8dfd4;
  border-radius: 14px;
  overflow: hidden;
}

.interview-header {
  padding: 20px 24px 12px;
}

.interview-header h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #3a2e1a;
}

.interview-stage {
  padding: 0 24px 24px;
}

.avatar-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}

.avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
}

.avatar-svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #faf6f0;
}

.avatar-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: border-color 0.3s;
}

.avatar-wrapper.speaking .avatar-pulse {
  border-color: #c47a5a;
  animation: pulse-ring 1.2s ease-in-out infinite;
}

.avatar-wrapper.listening .avatar-pulse {
  border-color: #5a9e5a;
  animation: pulse-ring 1.5s ease-in-out infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.avatar-name {
  margin: 10px 0 2px;
  font-weight: 600;
  font-size: 15px;
  color: #3a2e1a;
}

.avatar-status {
  margin: 0;
  font-size: 13px;
  color: #8a7a6a;
}

.chat-area {
  background: #faf8f5;
  border: 1px solid #e8dfd4;
  border-radius: 12px;
  padding: 16px;
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.chat-placeholder {
  text-align: center;
  color: #aaa;
  padding: 60px 0;
  font-size: 14px;
}

.chat-bubble {
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.chat-bubble.ai {
  flex-direction: row;
}

.chat-bubble.user {
  flex-direction: row-reverse;
}

.chat-bubble .bubble-content {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.7;
}

.chat-bubble.ai .bubble-content {
  background: #fff;
  border: 1px solid #e8dfd4;
  color: #3a2e1a;
}

.chat-bubble.user .bubble-content {
  background: #5a3e1b;
  color: #fff;
}

.chat-bubble .bubble-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f5e6d3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.interview-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.mic-btn {
  min-width: 60px;
  height: 40px;
  border-radius: 20px;
  border: 1.5px solid #c47a5a;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 14px;
  padding: 0 10px;
  transition: all 0.2s;
}

.mic-label {
  font-size: 11px;
  color: #6b5a4e;
}

.mic-btn:hover {
  background: #fef0e8;
}

.mic-btn.recording {
  background: #ffe0d0;
  border-color: #e55;
  animation: mic-pulse 1s ease-in-out infinite;
}

.mic-btn.recording .mic-label {
  color: #e55;
}

@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 85, 85, 0.3); }
  50% { box-shadow: 0 0 0 10px rgba(229, 85, 85, 0); }
}

.text-reply {
  flex: 1;
  min-width: 150px;
  padding: 10px 14px;
  border: 1px solid #d4c9b8;
  border-radius: 8px;
  font-size: 14px;
}

@media (max-width: 600px) {
  .interview-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .mic-btn {
    align-self: center;
  }
  .chat-bubble .bubble-content {
    max-width: 85%;
  }
}
