.mini6-shell {
  width: 100%;
  margin: 24px 0 32px;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid #cfd9e6;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  box-sizing: border-box;
}

.mini6-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.mini6-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mini6-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.1;
}

.mini6-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #0f172a;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.mini6-link:hover {
  color: #ffffff;
  background: #1f2937;
}

.mini6-subtitle {
  max-width: 760px;
  margin: 0 0 18px;
  color: #475569;
}

.mini6-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.mini6-board-wrap {
  min-width: 0;
}

.mini6-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: min(100%, 420px);
  margin: 0 auto;
  border: 3px solid #94a3b8;
  background: #94a3b8;
  box-sizing: border-box;
}

.mini6-cell {
  aspect-ratio: 1 / 1;
  min-width: 0;
  min-height: clamp(38px, 12vw, 64px);
  border: 1px solid #cbd5e1;
  border-radius: 0;
  background: #ffffff;
  color: #0f172a;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: clamp(1.1rem, 4vw, 1.55rem);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.mini6-cell:nth-child(-n + 6) {
  border-top-width: 0;
}

.mini6-cell:nth-child(n + 31) {
  border-bottom-width: 0;
}

.mini6-cell:nth-child(6n + 1) {
  border-left-width: 0;
}

.mini6-cell:nth-child(6n) {
  border-right-width: 0;
}

.mini6-cell:nth-child(n + 13):nth-child(-n + 18),
.mini6-cell:nth-child(n + 25):nth-child(-n + 30) {
  border-top-width: 3px;
  border-top-color: #94a3b8;
}

.mini6-cell:nth-child(n + 7):nth-child(-n + 12),
.mini6-cell:nth-child(n + 19):nth-child(-n + 24) {
  border-bottom-width: 3px;
  border-bottom-color: #94a3b8;
}

.mini6-cell:nth-child(6n + 4) {
  border-left-width: 3px;
  border-left-color: #94a3b8;
}

.mini6-cell:nth-child(6n + 3) {
  border-right-width: 3px;
  border-right-color: #94a3b8;
}

.mini6-cell.is-given {
  background: #e2e8f0;
  color: #111827;
  cursor: default;
}

.mini6-cell.is-user {
  color: #065f46;
}

.mini6-cell.is-peer {
  background: #f0fdf4;
}

.mini6-cell.is-selected {
  background: #dcfce7;
  box-shadow: inset 0 0 0 2px #047857;
}

.mini6-cell.is-error {
  background: #fee2e2;
  color: #991b1b;
}

.mini6-controls {
  display: grid;
  gap: 12px;
}

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

.mini6-keypad button,
.mini6-actions button {
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.mini6-keypad button:hover,
.mini6-actions button:hover {
  border-color: #047857;
  background: #ecfdf5;
}

.mini6-keypad .mini6-ghost {
  color: #475569;
  font-weight: 700;
}

.mini6-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini6-actions button[data-action="mini6-new"],
.mini6-actions button[data-action="mini6-check"] {
  background: #047857;
  border-color: #047857;
  color: #ffffff;
}

.mini6-actions button[data-action="mini6-new"]:hover,
.mini6-actions button[data-action="mini6-check"]:hover {
  background: #065f46;
  border-color: #065f46;
}

.mini6-status {
  margin: 0;
  color: #475569;
  font-weight: 700;
}

@media (min-width: 760px) {
  .mini6-layout {
    grid-template-columns: minmax(280px, 420px) minmax(240px, 1fr);
  }
}

@media (max-width: 540px) {
  .mini6-header {
    display: grid;
  }

  .mini6-link {
    width: 100%;
  }

  .mini6-keypad {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
