.lis-game {
  display: grid;
  gap: 14px;
}

.lis-brief {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #d5dde8;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.lis-brief-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fafc, #eef7f4);
  border: 1px solid #c8d7d5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 4px;
  padding: 7px;
}

.lis-brief-icon span {
  border-radius: 5px 5px 2px 2px;
  background: #0f766e;
  min-height: 16px;
}

.lis-brief-icon span:nth-child(2) {
  min-height: 28px;
  background: #2563eb;
}

.lis-brief-icon span:nth-child(3) {
  min-height: 38px;
  background: #d97706;
}

.lis-brief-title {
  color: #17202a;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
}

.lis-brief-text {
  margin-top: 3px;
  color: #475467;
  font-size: 14px;
  line-height: 1.45;
}

.lis-board {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 32%),
    linear-gradient(#ffffff, #f6f8fb);
  padding: 14px;
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.lis-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.lis-stat {
  min-width: 0;
  border: 1px solid #d6deea;
  border-radius: 8px;
  background: #ffffff;
  padding: 9px 10px;
  display: grid;
  gap: 2px;
}

.lis-stat span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.lis-stat strong {
  color: #17202a;
  font-size: 21px;
  font-weight: 950;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.lis-section {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.lis-section-head {
  min-height: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: #344054;
  font-size: 14px;
  font-weight: 850;
}

.lis-section-head strong {
  min-width: 0;
  color: #17202a;
  text-align: right;
  overflow-wrap: anywhere;
}

.lis-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  gap: 7px;
}

.lis-card {
  min-width: 0;
  min-height: 66px;
  border: 2px solid #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
  color: #17202a;
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 6px 4px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition: transform 150ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.lis-card:active,
.lis-shelf:active,
.lis-btn:active {
  transform: scale(0.97);
}

.lis-card span,
.lis-card small {
  color: #667085;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.05;
}

.lis-card strong {
  color: #17202a;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

.lis-card-current {
  border-color: #2563eb;
  background: #dbeafe;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.lis-card-picked {
  border-color: #0f766e;
  background: #d7f4ef;
  transform: translateY(-5px);
}

.lis-card-done {
  border-color: #9bcbbf;
  background: #effcf8;
}

.lis-card-waiting {
  background: #f2f4f7;
  color: #667085;
  opacity: 0.72;
}

.lis-card-wrong {
  border-color: #b42318;
  background: #fff1f0;
  animation: lis-shake 360ms ease;
}

.lis-rack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.lis-shelf {
  position: relative;
  min-width: 0;
  min-height: 128px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fafc 74%, #e4ebf2 75% 100%);
  color: #17202a;
  padding: 9px 6px 8px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 6px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  box-shadow: inset 0 -5px 0 rgba(30, 41, 59, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.lis-shelf-ready {
  border-color: #96b8d8;
  background:
    linear-gradient(180deg, #ffffff 0%, #f0f7ff 74%, #d8e8f8 75% 100%);
}

.lis-shelf-hit {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16), inset 0 -5px 0 rgba(30, 41, 59, 0.06);
}

.lis-shelf-wrong {
  border-color: #b42318;
  background: #fff1f0;
  animation: lis-shake 360ms ease;
}

.lis-shelf-tag {
  width: 26px;
  min-height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #17202a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
}

.lis-shelf-foot {
  min-height: 18px;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
}

.lis-empty-slot {
  width: 52px;
  min-height: 60px;
  border: 2px dashed #98a2b3;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #667085;
  font-size: 28px;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.72);
}

.lis-pile {
  position: relative;
  width: 56px;
  min-height: 72px;
}

.lis-pile-shadow {
  position: absolute;
  left: -5px;
  top: 5px;
  width: 24px;
  min-height: 20px;
  border-radius: 999px;
  background: #eef2f6;
  color: #475467;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  z-index: 4;
}

.lis-pile-card {
  position: absolute;
  left: 50%;
  top: calc(var(--lis-offset) * 12px);
  width: 52px;
  min-height: 50px;
  transform: translateX(-50%);
  border: 1px solid #aab6c5;
  border-radius: 8px;
  background: #ffffff;
  color: #17202a;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 950;
  box-shadow: 0 8px 16px rgba(20, 31, 50, 0.1);
}

.lis-pile-top {
  border-color: #0f766e;
  background: #e7f6ef;
  z-index: 3;
}

.lis-pile-new {
  animation: lis-drop 420ms ease;
}

.lis-pile-replaced {
  opacity: 0.66;
  transform: translateX(-50%) translateY(4px) scale(0.94);
}

.lis-tails,
.lis-history {
  min-height: 48px;
  border: 1px dashed #a7b0be;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  color: #475467;
  font-size: 14px;
  font-weight: 750;
}

.lis-tails-label {
  min-height: 32px;
  border-radius: 999px;
  background: #17202a;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.lis-tails-empty {
  color: #98a2b3;
  font-weight: 900;
}

.lis-tail-chip,
.lis-history-chip {
  min-height: 34px;
  border-radius: 999px;
  background: #eef2f6;
  color: #344054;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 900;
}

.lis-tail-hot {
  background: #d7f4ef;
  color: #0f514b;
  animation: lis-pop 300ms ease;
}

.lis-history-chip strong {
  color: #17202a;
}

.lis-history-chip span {
  color: #667085;
}

.lis-status {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  padding: 11px 12px;
  line-height: 1.45;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.lis-status-good {
  border-color: #147d4f;
  background: #e7f6ef;
  color: #0b5f3d;
}

.lis-status-warn {
  border-color: #b45309;
  background: #fff7ed;
  color: #7c2d12;
}

.lis-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.lis-btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #17202a;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
}

.lis-btn-primary {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.lis-card:focus-visible,
.lis-shelf:focus-visible,
.lis-btn:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.26);
  outline-offset: 2px;
}

@keyframes lis-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes lis-drop {
  0% { transform: translateX(-50%) translateY(-18px) scale(0.92); opacity: 0; }
  100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

@keyframes lis-pop {
  0% { transform: scale(0.78); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 620px) {
  .lis-board {
    padding: 12px;
  }

  .lis-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .lis-stat {
    padding: 8px 7px;
  }

  .lis-stat strong {
    font-size: 18px;
  }

  .lis-deck {
    grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
    gap: 6px;
  }

  .lis-card {
    min-height: 62px;
  }

  .lis-rack {
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 7px;
  }

  .lis-shelf {
    min-height: 122px;
    padding-left: 5px;
    padding-right: 5px;
  }
}

@media (max-width: 420px) {
  .lis-brief {
    grid-template-columns: 1fr;
  }

  .lis-brief-icon {
    width: 48px;
    height: 48px;
  }

  .lis-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .lis-section-head strong {
    text-align: left;
  }

  .lis-stats {
    grid-template-columns: 1fr 1fr;
  }

  .lis-stat:last-child {
    grid-column: 1 / -1;
  }

  .lis-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .lis-btn {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .lis-board {
    padding: 10px;
  }

  .lis-deck {
    grid-template-columns: repeat(auto-fit, minmax(46px, 1fr));
  }

  .lis-card strong {
    font-size: 18px;
  }

  .lis-rack {
    grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  }

  .lis-pile,
  .lis-empty-slot {
    width: 50px;
  }

  .lis-pile-card {
    width: 48px;
  }
}
