:root {
  --dofus-bg: #f3efe8;
  --dofus-ink: #463f3b;
  --dofus-muted: #756d66;
  --dofus-border: rgba(90, 76, 61, 0.12);
  --dofus-sand: #d7ccb8;
  --dofus-sand-strong: #cfc2ac;
  --dofus-sun: #f7c55f;
  --dofus-lime: #a7e512;
  --dofus-white: #fffdf9;
}

.dofus-run-page {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 28rem),
    linear-gradient(180deg, #f8f5ef 0%, var(--dofus-bg) 100%);
  color: var(--dofus-ink);
  font-size: 0.97rem;
  line-height: 1.6;
}

.dofus-run-shell {
  max-width: 1440px;
}

.dofus-dashboard-layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1180px) {
  .dofus-dashboard-layout {
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: start;
  }
}

.dofus-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dofus-sidebar-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(70, 63, 59, 0.62);
}

.dofus-sidebar-link {
  display: block;
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(70, 63, 59, 0.08);
  color: var(--dofus-ink);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.dofus-sidebar-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.96);
}

.dofus-sidebar-link.is-active {
  background: rgba(167, 229, 18, 0.18);
  border-color: rgba(118, 177, 15, 0.38);
}

.dofus-sidebar-link.is-admin {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.18);
  color: #991b1b;
  font-weight: 700;
}

.dofus-run-breadcrumb {
  color: var(--dofus-muted);
}

.dofus-run-breadcrumb a {
  color: var(--dofus-ink);
}

.dofus-run-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 1024px) {
  .dofus-run-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
    align-items: start;
  }
}

.dofus-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--dofus-border);
  border-radius: 1.9rem;
  background: var(--dofus-white);
  box-shadow: 0 8px 30px rgba(54, 43, 30, 0.06);
}

.dofus-card--sand {
  background: var(--dofus-sand);
}

.dofus-card--sun {
  background: var(--dofus-sun);
}

.dofus-card--lime {
  background: var(--dofus-lime);
}

.dofus-card--plain {
  background: rgba(255, 253, 249, 0.82);
  backdrop-filter: blur(8px);
}

.dofus-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  background: rgba(70, 63, 59, 0.08);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dofus-ink);
}

.dofus-title {
  font-size: clamp(1.85rem, 3vw, 2.7rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--dofus-ink);
}

.dofus-subtitle {
  color: var(--dofus-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.dofus-subtitle p,
.dofus-run-card-copy p {
  margin: 0 0 1rem;
}

.dofus-subtitle p:last-child,
.dofus-run-card-copy p:last-child {
  margin-bottom: 0;
}

.dofus-subtitle ul,
.dofus-run-card-copy ul {
  margin: 1rem 0 1rem 1.4rem;
  padding: 0;
  list-style: disc;
}

.dofus-subtitle ol,
.dofus-run-card-copy ol {
  margin: 1rem 0 1rem 1.4rem;
  padding: 0;
  list-style: decimal;
}

.dofus-subtitle li,
.dofus-run-card-copy li {
  margin-bottom: 0.45rem;
  display: list-item;
}

.dofus-subtitle ul ul,
.dofus-run-card-copy ul ul {
  list-style: circle;
  margin-top: 0.5rem;
}

.dofus-subtitle ol ol,
.dofus-run-card-copy ol ol {
  list-style: lower-alpha;
  margin-top: 0.5rem;
}

.dofus-hero-cover {
  display: block;
  width: 100%;
  height: min(33vw, 520px);
  min-height: 260px;
  object-fit: cover;
  border-radius: 1.5rem;
  border: 1px solid rgba(70, 63, 59, 0.12);
}

.dofus-meta-grid {
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .dofus-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dofus-stat {
  border-radius: 1.35rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(70, 63, 59, 0.09);
}

.dofus-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: rgba(70, 63, 59, 0.6);
}

.dofus-stat-value {
  margin-top: 0.3rem;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--dofus-ink);
}

.dofus-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  padding: 0.9rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dofus-btn:hover {
  transform: translateY(-1px);
}

.dofus-btn--lime {
  background: var(--dofus-lime);
  color: var(--dofus-ink);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.dofus-btn--ghost {
  background: rgba(255, 255, 255, 0.68);
  color: var(--dofus-ink);
  border: 1px solid rgba(70, 63, 59, 0.12);
}

.dofus-btn--admin {
  background: #dc2626;
  color: #fff;
  border: 1px solid #b91c1c;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.18);
}

.dofus-btn--small {
  padding: 0.62rem 0.9rem;
  font-size: 0.78rem;
  border-radius: 0.85rem;
}

.dofus-mini-list {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .dofus-mini-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dofus-mini-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.dofus-mini-badge {
  flex: none;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.75);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.dofus-mini-item h3,
.dofus-mini-item h4 {
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--dofus-ink);
}

.dofus-mini-item p {
  margin-top: 0.2rem;
  color: rgba(70, 63, 59, 0.74);
  font-size: 0.88rem;
  line-height: 1.5;
}

.dofus-run-cards {
  display: grid;
  gap: 1rem;
}

.dofus-run-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
  padding: 1.4rem;
}

.dofus-run-card.is-large {
  padding: 1.9rem;
}

.dofus-run-card-title {
  font-size: clamp(1.35rem, 2vw, 1.95rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dofus-run-card-copy {
  color: rgba(70, 63, 59, 0.82);
  line-height: 1.65;
}

.dofus-run-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.dofus-run-chip {
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(70, 63, 59, 0.08);
  font-size: 0.78rem;
  font-weight: 600;
}

.dofus-run-card-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
}

.dofus-run-arrow {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(70, 63, 59, 0.13);
  background: rgba(255, 255, 255, 0.6);
  font-size: 1.35rem;
  font-weight: 700;
}

.dofus-run-side-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .dofus-run-side-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dofus-admin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.dofus-progress-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dofus-progress-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-left: auto;
}

.dofus-save-progress-btn {
  position: fixed;
  right: max(1rem, calc((100vw - 1440px) / 2 + 1rem));
  bottom: 4.75rem;
  z-index: 10000;
  min-width: 260px;
  box-shadow: 0 16px 38px rgba(54, 43, 30, 0.22), inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

@media (max-width: 720px) {
  .dofus-progress-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dofus-progress-buttons {
    margin-left: 0;
    width: 100%;
  }

  .dofus-progress-buttons .dofus-btn:not(.dofus-save-progress-btn),
  .dofus-save-progress-btn {
    width: 100%;
  }

  .dofus-save-progress-btn {
    right: 1rem;
    left: 1rem;
    bottom: 4.5rem;
    min-width: 0;
    width: auto;
  }
}

.dofus-info-box {
  border-radius: 1.6rem;
  padding: 1.3rem 1.4rem;
  background: rgba(255, 253, 249, 0.75);
  border: 1px solid var(--dofus-border);
  color: var(--dofus-muted);
}

.dofus-section-card {
  background: rgba(255, 253, 249, 0.78);
}

.dofus-section-summary {
  padding: 1.35rem 1.45rem;
}

.dofus-section-table-wrap {
  border-top: 1px solid rgba(70, 63, 59, 0.1);
  overflow-x: auto;
}

.dofus-sheet {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
}

.dofus-sheet thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 1rem;
  background: var(--dofus-sand);
  color: rgba(70, 63, 59, 0.72);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
}

.dofus-sheet tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.55);
}

.dofus-sheet tbody tr:nth-child(even) {
  background: rgba(247, 243, 235, 0.85);
}

.dofus-sheet td {
  padding: 1rem;
  vertical-align: top;
  border-top: 1px solid rgba(70, 63, 59, 0.08);
}

.dofus-step-name {
  font-weight: 700;
  color: var(--dofus-ink);
}

.dofus-step-link {
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: rgba(70, 63, 59, 0.62);
}

.dofus-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dofus-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  background: rgba(167, 229, 18, 0.15);
  color: var(--dofus-ink);
  border: 1px solid rgba(167, 229, 18, 0.28);
  font-size: 0.75rem;
  font-weight: 600;
}

.dofus-kamas {
  white-space: nowrap;
  font-weight: 700;
  color: #43712a;
}

.dofus-muted {
  color: var(--dofus-muted);
}

.dofus-edit-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dofus-edit-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(70, 63, 59, 0.62);
}

.dofus-edit-input,
.dofus-edit-textarea {
  width: 100%;
  border: 1px solid rgba(70, 63, 59, 0.12);
  border-radius: 0.95rem;
  background: rgba(255, 253, 249, 0.92);
  padding: 0.85rem 0.95rem;
  color: var(--dofus-ink);
  font-size: 0.95rem;
  line-height: 1.45;
}

.dofus-edit-input:focus,
.dofus-edit-textarea:focus {
  outline: none;
  border-color: rgba(118, 177, 15, 0.8);
  box-shadow: 0 0 0 4px rgba(167, 229, 18, 0.18);
}

.dofus-edit-textarea {
  resize: vertical;
  min-height: 96px;
}

.dofus-edit-textarea--cell {
  min-height: 72px;
  border-radius: 0.8rem;
}

.dofus-edit-sheet {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
}

.dofus-edit-sheet thead th {
  padding: 0.85rem;
  background: var(--dofus-sand);
  color: rgba(70, 63, 59, 0.72);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
}

.dofus-edit-sheet tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.55);
}

.dofus-edit-sheet tbody tr:nth-child(even) {
  background: rgba(247, 243, 235, 0.86);
}

.dofus-edit-sheet td {
  padding: 0.7rem;
  border-top: 1px solid rgba(70, 63, 59, 0.08);
  vertical-align: top;
}

.dofus-edit-actions {
  width: 64px;
  text-align: center;
}

.dofus-edit-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1px solid rgba(70, 63, 59, 0.12);
  background: rgba(255, 255, 255, 0.75);
  color: var(--dofus-ink);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}

.dofus-step-card {
  position: relative;
}

.dofus-step-shell {
  border: 1px solid rgba(59, 130, 246, 0.45);
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 1.2rem 1.25rem 1.35rem;
  box-shadow: 0 10px 26px rgba(54, 43, 30, 0.05);
}

.dofus-step-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  justify-content: space-between;
}

.dofus-step-order {
  flex: none;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.dofus-step-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dofus-ink);
}

.dofus-step-progress {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: var(--dofus-muted);
}

.dofus-step-content {
  margin-top: 1rem;
  color: var(--dofus-ink);
  line-height: 1.7;
}

.dofus-step-content p {
  margin: 0 0 0.85rem;
}

.dofus-step-content p:last-child {
  margin-bottom: 0;
}

.dofus-step-content a {
  color: #2563eb;
  font-weight: 700;
  text-decoration: underline;
}

.dofus-step-content ul {
  margin: 0.9rem 0 0.9rem 1.3rem;
  list-style: disc;
}

.dofus-step-content ol {
  margin: 0.9rem 0 0.9rem 1.3rem;
  list-style: decimal;
}

.dofus-step-content li {
  display: list-item;
  margin-bottom: 0.35rem;
}

.dofus-step-group {
  margin-top: 1.1rem;
}

.dofus-step-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.dofus-step-group-title {
  color: #2563eb;
  font-size: 0.92rem;
  font-weight: 700;
}

.dofus-checklist {
  display: grid;
  gap: 0.55rem;
}

.dofus-check-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.8rem 0.85rem;
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.dofus-check-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dofus-check-box {
  position: relative;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(70, 63, 59, 0.28);
  background: #fff;
}

.dofus-check-item input:checked + .dofus-check-box {
  background: #16a34a;
  border-color: #16a34a;
}

.dofus-check-item input:checked + .dofus-check-box::after {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.1rem;
  width: 0.3rem;
  height: 0.55rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.dofus-check-label {
  color: var(--dofus-ink);
  line-height: 1.65;
}

.dofus-check-label p {
  margin: 0;
}

.dofus-check-label a {
  color: #2563eb;
  font-weight: 700;
  text-decoration: underline;
}

.dofus-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.dofus-modal.hidden {
  display: none;
}

.dofus-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 24, 27, 0.58);
  backdrop-filter: blur(4px);
}

.dofus-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100% - 2rem));
  max-height: calc(100vh - 3rem);
  overflow: auto;
  margin: 1.5rem auto;
  border-radius: 1.6rem;
  border: 1px solid rgba(70, 63, 59, 0.12);
  background: #fffdf9;
  padding: 1.25rem;
  box-shadow: 0 24px 80px rgba(24, 24, 27, 0.24);
}

.dofus-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dofus-step-editor {
  border: 1px solid rgba(70, 63, 59, 0.08);
  border-radius: 1.25rem;
  background: rgba(247, 243, 235, 0.55);
  padding: 1rem;
}

.dofus-group-editor {
  border: 1px solid rgba(70, 63, 59, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.82);
  padding: 0.9rem;
}

.dofus-check-editor-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

@media (max-width: 860px) {
  .dofus-check-editor-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .dofus-card,
  .dofus-card--sand,
  .dofus-card--sun,
  .dofus-card--lime,
  .dofus-card--plain {
    border-radius: 1.5rem;
  }

  .dofus-hero-cover {
    height: 240px;
  }

  .dofus-run-card.is-large {
    padding: 1.35rem;
  }
}
