.tc-wrap, .tc-wrap * { box-sizing: border-box; }
.tc-wrap { width: 100%; max-width: none; margin: 24px auto; color: #f4f7fb; font-family: inherit; }
.tc-panel {background: #101722; border: 1px solid #334155; border-radius: 14px; padding: 22px; box-shadow: 0 12px 32px rgba(0,0,0,.25); width: 100%; }
.tc-header h2 { margin: 0 0 6px; color: #ffffff; font-size: 30px; line-height: 1.15; }
.tc-header p { margin: 0 0 22px; color: #cbd5e1; }
.tc-field { margin-bottom: 20px; }
.tc-field label, .tc-info-column label { display: block; margin-bottom: 7px; color: #f8fafc; font-weight: 700; }
.tc-url-controls { display: flex; gap: 10px; }
.tc-wrap input, .tc-wrap textarea, .tc-wrap select { width: 100%; background: #ffffff; color: #111827; border: 1px solid #94a3b8; border-radius: 8px; padding: 11px 12px; font-size: 16px; line-height: 1.35; }
.tc-wrap input::placeholder, .tc-wrap textarea::placeholder { color: #64748b; opacity: 1; }
.tc-wrap button { background: #f59e0b; color: #111827; border: 0; border-radius: 8px; padding: 11px 18px; font-size: 16px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.tc-wrap button:hover { filter: brightness(1.08); }
.tc-wrap button:disabled { opacity: .65; cursor: wait; }
.tc-message { margin-top: 9px; min-height: 22px; font-weight: 700; }
.tc-message.tc-error { color: #fecaca; background: #7f1d1d; border: 1px solid #ef4444; border-radius: 8px; padding: 9px 10px; }
.tc-message.tc-success { color: #dcfce7; background: #14532d; border: 1px solid #22c55e; border-radius: 8px; padding: 9px 10px; }
.tc-author-card { display: flex; align-items: center; gap: 14px; background: #182233; border: 1px solid #475569; border-radius: 12px; padding: 14px; margin-bottom: 20px; }
.tc-author-avatar { width: 68px; height: 68px; object-fit: cover; border-radius: 50%; background: #e2e8f0; border: 2px solid #64748b; }
.tc-author-label { color: #cbd5e1; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.tc-author-name { color: #ffffff; font-size: 22px; font-weight: 800; }
.tc-author-link { color: #fbbf24; text-decoration: underline; }
.tc-content-grid { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 24px; align-items: start; }
.tc-cover-preview { min-height: 340px; border: 2px dashed #64748b; border-radius: 12px; background: #0f172a; color: #cbd5e1; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.tc-cover-img { width: 100%; height: auto; display: block; }
.tc-info-column { display: flex; flex-direction: column; gap: 10px; }
.tc-info-column textarea { min-height: 250px; resize: vertical; }
@media (max-width: 760px) { .tc-url-controls { flex-direction: column; } .tc-content-grid { grid-template-columns: 1fr; } .tc-cover-preview { max-width: 240px; } }
.tc-step { background: #111c2b; border: 1px solid #334155; border-radius: 12px; padding: 14px; margin-bottom: 18px; }
.tc-step-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tc-step-heading h3 { margin: 0; color: #ffffff; font-size: 20px; line-height: 1.2; }
.tc-step-kicker { color: #fbbf24; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3px; }
.tc-step-edit { padding: 7px 12px !important; font-size: 13px !important; border: 1px solid #fbbf24 !important; background: transparent !important; color: #fbbf24 !important; }
.tc-step-summary { color: #e2e8f0; background: #0f172a; border: 1px solid #475569; border-radius: 8px; padding: 10px 12px; font-weight: 700; }
.tc-step.tc-collapsed .tc-step-body { display: none; }
.tc-step.tc-collapsed .tc-step-heading { margin-bottom: 10px; }
.tc-step.tc-collapsed { padding-bottom: 14px; }
.tc-step .tc-field { margin-bottom: 0; }
.tc-author-card { display: block; }
.tc-author-main { display: flex; align-items: center; gap: 14px; }
.tc-author-stats { margin-top: 16px; display: grid; gap: 14px; }
.tc-stat-section { background: #0f172a; border: 1px solid #334155; border-radius: 10px; padding: 12px; }
.tc-stat-heading { color: #fbbf24; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 9px; }
.tc-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tc-stat-pill { background: #182233; border: 1px solid #475569; border-radius: 9px; padding: 9px 10px; min-height: 58px; }
.tc-stat-pill span { display: block; color: #cbd5e1; font-size: 12px; line-height: 1.25; }
.tc-stat-pill strong { display: block; color: #ffffff; font-size: 16px; line-height: 1.25; margin-top: 4px; overflow-wrap: anywhere; }
.tc-author-bio { margin-top: 14px; background: #0f172a; border: 1px solid #334155; border-radius: 10px; padding: 12px; color: #e2e8f0; }
.tc-author-bio p { margin: 0 0 10px; color: #e2e8f0; line-height: 1.55; }
.tc-author-bio p:last-child { margin-bottom: 0; }
@media (max-width: 760px) { .tc-stat-grid { grid-template-columns: 1fr; } }

.tc-author-main { justify-content: flex-start; }
.tc-author-core { flex: 1; min-width: 0; }
.tc-author-toggle { margin-left: auto; padding: 7px 12px !important; border: 1px solid #fbbf24 !important; background: transparent !important; color: #fbbf24 !important; border-radius: 8px; cursor: pointer; font-weight: 700; white-space: nowrap; }
.tc-author-toggle:hover { background: rgba(251,191,36,.12) !important; }
.tc-author-card.tc-author-collapsed { padding: 12px 14px; margin-bottom: 18px; }
.tc-author-card.tc-author-collapsed .tc-author-details { display: none; }
.tc-author-card.tc-author-collapsed .tc-author-avatar { width: 48px; height: 48px; }
.tc-author-card.tc-author-collapsed .tc-author-label { font-size: 11px; }
.tc-author-card.tc-author-collapsed .tc-author-name { font-size: 18px; }
@media (max-width: 700px) { .tc-author-main { align-items: flex-start; } .tc-author-toggle { margin-left: 0; margin-top: 8px; } }

/* v0.4.5: force readable form fields even when theme CSS overrides colors */
.tc-wrap input,
.tc-wrap textarea,
.tc-wrap select {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
  caret-color: #f8fafc !important;
}

.tc-wrap input::placeholder,
.tc-wrap textarea::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

.tc-wrap input:focus,
.tc-wrap textarea:focus,
.tc-wrap select:focus {
  outline: none !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .35) !important;
}

.tc-wrap select option {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

/* v0.4.9: Step Three layout picker + live editor layout previews */
.tc-layout-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
}
.tc-layout-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-height: 168px;
  padding: 10px !important;
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid #475569 !important;
  border-radius: 12px !important;
  text-align: left;
  box-sizing: border-box;
  overflow: hidden;
}
.tc-layout-card:hover,
.tc-layout-card.tc-layout-selected {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .28);
}

.tc-meta-options {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
}
.tc-meta-options-title {
  width: 100%;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tc-meta-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  padding: 7px 9px;
  border: 1px solid #475569;
  border-radius: 999px;
  background: #111827;
  cursor: pointer;
}
.tc-meta-options input[type="checkbox"] {
  width: auto !important;
  margin: 0;
  padding: 0;
  accent-color: #f59e0b;
}


.tc-style-options {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
}
.tc-style-options-title {
  width: 100%;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tc-style-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}
.tc-style-check {
  padding: 7px 9px;
  border: 1px solid #475569;
  border-radius: 999px;
  background: #111827;
  cursor: pointer;
}
.tc-style-options input[type="checkbox"] {
  width: auto !important;
  margin: 0;
  padding: 0;
  accent-color: #f59e0b;
}
.tc-color-field {
  padding: 6px 9px;
  border: 1px solid #475569;
  border-radius: 10px;
  background: #111827;
}
.tc-color-field input[type="color"] {
  width: 42px !important;
  height: 28px;
  padding: 0 !important;
  border: 1px solid #475569 !important;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.tc-layout-name { font-size: 12px; font-weight: 900; color: #fbbf24; text-transform: uppercase; letter-spacing: .05em; line-height: 1.15; }
.tc-mini { display: grid; gap: 5px; height: 116px; min-height: 0; overflow: hidden; box-sizing: border-box; }
.tc-mini i { display: flex; align-items: center; justify-content: center; min-height: 0; background: #020617; color: #d1d5db; font-size: 10px; line-height: 1; font-style: normal; border-radius: 2px; overflow: hidden; box-sizing: border-box; padding: 1px 3px; }
.tc-mini-stack { grid-template-rows: 2.4fr .85fr .85fr 1.45fr 1.45fr .85fr; }
.tc-mini-banner-split { grid-template-columns: 42% 1fr; grid-template-rows: 1fr .8fr 2.2fr .8fr 1fr; }
.tc-mini-banner-split i:nth-child(1), .tc-mini-banner-split i:nth-child(6) { grid-column: 1 / -1; }
.tc-mini-banner-split i:nth-child(2) { grid-column: 1; grid-row: 2 / 4; }
.tc-mini-banner-split i:nth-child(3) { grid-column: 2; grid-row: 2; }
.tc-mini-banner-split i:nth-child(4) { grid-column: 2; grid-row: 3 / 5; }
.tc-mini-banner-split i:nth-child(5) { grid-column: 1; grid-row: 4; }
.tc-mini-cover-blurb { grid-template-columns: 42% 1fr; grid-template-rows: .8fr .7fr 1.65fr .55fr .55fr .75fr; }
.tc-mini-cover-blurb i:nth-child(1), .tc-mini-cover-blurb i:nth-child(7) { grid-column: 1 / -1; }
.tc-mini-cover-blurb i:nth-child(2) { grid-column: 1; grid-row: 2 / 4; }
.tc-mini-cover-blurb i:nth-child(3) { grid-column: 2; grid-row: 2; }
.tc-mini-cover-blurb i:nth-child(4) { grid-column: 2; grid-row: 3; }
.tc-mini-cover-blurb i:nth-child(5) { grid-column: 1 / -1; grid-row: 4; }
.tc-mini-cover-blurb i:nth-child(6) { grid-column: 1 / -1; grid-row: 5; }
.tc-mini-tall { grid-template-columns: 1fr; grid-template-rows: 1fr 1.55fr .85fr .85fr; }
.tc-mini-tall i { grid-column: 1 / -1; }
.tc-mini-compact { grid-template-columns: 35% 1fr; grid-template-rows: .8fr 4fr .8fr; }
.tc-mini-compact i:nth-child(1) { grid-row: 1 / 4; }

.tc-preview-banner {
  display: none;
  background: #020617;
  color: #d1d5db;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
  font-size: 18px;
}
.tc-fiction-meta-preview {
  display: none;
  background: #020617;
  color: #d1d5db;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}
.tc-rr-link-preview {
  display: none;
  width: fit-content;
  background: #020617;
  color: #fbbf24 !important;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 12px;
  text-decoration: underline;
  font-weight: 800;
}
.tc-content-grid[data-selected-layout] { grid-template-columns: 240px minmax(0,1fr); }
.tc-content-grid[data-selected-layout="classic-stack"] {
  display: grid;
  grid-template-columns: minmax(220px, 360px);
  justify-content: center;
}
.tc-content-grid[data-selected-layout="classic-stack"] .tc-cover-column,
.tc-content-grid[data-selected-layout="classic-stack"] .tc-info-column { grid-column: 1; }
.tc-content-grid[data-selected-layout="classic-stack"] .tc-fiction-meta-preview { display: block; }
.tc-content-grid[data-selected-layout="classic-stack"] .tc-cover-preview { min-height: 300px; }

.tc-content-grid[data-selected-layout="banner-cover-left"],
.tc-content-grid[data-selected-layout="cover-blurb-right"],
.tc-content-grid[data-selected-layout="tall-feature"] {
  display: grid;
  grid-template-columns: 240px minmax(0,1fr);
}
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-preview-banner,
.tc-content-grid[data-selected-layout="cover-blurb-right"] .tc-preview-banner,
.tc-content-grid[data-selected-layout="tall-feature"] .tc-preview-banner { display: block; grid-column: 1 / -1; }
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-rr-link-preview,
.tc-content-grid[data-selected-layout="cover-blurb-right"] .tc-fiction-meta-preview,
.tc-content-grid[data-selected-layout="tall-feature"] .tc-rr-link-preview { display: inline-flex; }

.tc-content-grid[data-selected-layout="tall-feature"] { grid-template-columns: 190px minmax(0,1fr); }
.tc-content-grid[data-selected-layout="tall-feature"] .tc-info-column textarea.tc-blurb { min-height: 250px; }

.tc-content-grid[data-selected-layout="compact-right"] {
  display: grid;
  grid-template-columns: 160px minmax(0,1fr);
  gap: 16px;
}
.tc-content-grid[data-selected-layout="compact-right"] .tc-cover-preview { min-height: 220px; }
.tc-content-grid[data-selected-layout="compact-right"] .tc-info-column textarea.tc-blurb { min-height: 170px; }
.tc-content-grid[data-selected-layout="compact-right"] .tc-rr-link-preview { display: inline-flex; }
.tc-content-grid[data-selected-layout="compact-right"] .tc-info-column label[for="tc-tagline"],
.tc-content-grid[data-selected-layout="compact-right"] .tc-tagline,
.tc-content-grid[data-selected-layout="compact-right"] .tc-info-column label[for="tc-custom"],
.tc-content-grid[data-selected-layout="compact-right"] .tc-custom,
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-info-column label[for="tc-custom"],
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-custom,



@media (max-width: 900px) { .tc-layout-picker { grid-template-columns: repeat(2, minmax(140px, 1fr)); } }
@media (max-width: 760px) {
  .tc-layout-picker { grid-template-columns: 1fr; }
  .tc-content-grid[data-selected-layout] { grid-template-columns: 1fr; }
  .tc-preview-banner { grid-column: 1 !important; }
}
.tc-content-grid[hidden], .tc-step[hidden], .tc-author-card[hidden], .tc-output[hidden] { display: none !important; }

/* v0.5.0: Generate Code output */
.tc-step-generate { margin-top: 18px; }

.tc-output { margin-top: 18px; display: grid; gap: 12px; }
.tc-output h4 { margin: 8px 0 0; color: #ffffff; font-size: 18px; }
.tc-generated-preview {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: visible;
}
.tc-generated-html {
  width: 100%;
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
}
/* v0.5.2: optional banner image URL controls */
.tc-banner-url-fields {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
}
.tc-banner-url-fields[hidden], .tc-meta-options[hidden], .tc-fiction-meta-preview[hidden] { display: none !important; }
.tc-banner-url-fields .tc-field { margin-bottom: 0; }
.tc-preview-banner img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.tc-preview-banner:has(img) {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
@media (max-width: 760px) {
  .tc-banner-url-fields { grid-template-columns: 1fr; }
}

/* v0.5.9: Classic Stack uses a blurred cover backdrop with the real cover contained on top */
.tc-content-grid[data-selected-layout="classic-stack"] {
  display: grid;
  grid-template-columns: 1fr !important;
  justify-content: stretch !important;
}
.tc-content-grid[data-selected-layout="classic-stack"] .tc-cover-column,
.tc-content-grid[data-selected-layout="classic-stack"] .tc-info-column {
  grid-column: 1 / -1 !important;
}
.tc-content-grid[data-selected-layout="classic-stack"] .tc-cover-preview {
  position: relative;
  width: 100%;
  max-width: none;
  min-height: 250px;
  border: 0;
  border-radius: 14px;
  background-color: #020617;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .18);
  overflow: hidden;
  isolation: isolate;
}
.tc-content-grid[data-selected-layout="classic-stack"] .tc-cover-preview::before {
  content: "";
  position: absolute;
  inset: -36px;
  background-image: inherit;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: blur(28px);
  transform: scale(1.08);
  opacity: .72;
  z-index: 0;
}
.tc-content-grid[data-selected-layout="classic-stack"] .tc-cover-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, .42);
  z-index: 1;
}
.tc-content-grid[data-selected-layout="classic-stack"] .tc-cover-img {
  display: block !important;
  position: relative;
  z-index: 2;
  width: 100%;
  height: 250px;
  max-height: 250px;
  object-fit: contain;
  object-position: center center;
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .38);
}
.tc-content-grid[data-selected-layout="classic-stack"] .tc-cover-preview span {
  position: relative;
  z-index: 2;
}
@media (max-width: 760px) {
  .tc-content-grid[data-selected-layout="classic-stack"] .tc-cover-preview {
    min-height: 250px;
    background-attachment: scroll;
  }
  .tc-content-grid[data-selected-layout="classic-stack"] .tc-cover-img {
    height: 250px;
    max-height: 250px;
  }
}

/* v0.6.4: slim classic parallax banner spacing */
.tc-content-grid[data-selected-layout="classic-stack"] .tc-cover-column { margin-bottom: 14px; }









.tc-mini-toolbar {
  display: flex !important;
  gap: 6px;
  align-items: center;
  margin: 6px 0 8px;
}

.tc-mini-toolbar .tc-format-btn {
  min-width: 36px;
  height: 30px;
  padding: 4px 8px;
  border: 1px solid #475569;
  border-radius: 7px;
  background: #020617;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.tc-mini-toolbar .tc-format-btn:hover,
.tc-mini-toolbar .tc-format-btn:focus {
  border-color: #f59e0b;
  color: #fbbf24;
  outline: none;
}


.tc-rich-editor {
  width: 100%;
  min-height: 220px;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid #475569;
  border-radius: 8px;
  background: #1e293b;
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.55;
  overflow-y: auto;
  outline: none;
  white-space: normal;
}

.tc-rich-editor:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px #f59e0b;
}

.tc-rich-editor:empty:before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}

#tc-custom.tc-rich-editor {
  min-height: 180px;
}

}
.tc-rich-editor ul {
  margin: 0 0 10px 1.35em;
  padding: 0;
}
.tc-rich-editor li {
  margin: 0 0 4px;
}
.tc-rich-editor hr {
  border: 0;
  border-top: 1px solid #94a3b8;
  margin: 14px 0;
}












.tc-wrap h1,
.tc-wrap h2,
.tc-wrap h3 {
  text-align: center !important;
}




/* Preview color normalization only inside the generated preview box.
   This prevents WordPress theme colors from making the preview look different
   from what Royal Road will render. Generated HTML is not changed. */
.tc-generated-preview .town-crier-shoutout,
.tc-generated-preview .town-crier-shoutout *:not(a) {
  color: #f8fafc !important;
}

.tc-generated-preview .town-crier-shoutout a { text-decoration: none !important; }

.tc-generated-preview .town-crier-shoutout h1,
.tc-generated-preview .town-crier-shoutout h2,
.tc-generated-preview .town-crier-shoutout h3,
.tc-generated-preview .town-crier-shoutout h4,
.tc-generated-preview .town-crier-shoutout h5,
.tc-generated-preview .town-crier-shoutout h6,
.tc-generated-preview .town-crier-shoutout strong {
  color: #f8fafc !important;
}


/* Final preview link override: slightly off-white, scoped to generated preview only. */
.tc-generated-preview .town-crier-shoutout a { text-decoration: none !important; }


/* Final custom link preview behavior: inline generated link color wins. */
.tc-generated-preview .town-crier-shoutout a,
.tc-generated-preview .town-crier-shoutout a:visited,
.tc-generated-preview .town-crier-shoutout a:hover,
.tc-generated-preview .town-crier-shoutout a:active {
  text-decoration: none !important;
}


.tc-cover-url-fields {
  margin-top: 10px;
  padding: 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
}
.tc-cover-url-fields .tc-field {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 800;
}
.tc-field-note {
  display: inline-block;
  margin-left: 6px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}
.tc-custom-cover-url {
  width: 100%;
}

.tc-html-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}



.tc-generate-btn {
  background: #111c2b !important;
  border: 1px solid #f59e0b;
  color: #f59e0b;
}



/* Unified action buttons */
.tc-wrap button.tc-edit-author,
.tc-wrap button.tc-edit-fiction,
.tc-wrap button.tc-edit-layout,
.tc-wrap button.tc-author-toggle,
.tc-wrap button.tc-generate-code,
.tc-wrap button.tc-copy-html {
  background: transparent !important;
  color: #fbbf24 !important;
  border: 1px solid #fbbf24 !important;
  border-radius: 8px !important;
  padding: 7px 12px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: .04em;
  line-height: 1.2;
  cursor: pointer;
  text-transform: uppercase;
  filter: none !important;
  box-shadow: none !important;
}
.tc-wrap button.tc-edit-author:hover,
.tc-wrap button.tc-edit-fiction:hover,
.tc-wrap button.tc-edit-layout:hover,
.tc-wrap button.tc-author-toggle:hover,
.tc-wrap button.tc-generate-code:hover,
.tc-wrap button.tc-copy-html:hover {
  background: rgba(251, 191, 36, .12) !important;
  color: #fbbf24 !important;
  border-color: #fbbf24 !important;
  filter: none !important;
}
.tc-wrap button.tc-generate-code {
  width: 100% !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 12px 16px !important;
  font-size: 16px !important;
}
.tc-wrap button.tc-copy-html {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}


.tc-tool-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}
.tc-tool-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  background: transparent;
  color: #fbbf24 !important;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: .02em;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
}
.tc-tool-nav a:hover,
.tc-tool-nav a:focus {
  background: rgba(251, 191, 36, .12);
  color: #fbbf24 !important;
  text-decoration: none !important;
}
@media (max-width: 900px) {
  .tc-tool-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tc-tool-nav { grid-template-columns: 1fr; }
}


.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-blurb,
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-mini-toolbar[data-target="tc-blurb"] {
  order: 2;
}


/* Banner Split editor layout order */
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-info-column {
  display: flex;
  flex-direction: column;
}
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-info-column label[for="tc-title"] {
  order: 1;
}
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-title {
  order: 2;
}
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-info-column label[for="tc-blurb"] {
  order: 3;
}
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-mini-toolbar[data-target="tc-blurb"] {
  order: 4;
}
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-blurb {
  order: 5;
}
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-info-column label[for="tc-tagline"],
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-tagline,
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-info-column label[for="tc-custom"],
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-mini-toolbar[data-target="tc-custom"],
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-custom {
  display: none !important;
}
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-rr-link-cover-slot {
  margin-top: 10px;
  text-align: center;
}
.tc-content-grid[data-selected-layout="banner-cover-left"] .tc-rr-link-cover-slot .tc-rr-link-preview {
  display: inline-flex;
}


/* large-chest-editor-layout */
.tc-content-grid[data-selected-layout="cover-blurb-right"] .tc-info-column {
  display: flex;
  flex-direction: column;
}
.tc-content-grid[data-selected-layout="cover-blurb-right"] .tc-info-column label[for="tc-title"] {
  order: 1;
}
.tc-content-grid[data-selected-layout="cover-blurb-right"] .tc-title {
  order: 2;
}
.tc-content-grid[data-selected-layout="cover-blurb-right"] .tc-info-column label[for="tc-blurb"] {
  order: 3;
}
.tc-content-grid[data-selected-layout="cover-blurb-right"] .tc-mini-toolbar[data-target="tc-blurb"] {
  order: 4;
}
.tc-content-grid[data-selected-layout="cover-blurb-right"] .tc-blurb {
  order: 5;
}
.tc-content-grid[data-selected-layout="cover-blurb-right"] .tc-info-column label[for="tc-tagline"],
.tc-content-grid[data-selected-layout="cover-blurb-right"] .tc-tagline {
  display: none !important;
}
.tc-content-grid[data-selected-layout="cover-blurb-right"] .tc-info-column label[for="tc-custom"] {
  display: block !important;
  order: 6;
}
.tc-content-grid[data-selected-layout="cover-blurb-right"] .tc-mini-toolbar[data-target="tc-custom"] {
  display: flex !important;
  order: 7;
}
.tc-content-grid[data-selected-layout="cover-blurb-right"] .tc-custom {
  display: block !important;
  order: 8;
}
.tc-content-grid[data-selected-layout="cover-blurb-right"] .tc-fiction-meta-preview {
  grid-column: 1 / -1;
  display: block;
}




/* large-chest-meta-actual-placement */
.tc-fiction-meta-home,
.tc-fiction-meta-bottom-slot {
  display: none !important;
}
.tc-content-grid[data-selected-layout="cover-blurb-right"] > .tc-fiction-meta-preview {
  grid-column: 1 / -1;
  display: block;
  margin-top: 10px;
}


/* small-chest: remove stray/duplicate toolbars */
.tc-content-grid[data-selected-layout="compact-right"] .tc-mini-toolbar[data-target="tc-title"]{
  display:none !important;
}
.tc-content-grid[data-selected-layout="compact-right"] .tc-mini-toolbar[data-target="tc-custom"]{
  display:none !important;
}
/* if any duplicate toolbar sneaks in under blurb, keep only the first */
.tc-content-grid[data-selected-layout="compact-right"] .tc-info-column .tc-mini-toolbar[data-target="tc-blurb"] + .tc-mini-toolbar[data-target="tc-blurb"]{
  display:none !important;
}


/* AUTHOR'S NOTES layout */
.tc-content-grid[data-selected-layout="tall-feature"] {
  display: grid;
  grid-template-columns: 1fr;
}
.tc-content-grid[data-selected-layout="tall-feature"] .tc-cover-column,
.tc-content-grid[data-selected-layout="tall-feature"] .tc-preview-banner,
.tc-content-grid[data-selected-layout="tall-feature"] .tc-rr-link-preview,
.tc-content-grid[data-selected-layout="tall-feature"] .tc-info-column label[for="tc-blurb"],
.tc-content-grid[data-selected-layout="tall-feature"] .tc-mini-toolbar[data-target="tc-blurb"],
.tc-content-grid[data-selected-layout="tall-feature"] .tc-blurb {
  display: none !important;
}
.tc-content-grid[data-selected-layout="tall-feature"] .tc-info-column {
  display: flex;
  flex-direction: column;
  grid-column: 1 / -1;
}
.tc-content-grid[data-selected-layout="tall-feature"] .tc-info-column label[for="tc-title"] { order: 1; }
.tc-content-grid[data-selected-layout="tall-feature"] .tc-title { order: 2; }
.tc-content-grid[data-selected-layout="tall-feature"] .tc-info-column label[for="tc-custom"] {
  display: block !important;
  order: 3;
}
.tc-content-grid[data-selected-layout="tall-feature"] .tc-mini-toolbar[data-target="tc-custom"] {
  display: flex !important;
  order: 4;
}
.tc-content-grid[data-selected-layout="tall-feature"] .tc-custom {
  display: block !important;
  order: 5;
}
.tc-content-grid[data-selected-layout="tall-feature"] .tc-info-column label[for="tc-tagline"] {
  display: block !important;
  order: 6;
}
.tc-content-grid[data-selected-layout="tall-feature"] .tc-tagline {
  display: block !important;
  order: 7;
}
.tc-content-grid[data-selected-layout="tall-feature"] .tc-fiction-meta-preview {
  display: block;
  order: 8;
  margin-top: 10px;
}


.tc-featurette-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
}
.tc-featurette-options-title {
  flex: 0 0 100%;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.tc-featurette-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #475569;
  border-radius: 999px;
  padding: 8px 12px;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.tc-featurette-check input {
  width: auto;
  margin: 0;
  accent-color: #f59e0b;
}


.tc-generated-preview .tc-shout-featurette img {
  max-width: 120px !important;
  height: auto !important;
}
.tc-generated-preview .tc-shout-featurette td {
  text-align: center !important;
}


/* authors-notes-featurette-preview */
.tc-featurette-preview[hidden] {
  display: none !important;
}
.tc-content-grid[data-selected-layout="tall-feature"] .tc-featurette-preview {
  display: block;
  order: 8;
  margin: 12px 0;
}
.tc-content-grid[data-selected-layout="tall-feature"] .tc-featurette-strip {
  display: flex;
  gap: 10px;
  align-items: stretch;
  overflow-x: auto;
  padding: 10px;
  background: #020617;
  border: 1px solid #334155;
  border-radius: 10px;
}
.tc-featurette-tile {
  display: block;
  flex: 0 0 120px;
  color: #f8fafc !important;
  text-align: center;
  text-decoration: none !important;
}
.tc-featurette-tile img {
  display: block;
  width: 120px;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  margin: 0 auto 6px;
}
.tc-featurette-tile span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}
.tc-featurette-empty {
  padding: 10px 12px;
  background: #020617;
  border: 1px solid #334155;
  border-radius: 10px;
  color: #cbd5e1;
  font-weight: 700;
  text-align: center;
}
.tc-content-grid[data-selected-layout="tall-feature"] .tc-tagline {
  display: none !important;
}
.tc-content-grid[data-selected-layout="tall-feature"] .tc-info-column label[for="tc-tagline"] {
  display: none !important;
}


/* featurette covers only */
.tc-featurette-tile span {
  display: none !important;
}
.tc-featurette-tile img {
  margin-bottom: 0 !important;
}


/* featurette broken image cleanup */
.tc-featurette-tile img[alt="Volume Cover"] {
  min-height: 0;
}


/* featurette generated output should match editor strip: centered covers only, no extra outline */
.tc-generated-preview .tc-shout-featurette {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  text-align: center !important;
}
.tc-generated-preview .tc-shout-featurette a {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
}
.tc-generated-preview .tc-shout-featurette img {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}


/* RR-safe generated featurette sizing */
.tc-generated-preview table.tc-shout-featurette {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: auto !important;
}
.tc-generated-preview table.tc-shout-featurette td {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  padding: 4px !important;
}
.tc-generated-preview table.tc-shout-featurette img {
  width: 120px !important;
  height: 180px !important;
  max-width: 120px !important;
  object-fit: cover !important;
  border: 0 !important;
  outline: 0 !important;
}


/* v0.8.86 unified featurette rendering */
.tc-generated-preview table.tc-shout-featurette,
.tc-generated-preview table.tc-shout-featurette tr,
.tc-generated-preview table.tc-shout-featurette td {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
}
.tc-generated-preview table.tc-shout-featurette {
  width: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.tc-generated-preview table.tc-shout-featurette img {
  width: 120px !important;
  height: 180px !important;
  max-width: 120px !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}


/* v0.8.92: consolidated mobile author card layout fix.
   Overrides earlier .tc-author-main/.tc-author-toggle flex rules on narrow screens. */
@media (max-width: 700px) {
  .tc-wrap .tc-author-card {
    overflow: visible !important;
  }

  .tc-wrap .tc-author-main {
    display: grid !important;
    grid-template-columns: 64px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
  }

  .tc-wrap .tc-author-avatar {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    min-width: 64px !important;
  }

  .tc-wrap .tc-author-core {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    width: auto !important;
  }

  .tc-wrap .tc-author-toggle {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    margin: 10px 0 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
}
