.dashboard-grid {
  display: block;
}
.dashboard-tidy-card,
.dashboard-tasks-card,
.dashboard-games {
  grid-column: 1 / -1;
}
.dashboard-tasks-card { margin-bottom: 14px; }
#dashboardTasks {
  display: flex;
  justify-content: space-around;
  gap: 18px;
}
.dashboard-task-group { flex: 1 1 0; margin-top: 0; }
.dashboard-task-group .role-header { margin-bottom: 8px; }
.dashboard-task-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.dashboard-task-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 54px;
  padding: 4px;
  text-align: center;
}
.dashboard-task-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.dashboard-task-icon { margin-bottom: 2px; }
.dashboard-task-name {
  font-family: inherit;
  display: block;
  font-size: 0.5rem;
  font-weight:normal;
  color:#fff;
  line-height:1.05;
}
.dashboard-task-check {
  display: none;
}
.dashboard-task-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.dashboard-task-check span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 7px;
  background: rgba(13, 19, 74, 0.32);
}
.dashboard-task-check input:checked + span {
  border-color: color-mix(in srgb, var(--grad-color) 20%, var(--bg) 100%);
  background: var(--grad-color);
}
.dashboard-task-check input:checked + span::after {
  content: "✓";
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}
.dashboard-task-check input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.dashboard-games .dashboard-daily-section { display: none; }
.dashboard-games {
  display: flex;
  flex-direction: column;
  gap:1em;
}
.dashboard-tidy-card,
.dashboard-tasks-card,
.dashboard-game-card {
  padding:0;
  min-width: 0;

  & > * {
    margin:8px;
  }

  & .card-header {
    justify-content: center;
  }
}
.dashboard-game-banner {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius:var(--radius);
}
.dashboard-game-header {
  margin: -1px -1px 0;
  border-radius: var(--radius) var(--radius) 0 0;
  min-height:auto;
}
.detail-modal-header-image-icon {
  --icon-size:34px;
  --shadow-col: var(--text);
  display:block;
  position:relative;
  width: var(--icon-size);
  height: var(--icon-size);
  overflow:hidden;

  &::before {
    content: "";
    position: absolute;
    display:block;
    width: var(--icon-size);
    height: var(--icon-size);
    inset: 0;
    background: var(--shadow-col);
    -webkit-mask: var(--icon-src) center / contain no-repeat;
    mask: var(--icon-src) center / contain no-repeat;
  }
}
.dashboard-game-header .detail-modal-header-image {
  min-width: var(--icon-size);
  height: var(--icon-size);
  transform: translateY(var(--icon-size));
  filter:none;
}
.dashboard-game-header .modal-title {
  text-align: center;
}
.dashboard-h2 {
  margin: 2em 0 0 0;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 0.96;
  text-align: center;
}
.dashboard-tidy-filters,
.dashboard-check-row,
.dashboard-progress-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0px;
  align-items: center;
}
.dashboard-tidy-filters {
  margin: 0 10px 12px;
}
@media (max-width: 520px) {
  #dashboardTasks { gap: 8px; }
  .dashboard-task-group { min-width: 0; }
  .dashboard-task-row { gap: 4px; }
}
.dashboard-progress-row {
  justify-content: space-between;
}
.dashboard-progress-row > .role-header {
  flex: 0 0 100%;
  width: 100%;
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.dashboard-progress-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow:1;
  text-align: center;
}
.dashboard-progress-item span {
  color: var(--muted);
  font-size: 0.78rem;
}
.dashboard-progress-item strong {
  color: var(--gold);
  font-size: 0.75rem;
}
.dashboard-progress-detail {
  display: inline-flex;
  flex-direction:column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.dashboard-progress-doughnut {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  background: conic-gradient(
    var(--muted) var(--progress),
    var(--slot-color-faint) 0
  );
  -webkit-mask: radial-gradient(circle, transparent 0 35%, #000 36%);
  mask: radial-gradient(circle, transparent 0 35%, #000 36%);
}
.dashboard-progress-doughnut.complete {
  /* A full ring should be a solid disc. A conic gradient with a stop at
     100% can leave a one-pixel seam on small, anti-aliased mobile rings. */
  background: var(--gold);
}
.dashboard-check-row {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.dashboard-game-section {
  margin-top: 14px;
}
.dashboard-game-section > .role-header,
.dashboard-daily-section > .role-header {
  margin-bottom: 8px;
}
.dashboard-game-section:has(.dashboard-empty) {
  display: none;
}
.dashboard-game-section h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}
.dashboard-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(20, 28, 92, 0.72);
}
.dashboard-panel-wide {
  grid-column: 1 / -1;
}
.dashboard-panel h2 {
  margin: 0 0 12px;
}
.dashboard-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.dashboard-note,
.dashboard-empty {
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}
.dashboard-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
}
.dashboard-schedule-group {
  margin-bottom: 16px;
}
.dashboard-schedule-group .location-header {
  margin: 0 0 8px;
  height: 2em;
}
.dashboard-schedule-cards .critter-meta .location {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.2;
}
.dashboard-schedule-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, 80px);
  gap: 8px;
}
.dashboard-schedule-cards .critter-slot {
  position: relative;
  left: auto;
  right: auto;
  min-height: 0px;
  width: 80px;
}
.dashboard-schedule-cards .critter-card {
  min-height: 0px;
  cursor: pointer;
  width: 100%;
}
.dashboard-mini-card,
.dashboard-character {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
}
.dashboard-mini-card img,
.dashboard-character img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.dashboard-mini-card span,
.dashboard-character span {
  display: grid;
  gap: 2px;
  font-size: 0.9rem;
}
.dashboard-mini-card small,
.dashboard-character small,
.dashboard-ring-row small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}
.dashboard-check-list {
  display: grid;
  gap: 10px;
}
.dashboard-check {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dashboard-tidy {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0px;
}
.dashboard-tidy > .drop-rate-explanation {
  grid-column: 1 / -1;
  margin: 0 0 8px;
}
.dashboard-tidy-column {
  display: grid;
  align-content: start;
  gap: 0px;
}
.dashboard-tidy-characters {
  grid-column: span 2;
}
.dashboard-tidy-character-groups {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 0px;
}
.dashboard-tidy-character-groups small {
  padding-top: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  white-space: nowrap;
  margin-bottom: 8px;
}
.dashboard-tidy-column h3 {
  margin: 0;
  font-size: 1rem;
}
.dashboard-tidy-column .character-image {
  object-fit: contain;
}
.dashboard-mini-list {
  display: grid;
  gap: 6px;
}
.dashboard-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.dashboard-progress-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}
.dashboard-progress-card h3 {
  margin: 0 0 10px;
}
.dashboard-ring-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
.dashboard-ring {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: conic-gradient(
    var(--gold) var(--ring-percent),
    rgba(255, 255, 255, 0.14) 0
  );
  position: relative;
}
.dashboard-ring::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #202778;
}
.dashboard-ring b {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
}
@media (max-width: 700px) {
  .dashboard-grid,
  .dashboard-tidy,
  .dashboard-games {
    grid-template-columns: 1fr;
  }
  .dashboard-tidy-characters {
    grid-column: auto;
  }
  .dashboard-panel-wide {
    grid-column: auto;
  }
}
