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

.isl-shell {
  display: grid;
  gap: 12px;
  overflow: hidden;
  border: 1px solid #cdd6df;
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 252, 0.98)),
    repeating-linear-gradient(0deg, rgba(14, 116, 144, 0.08) 0, rgba(14, 116, 144, 0.08) 1px, transparent 1px, transparent 22px),
    repeating-linear-gradient(90deg, rgba(14, 116, 144, 0.07) 0, rgba(14, 116, 144, 0.07) 1px, transparent 1px, transparent 22px);
}

.isl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.isl-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.isl-compass {
  width: 46px;
  height: 46px;
  border: 2px solid #0f766e;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffffff 0 8px, #d7f4ef 9px 21px, #0f766e 22px 23px);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.isl-compass span {
  width: 8px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #b42318 0 48%, #17202a 49% 100%);
  transform: rotate(36deg);
}

.isl-title {
  color: #17202a;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 850;
}

.isl-subtitle {
  margin-top: 2px;
  color: #53606f;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.isl-badge {
  min-height: 34px;
  border: 1px solid #0f766e;
  border-radius: 8px;
  padding: 6px 10px;
  background: #d7f4ef;
  color: #0b5f59;
  font-size: 13px;
  font-weight: 850;
}

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

.isl-stat {
  min-width: 0;
  min-height: 58px;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.92);
}

.isl-stat span {
  display: block;
  color: #667085;
  font-size: 12px;
  line-height: 1.2;
}

.isl-stat strong {
  display: block;
  margin-top: 4px;
  color: #17202a;
  font-size: 20px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.isl-prompt,
.isl-status {
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.isl-status-good {
  border-color: #98d5b5;
  background: #e7f6ef;
  color: #0f5132;
}

.isl-status-warn {
  border-color: #f3bd8b;
  background: #fff7ed;
  color: #8a3c0a;
}

.isl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.72fr);
  gap: 12px;
  align-items: stretch;
}

.isl-map-panel,
.isl-side,
.isl-card {
  min-width: 0;
}

.isl-map-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.isl-map {
  width: min(100%, 352px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(44px, 1fr));
  gap: 7px;
  border: 1px solid #b8c7d6;
  border-radius: 8px;
  padding: 9px;
  background:
    linear-gradient(180deg, #dff3fb, #cbe8f3),
    repeating-linear-gradient(135deg, rgba(14, 116, 144, 0.11) 0, rgba(14, 116, 144, 0.11) 8px, transparent 8px, transparent 16px);
}

.isl-cell {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  aspect-ratio: 1;
  border: 2px solid rgba(39, 68, 86, 0.26);
  border-radius: 8px;
  padding: 0;
  background: #d9eef7;
  color: #17202a;
  cursor: pointer;
  display: grid;
  place-items: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.isl-cell:focus-visible {
  outline: 3px solid rgba(20, 125, 79, 0.35);
  outline-offset: 2px;
}

.isl-mark {
  display: block;
  width: 70%;
  height: 70%;
  border-radius: 44% 56% 50% 48%;
}

.isl-water {
  background:
    radial-gradient(circle at 70% 25%, rgba(255, 255, 255, 0.58), transparent 18px),
    linear-gradient(145deg, #b7e1f1, #7fc2de);
}

.isl-water .isl-mark {
  width: 66%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 0 rgba(255, 255, 255, 0.42);
}

.isl-land {
  background: linear-gradient(145deg, #f6e6b7, #d6b66b);
}

.isl-land .isl-mark {
  border: 2px solid rgba(95, 81, 36, 0.2);
  background:
    radial-gradient(circle at 28% 28%, #f9f0cf 0 7px, transparent 8px),
    linear-gradient(145deg, #d5b96f, #8f9b54);
  box-shadow: inset 0 -4px 0 rgba(50, 70, 37, 0.16);
}

.isl-scanned {
  opacity: 0.66;
}

.isl-scan {
  opacity: 1;
  border-color: #17202a;
  box-shadow: 0 0 0 3px rgba(23, 32, 42, 0.14);
}

.isl-scan::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid rgba(23, 32, 42, 0.6);
  border-radius: 6px;
  pointer-events: none;
}

.isl-painted {
  opacity: 1;
  border-color: rgba(17, 24, 39, 0.28);
}

.isl-painted .isl-mark {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.13);
}

.isl-tone-teal .isl-mark {
  background: linear-gradient(145deg, #6ee7d8, #0f766e);
}

.isl-tone-blue .isl-mark {
  background: linear-gradient(145deg, #9ed7ff, #2563eb);
}

.isl-tone-gold .isl-mark {
  background: linear-gradient(145deg, #fce08a, #c77700);
}

.isl-tone-rose .isl-mark {
  background: linear-gradient(145deg, #f9b4c6, #be3455);
}

.isl-active {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.34);
}

.isl-frontier {
  border-color: #b45309;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.22);
  animation: isl-pulse 1.15s ease-in-out infinite;
}

.isl-frontier .isl-mark {
  transform: scale(1.04);
}

.isl-locked {
  cursor: default;
}

.isl-wrong {
  border-color: #b42318;
  animation: isl-shake 0.28s ease-in-out;
}

.isl-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  color: #53606f;
  font-size: 12px;
  line-height: 1.25;
}

.isl-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
}

.isl-legend-dot {
  width: 15px;
  height: 15px;
  border-radius: 5px;
  border: 1px solid rgba(17, 24, 39, 0.22);
  flex: 0 0 auto;
}

.isl-legend-water {
  background: #8ac9e2;
}

.isl-legend-land {
  background: #d5b96f;
}

.isl-legend-frontier {
  background: #f6c45d;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
}

.isl-legend-painted {
  background: #0f766e;
}

.isl-side {
  display: grid;
  gap: 10px;
  align-content: start;
}

.isl-card {
  display: grid;
  gap: 9px;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.92);
}

.isl-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.isl-card-head span {
  color: #53606f;
  font-size: 13px;
  font-weight: 800;
}

.isl-card-head strong {
  color: #0f766e;
  font-size: 13px;
  line-height: 1.25;
  text-align: right;
  overflow-wrap: anywhere;
}

.isl-queue {
  min-height: 46px;
  border: 1px dashed #adb7c4;
  border-radius: 8px;
  padding: 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  background: #fbfcfe;
}

.isl-chip {
  min-height: 32px;
  border-radius: 999px;
  padding: 7px 9px;
  background: #fff7ed;
  color: #8a3c0a;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.isl-empty {
  color: #667085;
  font-size: 13px;
  line-height: 1.35;
}

.isl-trail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.isl-trail-cell {
  min-height: 16px;
  border-radius: 4px;
  border: 1px solid #d2d9e2;
  background: #f3f6f9;
}

.isl-trail-land {
  background: #f3e5bd;
}

.isl-trail-scanned {
  border-color: #9eb4c8;
  background: #bcd7e7;
}

.isl-trail-current {
  border-color: #17202a;
  background: #17202a;
}

.isl-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.isl-btn {
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 14px;
  background: #ffffff;
  color: #17202a;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

.isl-btn:focus-visible {
  outline: 3px solid rgba(20, 125, 79, 0.28);
  outline-offset: 2px;
}

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

@keyframes isl-pulse {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes isl-shake {
  0%, 100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-3px);
  }
  70% {
    transform: translateX(3px);
  }
}

@media (max-width: 720px) {
  .isl-layout {
    grid-template-columns: 1fr;
  }

  .isl-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .isl-shell {
    padding: 10px;
  }

  .isl-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .isl-map-panel {
    padding: 10px;
  }

  .isl-map {
    gap: 6px;
    padding: 7px;
  }

  .isl-title {
    font-size: 17px;
  }

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

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

@media (max-width: 380px) {
  .isl-map {
    gap: 5px;
    padding: 6px;
  }

  .isl-cell {
    min-width: 44px;
    min-height: 44px;
  }
}
