@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

.ctw-page {
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--cloudy-white);
  display: flex;
  justify-content: center;
}

.ctw-card {
  max-width: 1700px;
  width: 100%;
  background: #101112;
  border: 1px solid #1e2122;
  border-radius: 14px;
  overflow: hidden;
  margin: 32px;
  background-color: #141517;
  box-shadow: 0 0 64px 84px #141517;
}

/* ── Header ── */
.ctw-header {
  background: #0d0e0f;
  border-bottom: 1px solid #1e2122;
  display: flex;
  align-items: center;
  gap: clamp(12px,2vw,26px);
  flex-wrap: wrap;
  padding: 14px clamp(14px,2.4vw,22px);
}

.ctw-title-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  padding: clamp(18px,2.6vw,28px) clamp(16px,3vw,32px);
  background: #111314;
  border-bottom: 1px solid #1e2122;
}

.ctw-title {
  font-family: Poppins, sans-serif;
  font-weight: 700;
  font-size: clamp(20px,3.6vw,28px);
  letter-spacing: -0.02em;
  color: #2fcc6b;
}

.ctw-subtitle {
  font-size: 14px;
  color: #9aa09d;
  margin-top: 5px;
  text-wrap: pretty;
}

/* ── Draft banner ── */
.ctw-draft-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px clamp(16px,3vw,32px);
  background: #0b1610;
  border-bottom: 1px solid #1a3326;
  font-size: 13px;
  color: #7cb899;
}
.ctw-draft-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
#ctw-clear-draft, #csw-clear-draft {
  padding: 4px 12px;
  border: 1px solid #1c9d52;
  border-radius: 6px;
  background: transparent;
  color: #2fcc6b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
#ctw-clear-draft:hover, #csw-clear-draft:hover { background: #0e2018; }
#ctw-dismiss-draft, #csw-dismiss-draft {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4a6659;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#ctw-dismiss-draft:hover, #csw-dismiss-draft:hover { color: #9aa09d; }

.ctw-saved-label {
  font-size: 12px;
  color: #7e8481;
  padding-top: 8px;
  margin-left: auto;
}

/* ── Body: sidebar + main ── */
.ctw-body {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}

/* ── Sidebar ── */
.ctw-sidebar {
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 272px;
  background: #141619;
  border-right: 1px solid #1e2122;
  padding: clamp(18px,2.4vw,26px) clamp(14px,1.8vw,20px);
}

.ctw-draft-name {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  gap:7px;
  background-image: url(img/diagonal-lines.svg);
  background-size: 8px auto;
  background-color: var(--deep-steel);
  background-repeat: repeat;
}

.ctw-draft-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.15) 60%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.ctw-draft-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 9px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.55);
  z-index: 2;
}

.ctw-draft-name-text {
  position: relative;
  z-index: 2;
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
  word-break: break-word;
}

.ctw-step-counter {
  font-size: 12px;
  color: #7e8481;
  margin-top: 4px;
}

.ctw-steps-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2px;
  margin-top: 20px;
}

.ctw-step-btn {
  text-align: left;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  color: #c9cecb;
  min-height: 48px;
  background: transparent;
  width: 100%;
  transition: background .15s;
}

.ctw-step-btn:hover { background: #121314; }

.ctw-step-btn.active {
  background: #161c18;
  border-color: #23402d;
  color: #e8eae9;
}

.ctw-step-badge {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  border: 1px solid #2c3031;
  color: #8b918e;
  font-size: 12px;
  display: grid;
  place-items: center;
  font-weight: 600;
}

.ctw-step-btn.active .ctw-step-badge {
  background: #1c9d52;
  border-color: #1c9d52;
  color: #04140a;
  font-weight: 700;
}

.ctw-step-btn.done .ctw-step-badge {
  background: #23402d;
  border-color: #2c6b45;
  color: #5ee08f;
}

.ctw-step-title { display: block; font-size: 14px; font-weight: 500; }
.ctw-step-sub { display: block; font-size: 11px; color: #7e8481; margin-top: 2px; }
.ctw-step-btn.active .ctw-step-sub { color: #5e6d62; }

.ctw-legend {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #1a1d1e;
  font-size: 12px;
  color: #7e8481;
  line-height: 1.6;
}

/* ── Main content ── */
.ctw-main {
  flex: 1 1 440px;
  min-width: 0;
  background: #181a1d;
  padding: clamp(20px,3vw,24px) clamp(16px,3.2vw,44px);
}

.ctw-step-heading {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.ctw-step-heading-title {
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: clamp(20px,3.4vw,26px);
  letter-spacing: -0.02em;
}

.ctw-step-intro {
  font-size: 14px;
  color: #9aa09d;
  text-wrap: pretty;
  border-bottom: 1px solid #2b3032;
  padding-bottom: 12px;
}

/* ── Error summary banner ── */
@keyframes ctwBannerIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ctw-err-banner {
  border: 1px solid #5b2f33;
  background: #1a1112;
  border-radius: 11px;
  padding: 14px 16px;
  margin-top: 20px;
  display: none;
}

.ctw-err-banner.visible {
  display: block;
  animation: ctwBannerIn .22s ease forwards;
}

.ctw-err-banner-title {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: #ffb3b7;
}

.ctw-err-badge {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: #e8686f;
  color: #1a1112;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.ctw-err-list { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }

.ctw-err-item {
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  color: #e8eae9;
  display: flex;
  gap: 8px;
}

.ctw-err-dot { color: #e8686f; }
.ctw-err-msg { color: #c9b0b2; }

/* ── Formula step ── */
.ctw-formula-warning {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 13px;
  color: #f0c95c;
  font-style: italic;
  margin-bottom: 16px;
}

.ctw-formulas { display: flex; flex-direction: column; gap: 10px; }

.ctw-formula-btn {
  width: 100%;
  text-align: left;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 11px;
  background: #131415;
  border: 1px solid #1e2122;
  cursor: pointer;
  color: #dfe3e1;
  transition: border-color .15s, background .15s;
}

.ctw-formula-btn:hover { border-color: #2c3031; background: #151617; }
.ctw-formula-btn.active { background: #161c18; border-color: #2c6b45; color: #e8eae9; }

.ctw-formula-abbr {
  width: 70px;
  height: 54px;
  padding: 8px;
  flex: none;
  border-radius: 7px;
  background: #0f1211;
  border: 1px solid #23282a;
  display: grid;
  place-items: center;
  font-family: Poppins, sans-serif;
  font-weight: 700;
  font-size: 15px;
}

.ctw-formula-abbr img{
  width: 64px;
}

.ctw-formula-btn.active .ctw-formula-abbr { border-color: #2c6b45; color: #5ee08f; }

.ctw-formula-name-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.ctw-formula-name {
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: 16px;
}

.ctw-popular-badge {
  font-size: 11px;
  color: #5ee08f;
  background: #16281d;
  border: 1px solid #23402d;
  padding: 2px 8px;
  border-radius: 5px;
}

.ctw-formula-desc { display: block; font-size: 13px; color: #9aa09d; margin-top: 4px; line-height: 1.55; text-wrap: pretty; }
.ctw-formula-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 9px; font-size: 12px; color: #7e8481; }

.ctw-formula-check {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 1px solid #2c3031;
  margin-left: auto;
}

.ctw-formula-btn.active .ctw-formula-check {
  background: #1c9d52;
  border-color: #1c9d52;
  color: #04140a;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

#ctw-main-content{
  margin-top:12px;
}

/* ── Groups ── */
.ctw-group {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid #2b3032;
}

.ctw-group:first-child { margin-top: 22px; padding-top: 0; border-top: none; }

.ctw-group-title {
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: 15px;
}

.ctw-group-note { font-size: 13px; color: #7e8481; margin-top: 4px; text-wrap: pretty; }

.ctw-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px 28px;
  margin-top: 18px;
}

.ctw-fields-col {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 18px;
}

.ctw-panel {
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid #23282a;
  border-radius: 11px;
  background: #131415;
}

.ctw-panel .ctw-fields-grid{
  margin-top:0;
}

.ctw-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

.ctw-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ctw-label { font-size: 13px; font-weight: 500; letter-spacing: .01em; }
.ctw-req-dot { color: #f0c95c; font-size: 13px; }

.ctw-opt-badge {
  font-size: 11px;
  color: #7e8481;
  background: #191c1d;
  border: 1px solid #24282a;
  padding: 2px 7px;
  border-radius: 5px;
}

.ctw-counter { margin-left: auto; font-size: 11px; color: #7e8481; }

/* ── Inputs ── */
.ctw-input, .ctw-select {
  width: 100%;
  min-height: 44px;
  background: #161819;
  border: 1px solid #2a2e2f;
  border-radius: 9px;
  padding: 0 14px;
  font-size: 15px;
  color: #e8eae9;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color .15s;
}

.ctw-input:focus, .ctw-select:focus { border-color: #1c9d52; }
.ctw-input.err { background: #191314; border-color: #7e3238; }
.ctw-input[type="password"] { letter-spacing: .15em; }
.ctw-input[type="number"] { -moz-appearance: textfield; }
.ctw-input[type="number"]::-webkit-outer-spin-button,
.ctw-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

.ctw-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa09d' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.ctw-select option { background: #161819; color: #e8eae9; }

.ctw-hint { font-size: 12px; color: #7e8481; text-wrap: pretty; }

.ctw-field-error {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  color: #ff9fa4;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transition: max-height .22s ease, opacity .18s ease, margin-top .22s ease;
}

.ctw-field-error.visible {
  max-height: 80px;
  opacity: 1;
  margin-top: 5px;
}
.ctw-field-error-icon { font-weight: 700; flex: none; }

/* ── Date picker button ── */
.ctw-date-btn {
  width: 100%;
  min-height: 44px;
  background: #161819;
  border: 1px solid #2a2e2f;
  border-radius: 9px;
  padding: 0 14px;
  color: #e8eae9;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-family: inherit;
  transition: border-color .15s;
}

.ctw-date-btn:hover { border-color: #3a4a41; }
.ctw-date-btn.err { background: #191314; border-color: #7e3238; }
.ctw-date-btn-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.ctw-date-display { font-size: 15px; }
.ctw-date-tz { font-size: 12px; color: #7e8481; }

.ctw-date-picker-wrap { position: relative; }

.ctw-date-picker {
  position: absolute;
  z-index: 25;
  top: 50px;
  left: 0;
  width: 288px;
  max-width: 88vw;
  background: #131415;
  border: 1px solid #2a2e2f;
  border-radius: 11px;
  padding: 14px;
  box-shadow: 0 18px 44px rgba(0,0,0,.55);
}

.ctw-cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ctw-cal-nav-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid #24282a;
  background: #161819;
  color: #c9cecb;
  cursor: pointer;
  font-size: 16px;
}

.ctw-cal-month { font-size: 14px; font-weight: 600; }

.ctw-cal-daynames {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-top: 12px;
  font-size: 11px;
  color: #7e8481;
  text-align: center;
}

.ctw-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-top: 5px;
}

.ctw-cal-day {
  height: 34px;
  border-radius: 7px;
  border: 1px solid #24282a;
  background: #161819;
  color: #dfe3e1;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .12s;
}

.ctw-cal-day:hover { border-color: #2c6b45; }
.ctw-cal-day.sel { background: #1c9d52; border-color: #1c9d52; color: #04140a; font-weight: 700; }
.ctw-cal-day.dis { background: transparent; border: none; color: #4a4f4d; cursor: default; }
.ctw-cal-blank { height: 34px; }

.ctw-cal-time {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #23282a;
}

.ctw-cal-time-label { font-size: 12px; color: #8b918e; }

.ctw-cal-time-controls { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.ctw-cal-time-btn {
  width: 30px; height: 32px;
  border-radius: 7px;
  border: 1px solid #24282a;
  background: #161819;
  color: #c9cecb;
  cursor: pointer;
  font-size: 16px;
}

.ctw-cal-clock { min-width: 58px; text-align: center; font-size: 15px; font-variant-numeric: tabular-nums; }

.ctw-cal-min-btn {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid #24282a;
  background: #161819;
  color: #c9cecb;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}

.ctw-cal-actions { display: flex; gap: 8px; margin-top: 12px; }

.ctw-cal-clear {
  flex: 1; min-height: 38px;
  border-radius: 8px;
  border: 1px solid #2a2e2f;
  background: #161819;
  color: #c9cecb;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.ctw-cal-done {
  flex: 1; min-height: 38px;
  border-radius: 8px;
  border: 0;
  background: #1c9d52;
  color: #04140a;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

/* ── Choice pills / boxes ── */
.ctw-choice-wrap { display: flex; gap: 10px; flex-wrap: wrap; }

.ctw-box-btn {
  flex: 1 1 190px;
  min-width: 170px;
  text-align: left;
  padding: 13px 15px;
  border-radius: 9px;
  background: #161819;
  border: 1px solid #2a2e2f;
  cursor: pointer;
  color: #c9cecb;
  transition: border-color .15s;
  font-family: inherit;
}

.ctw-box-btn:hover { border-color: #3a4a41; }
.ctw-box-btn.active { background: #161c18; border-color: #23402d; color: #e8eae9; }

.ctw-box-btn-head { display: flex; align-items: center; gap: 9px; }

.ctw-box-radio {
  width: 16px; height: 16px;
  flex: none;
  border-radius: 50%;
  border: 1px solid #3a4041;
}

.ctw-box-btn.active .ctw-box-radio {
  background: #1c9d52;
  border-color: #1c9d52;
  color: #04140a;
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.ctw-box-label { font-size: 13px; font-weight: 600; }
.ctw-box-desc { display: block; font-size: 11px; color: #7e8481; margin-top: 5px; line-height: 1.5; text-wrap: pretty; }
.ctw-box-btn.active .ctw-box-desc { color: #8b918e; }

.ctw-pill-btn {
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid #2a2e2f;
  border-radius: 8px;
  background: #161819;
  color: #c9cecb;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
  font-family: inherit;
}

.ctw-pill-btn:hover { border-color: #3a4a41; color: #e8eae9; }
.ctw-pill-btn.active { background: #1c9d52; border-color: #2c6b45; color: #04140a; font-weight: 700; }
.ctw-pill-btn.locked { border-style: dashed; background: #121314; color: #6d7370; cursor: not-allowed; }

/* ── Game autocomplete ── */
.ctw-game-wrap { position: relative; }

.ctw-game-dropdown {
  position: absolute;
  z-index: 20;
  top: 50px;
  left: 0; right: 0;
  max-height: 220px;
  overflow: auto;
  background: #131415;
  border: 1px solid #2a2e2f;
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
}

.ctw-game-option {
  text-align: left;
  min-height: 40px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #dfe3e1;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background .1s, color .1s;
}

.ctw-game-option:hover { background: #1b211d; color: #fff; }
.ctw-game-no-results { padding: 10px 11px; font-size: 13px; color: #7e8481; }

/* ── RTE editor ── */
.ctw-rte-wrap {
  border: 1px solid #2a2e2f;
  border-radius: 10px;
  background: #131415;
  overflow: hidden;
}

.ctw-rte-toolbar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 7px;
  border-bottom: 1px solid #23282a;
  background: #101112;
}

.ctw-rte-btn {
  min-width: 34px;
  min-height: 34px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid #24282a;
  background: #161819;
  color: #c9cecb;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .12s, color .12s;
  font-family: inherit;
}

.ctw-rte-btn:hover { border-color: #2c6b45; color: #e8eae9; }

.ctw-rte-editor {
  min-height: 120px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  color: #e8eae9;
}

.ctw-rte-editor:empty::before {
  content: attr(data-ph);
  color: #6d7370;
}

/* ── Upload area ── */
.ctw-upload-wrap { display: flex; gap: 14px; flex-wrap: wrap; }

.ctw-upload-drop {
  min-height: 170px;
  border: 1px dashed #2f3436;
  border-radius: 11px;
  background: #131415;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  gap: 6px;
  cursor: pointer;
  transition: border-color .15s;
}

.ctw-upload-drop:hover { border-color: #3a4a41; }
.ctw-upload-cta { font-size: 13px; color: #c9cecb; }
.ctw-upload-hint { font-size: 11px; color: #6d7370; }

.ctw-upload-guidelines {
  flex: 1 1 220px;
  background: #131415;
  border: 1px solid #1e2122;
  border-radius: 11px;
  padding: 14px;
}

.ctw-upload-guidelines-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.ctw-upload-rules { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #9aa09d; line-height: 1.5; }

.ctw-upload-preview {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  display: none;
  margin-top: 10px;
}

/* ── Review ── */
.ctw-review-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

.ctw-review-item {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid #1e2122;
  background: #131415;
  cursor: pointer;
  color: #e8eae9;
  min-height: 50px;
  width: 100%;
  font-family: inherit;
  transition: border-color .15s;
}

.ctw-review-item:hover { border-color: #2c3031; }
.ctw-review-step { font-size: 13px; font-weight: 600; min-width: 0; flex: 1; text-align: left; }
.ctw-review-value { font-size: 12px; color: #8b918e; text-align: right; min-width: 0; }

.ctw-review-ok {
  width: 20px; height: 20px;
  flex: none;
  border-radius: 50%;
  background: #23402d;
  color: #5ee08f;
  font-size: 11px;
  display: grid;
  place-items: center;
}

.ctw-review-bad {
  min-width: 20px;
  height: 20px;
  flex: none;
  padding: 0 6px;
  border-radius: 999px;
  background: #4d2a2c;
  color: #ff9fa4;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ── Footer nav ── */
.ctw-footer {
  border-top: 1px solid #1e2122;
  background: #0d0e0f;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px clamp(16px,3.2vw,44px);
}

.ctw-back-btn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 9px;
  border: 1px solid #2a2e2f;
  background: #141516;
  color: #c9cecb;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s;
}

.ctw-back-btn:hover { border-color: #3a4041; color: #e8eae9; }

.ctw-progress-wrap {
  flex: 1 1 170px;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ctw-progress-text { font-size: 12px; color: #7e8481; }

.ctw-progress-bar {
  height: 5px;
  border-radius: 99px;
  background: #1c1f20;
  overflow: hidden;
}

.ctw-progress-fill { height: 100%; background: #1c9d52; transition: width .3s; }

.ctw-save-btn {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: #9aa09d;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: color .15s;
}

.ctw-save-btn:hover { color: #e8eae9; }

.ctw-next-btn, .ctw-create-btn {
  min-height: 42px;
  padding: 0 26px;
  border-radius: 9px;
  border: 0;
  background: #1c9d52;
  color: #04140a;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}

.ctw-next-btn:hover, .ctw-create-btn:hover { background: #25b661; }

.ctw-create-btn:disabled { background: #1c4030; color: #3a6b52; cursor: not-allowed; }

.ctw-quick-submit-btn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 9px;
  border: 1.5px solid #1c9d52;
  background: transparent;
  color: #1c9d52;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.ctw-quick-submit-btn:hover { background: #1c9d52; color: #04140a; }

/* ── Toast ── */
.ctw-toast {
  position: fixed;
  z-index: 60;
  right:1%;
  bottom: 24px;
  background: #12261a;
  border: 1px solid #2c6b45;
  color: #bdf0d0;
  font-family: Montserrat;
  font-size: 13px;
  padding: 11px 16px;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0,0,0,.5);
  display: none;
}

.ctw-toast.visible {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ctw-toast-action {
  padding: 3px 10px;
  border: 1px solid #3a8a5a;
  border-radius: 5px;
  background: transparent;
  color: #5ee08f;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
}
.ctw-toast-action:hover { background: #0e2018; }

/* ── Crop modal ── */
#ctw-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.78);
  padding: 16px;
}
.ctw-crop-box {
  background: #101112;
  border: 1px solid #1e2122;
  border-radius: 14px;
  width: min(92vw, 540px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0,0,0,.6);
}
.ctw-crop-title {
  font-family: Poppins, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #e8eae9;
  padding: 15px 20px;
  border-bottom: 1px solid #1e2122;
}
.ctw-crop-canvas-wrap {
  padding: 14px;
  background: #080909;
  max-height: 440px;
  overflow: hidden;
}
.ctw-crop-canvas-wrap img { display: block; max-width: 100%; }
.ctw-crop-actions {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid #1e2122;
  justify-content: flex-end;
}
#ctw-crop-cancel {
  padding: 8px 18px;
  border: 1px solid #1e2122;
  border-radius: 8px;
  background: transparent;
  color: #9aa09d;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
#ctw-crop-cancel:hover { background: #181a1b; }
#ctw-crop-confirm {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  background: #1c9d52;
  color: #04140a;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
#ctw-crop-confirm:hover { background: #22b85f; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .ctw-sidebar { max-width: 100%; border-right: none; border-bottom: 1px solid #1e2122; }
  .ctw-step-heading-title { font-size: 18px; }
  .ctw-card{
    margin:10px;
  }
}

/* ── Scoring row inputs (multipliers / bonus points) ── */
.mtw-pts-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid #1e2122;
  background: #131415;
  margin-top: 6px;
}

.mtw-pts-lbl {
  min-width: 32px;
  font-size: 13px;
  color: #9aa09d;
}

.mtw-pts-inp {
  width: 90px;
  min-height: 40px;
  background: #161819;
  border: 1px solid #2a2e2f;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  color: #e8eae9;
  outline: none;
  font-family: inherit;
}

.mtw-pts-inp:focus { border-color: #1c9d52; }

.mtw-pts-val {
  font-size: 14px;
  font-weight: 600;
  color: #e8eae9;
  min-width: 40px;
}

.mtw-pts-unit {
  font-size: 12px;
  color: #7e8481;
}

.mtw-pts-rm {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #2c3031;
  background: transparent;
  color: #7e8481;
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  margin-left: auto;
}

.mtw-pts-rm:hover { border-color: #7e3238; color: #ff9fa4; }

.mtw-pts-add-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #2a2e2f;
  background: transparent;
  color: #9aa09d;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .12s, color .12s;
  white-space: nowrap;
  margin-left: auto;
}

.mtw-pts-add-btn:hover { border-color: #3a4a41; color: #e8eae9; }

/* ── IscrimRTE ───────────────────────────────────────────────────────────── */
.rte-wrap {
  border: 1px solid #2a2e2f;
  border-radius: 9px;
  overflow: hidden;
  transition: border-color .15s;
  background: #0f1011;
}
.rte-wrap:focus-within { border-color: #3d4242; }

.rte-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 5px 8px;
  border-bottom: 1px solid #1e2122;
  background: #131415;
}

.rte-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #9aa09d;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.3;
  padding: 3px 8px;
  min-width: 28px;
  text-align: center;
  transition: background .1s, color .1s, border-color .1s;
}
.rte-btn:hover { background: #1e2122; color: #c8ceca; }
.rte-btn.active { background: #1e2122; border-color: #3d4242; color: #e8eae9; }

.rte-sep { width: 1px; height: 16px; background: #2a2e2f; margin: 0 4px; flex-shrink: 0; }

.rte-editor {
  padding: 11px 14px;
  color: #c8ceca;
  font-size: 14px;
  line-height: 1.65;
  font-family: inherit;
  outline: none;
  word-break: break-word;
}
.rte-editor:empty::before {
  content: attr(data-placeholder);
  color: #4a5350;
  pointer-events: none;
  display: block;
}
.rte-editor p            { margin: 0 0 6px; }
.rte-editor p:last-child { margin-bottom: 0; }
.rte-editor ul,
.rte-editor ol           { padding-left: 20px; margin: 4px 0; }
.rte-editor li           { margin: 2px 0; }
.rte-editor strong       { font-weight: 700; }
.rte-editor em           { font-style: italic; }
.rte-editor a            { color: #2fcc6b; text-decoration: underline; }
.rte-editor a:hover      { color: #3fe07a; }
.rte-editor h2           { font-size: 20px; font-weight: 700; margin: 6px 0 4px; color: #e2e8e5; line-height: 1.3; }
.rte-editor h2:last-child { margin-bottom: 0; }
.rte-editor h3           { font-size: 16px; font-weight: 600; margin: 5px 0 3px; color: #d4dbd7; line-height: 1.3; }
.rte-editor h3:last-child { margin-bottom: 0; }
